[l2h] Math in section title

Ross Moore ross@ics.mq.edu.au
Mon, 7 Oct 2002 11:16:49 +1000 (EST)


[Charset iso-8859-1 unsupported, filtering to ASCII...]
> Ross,
> 
> Thanks for offering to take a look at this.  I apologize for not responding
> sooner.  Apparently, L2H is not including the <IMG> tag in the table of
> contents (node1.html), although it does include the tag in the table of
> child links in index.html.
> 

Yes. The reason for this is that LaTeX2HTML maintains 2 hashes for
storing the titles of chapters/sections etc.
This is like with LaTeX document-classes, having a short version of the title
for use in running-heads, etc.
With HTML, this is even more critical, as there need to be explicit
hyperlinks for the navigation panel and index pages,
and there must be textual versions that are needed for when images
or turned-off in the local browser, of for screen-readers.
A shortened/simplified version is needed to prevent pages becoming too cluttered.

The T-of-C uses the *simplified* version of the title,
in which image-tags have been removed, among other things.
The mini-TOCs on each page are not simplified in this way.

Hence you get the difference that you are reporting.
(It is a *feature* rather than a *bug*. :-)


Here is a context-diff for a simple patch that will allow images in the
Table of Contents.  It works by first looking at the full version of the title,
and using this when there are images. Otherwise it retains the *simplified*
version -- which will usually be the same anyway.

If you have difficulties with this, then send me examples of the
complicated titles that you are using.


Hope this helps,

	Ross Moore


RCS file: /home/latex2ht/cvs/latex2html/user/latex2html.pin,v
retrieving revision 1.70
diff -c -r1.70 latex2html.pin
*** latex2html.pin      2002/08/22 15:14:08     1.70
--- latex2html.pin      2002/10/07 01:14:43
***************
*** 7908,7914 ****
      local($countUL); #counter to ensure correct tag matching
      my $root_file, $href;
      if (@subtree) {
!       local($next_depth, $file, $title, $star, $ldepth,$this_file, $prev_file);
        $ldepth = $depth;
        $prev_file = $base_file;
  #     @subtree = sort numerically @subtree;
--- 7908,7914 ----
      local($countUL); #counter to ensure correct tag matching
      my $root_file, $href;
      if (@subtree) {
!       local($next_depth, $file, $title, $sec_title, $star, $ldepth,$this_file, $prev_file);
        $ldepth = $depth;
        $prev_file = $base_file;
  #     @subtree = sort numerically @subtree;
***************
*** 7916,7923 ****
--- 7916,7927 ----
            $title = '';
            if ($exclude) {
                # making TOC
+               ($next_depth, $file, $sec_title) =
+                       split($delim,$section_info{$next});
                ($next_depth, $file, $title, $star) =
                        split($delim,$toc_section_info{$next});
+               # use the %section_info  title, in case there are images
+               $title = $sec_title if ($sec_title =~ /image_mark>\#/);
            } else {
                # making mini-TOC i.e. the child-links tables
                $star = '';
***************


 
> One other thing.  It seems to have nothing to do with amsmath.sty (or for
> that matter, html.sty) being loaded or not loaded, nor what document class
> is in use.
> 
> Thanks,
> Darrell     dr6583@earthlink.net
>