I have a small problem with the table of contents that is not very  
significant, but I thought I would share with any interested developers.   
In my table of contents, I need to change the width of the page number  
entry so I can handle things like long phrases, e.g.,  "Inside Front  
Cover".  If I read the TeX documentation correctly a command like

    \newcommand\addtotoc[2]{\addtocontents{toc}{%
       \protect\settowidth{\tocjunk}{#2}%
       \protect\renewcommand{\protect\@pnumwidth}{\tocjunk}%
       \protect\contentsline{chapter}{#1}{{\normalfont #2}}%
       \protect\renewcommand{\protect\@pnumwidth}{\catpnumwidth}}
    }

works just fine in the printed document.  If you run latex2html on the  
document, everything is fine so long as a command like \htmlref does NOT  
appear in the document.  If \htmlref or similar command does appear,  
latex2html will complain a lot.  The problem occurs when the aux file is  
read to resolve the reference.  In the aux file is the \@writefile{toc}  
entry that contains \@pnumwidth.  Latex2html has trouble parsing the aux  
file due to the @ in the command name.  Perl is not happy with  
wrap_cmd_@pnumwidth

Solution is to either find a better way to define my addtotoc command or  
the solution I used, added a web option to my document class and define  
addtotoc one way if option is on and another if it is off.

Thanks for listening.  Hope the above is useful for someone.

Thanks to all latex2html developers.

Jim
---
Dr. James H.Freeman             [EMAIL PROTECTED] (Nextmail OK)
Department of Mathematics                                (Mime OK)
Cornell College                 319-895-4393(office)
600 First Street West           319-895-6866(home)
Mount Vernon, Iowa  52314-1098

Reply via email to