> 
> 
> I sent the first bug below a while back, but there haven't been any
> comments about it. The second bug is new, but looks like it should be
> easy to fix (?). Process the following file with 

> Bug #2:
> Also, note in the following table of contents that the appendix
> subsections are numbered A1.1 instead of A.1.1 (there's a period
> missing):

Yes, add the missing '.' in the main latex2html script, as follows:
 
sub do_cmd_the_appendix {
    local($val,$level) = (0,@_[0]);
    if ($level == 3) { $val=$global{'section'} }
    elsif ($level == 2) { $val=$global{'chapter'} }
    join('', &fAlph($val), '.', @_[1]);
                         ^^^^^__________ here !!!
}

>   latex2html -show_section_numbers
> 
> using version 98.2beta8.
> 
> Once again, much thanks to the developers for a great program!
> 


> Even numbered lines below are misaligned if they start with a
> percent sign:
> 
>  \begin{verbatim}
>     % Line 1
>     % Line 2
>     % Line 3
>     % Line 4
>     % Line 5
>     % Line 6
>     Line 1
>     Line 2
>     Line 3
>     Line 4
>     Line 5
>     Line 6
>  \end{verbatim}
> 
> 

Fix this with 3 simple edits.
Here are context-diffs, showing the un-edited code,
followed by the edited version, as it appears at my site,
and will soon be committed to the CVS repository.
(The line numbers should not be expected to be accurate,
but should be close to correct at any installed LaTeX2HTML site.)

***************
*** 1473,1480 ****
      &preprocess_alltt if defined(&preprocess_alltt);

      # Move all LaTeX comments into a local list
!     s/([ \t]*(^|[^\\]))(%.*)\n[ \t]*/print "%";
        $comments{++$global{'verbatim_counter'}} = "$3";
        &write_mydb("verbatim", $global{'verbatim_counter'}, $3);
        "$1$comment_mark".$global{'verbatim_counter'}."\n"/mge;

--- 1477,1486 ----
      &preprocess_alltt if defined(&preprocess_alltt);

      # Move all LaTeX comments into a local list
! #    s/([ \t]*(^|[^\\]))(%.*)\n[ \t]*/print "%";
!     s/([ \t]*(^|[^\\]))(%.*(\n[ \t]*|$))/print "%";
        $comments{++$global{'verbatim_counter'}} = "$3";
        &write_mydb("verbatim", $global{'verbatim_counter'}, $3);
        "$1$comment_mark".$global{'verbatim_counter'}."\n"/mge;

***************
*** 1518,1524 ****
            $contents =~ s/^\n+//;

            # re-insert comments
!           $contents =~ s/$comment_mark(\d+)/$comments{$1}/g;
  #         $contents =~ s/$comment_mark(\d+)/$verbatim{$1}/g;

            # revert '\\ ' -> '\\' only once
--- 1524,1531 ----
            $contents =~ s/^\n+//;

            # re-insert comments
!           $contents =~ s/$comment_mark(\d+)\n/$comments{$1}/g;
  #         $contents =~ s/$comment_mark(\d+)/$verbatim{$1}/g;

            # revert '\\ ' -> '\\' only once
***************
*** 1546,1552 ****
            }
        } else {
            print "Cannot find \\end{$env}\n";
!           $after =~ s/$comment_mark(\d+)/$comments{$1}/g;
  #         $after =~ s/$comment_mark(\d+)/$verbatim{$1}/g;
            if ($env =~ /rawhtml|$keepcomments_rx/i) {
                  $after = &revert_to_raw_tex($contents);
--- 1553,1559 ----
            }
        } else {
            print "Cannot find \\end{$env}\n";
!           $after =~ s/$comment_mark(\d+)\n/$comments{$1}/g;
  #         $after =~ s/$comment_mark(\d+)/$verbatim{$1}/g;
            if ($env =~ /rawhtml|$keepcomments_rx/i) {
                  $after = &revert_to_raw_tex($contents);
***************



There will be a few other small fixes in the next CVS update.


Hope this helps,

        Ross Moore

Reply via email to