[l2h] latex2html and hyperref.sty

Dan Scholnik Dan Scholnik <scholnik@radar.nrl.navy.mil>
Sun, 20 Feb 2000 05:12:37 -0500

   > Like many others, I'm trying to prepare documents in parallel to
   > generate ps, pdf, and html versions, and I'm using the hyperref
   > package for the pdf links.  It seems that hyperref changes the .aux
   > file in ways that latex2html doesn't like, the result being that
   > figures  and equation links don't get numbers.  Is this a known
   > problem?  Is there a fix (other than running latex without hyperref,

   Add the following line to any script: latex2html.pin  or html.perl
   or an initialisation file.

       sub do_cmd_oldcontentsline { &do_cmd_contentsline(@_) }

Thanks, that did the trick for plain text captions.  I also added

       sub do_cmd_oldnewlabel { &do_cmd_newlabel(@_) }

to get equation references to work right.  However, if there is any
math at all, even just $1$, in the caption and hyperref is used, then
the number is lost (without hyperref it works fine). For example:

\caption{Integrated $1$ noise-shaping DAC.}

without hyperref produces the .aux file line

\@writefile{lof}{\contentsline {figure}{\numberline {1}{\ignorespaces Integrated $1$ noise-shaping DAC.}}{2}}

and the numbering is fine.  With hyperref, the line is

\@writefile{lof}{\contentsline {figure}{\numberline {1}{\ignorespaces Integrated $1$ noise-shaping DAC.}}{2}{figure.1}}

and latex2html complains

No number for "Integrated$1$noise-shapingDAC."