Hi,

I just started using latex2html and I'm very happy with it.  However I
think I found a bug.  I wanted to make the background color of my html
pages white, so I included \usepackage{html} and
\bodytext{bgcolor=white} in my document.  After doing so, the main
page still contains a table of contents.  However the table of contents
page was empty.

Next I tried the color package with \pagecolor{white} and setting
$BODYTEXT.  They both also resulted in an empty table of contents page.

I started in browsing and hacking through the latex2html code of which
I only understand about 10% and finally I found something suspicious
in the add_real_child_links subroutine.

Here I found the following piece of code.  However the fourth element
of $section_info{$next} doesn't contain "star" info like
$toc_section_info as is used in the next if section.  The fourth
element of $section_info{$next} contains "body" information.

#           if ($exclude) {
                ($next_depth, $file, $title, $star) =
                        split($delim,$section_info{$next}); 
#           }
            if (!$title) {
                ($next_depth, $file, $title, $star) =
                        split($delim,$toc_section_info{$next});
            }

Therefor I changed the code to:

#         if ($exclude) {
              $star='';
              ($next_depth, $file, $title) =
                      split($delim,$section_info{$next}); 
#         }

After this change latex2html made a correct table of contents page and
everything seems to work fine.

So I don't know for sure if this is a good patch, but it seems to work
fine.

I've attached an example latex file named test.tex which demonstrates
the problem.  You can just in- or exclude the \bodytext line.

My latex2html version is:

% latex2html -V
This is LaTeX2HTML Version 99.2beta6 (1.42)
by Nikos Drakos, Computer Based Learning Unit, University of Leeds.

In the test I used "latex2html text.tex" without any arguments.

Regards,
Jeroen.

--
Jeroen Haak, Academical Medical Center, The Netherlands
[EMAIL PROTECTED], phone +31 20 5662916, fax .. 5669020

*** latex2html  Fri Apr  6 11:05:49 2001
--- latex2html.patched  Fri Apr  6 11:05:45 2001
***************
*** 7723,7729 ****
        foreach $next (@subtree) {
            $title = '';
  #         if ($exclude) {
!               ($next_depth, $file, $title, $star) =
                        split($delim,$section_info{$next}); 
  #         }
            if (!$title) {
--- 7723,7730 ----
        foreach $next (@subtree) {
            $title = '';
  #         if ($exclude) {
!               $star='';
!               ($next_depth, $file, $title) =
                        split($delim,$section_info{$next}); 
  #         }
            if (!$title) {

test.tex

Reply via email to