[l2h] latex2html-2002-1 crasher

Julius Smith jos@w3k.org
Thu, 27 Jun 2002 11:20:10 -0700


The test file below crashes latex2html-2002-1 at line 2663.  In the latex 
source, there are comments indicating two ways to bypass the problem.  It 
appears that a general workaround might be to avoid unnecessary newlines in 
macro definitions. -- jos

 >ls -l
total 8
-rw-r--r--    1 jos      jos           161 Jun 27 11:04 Makefile
-rw-r--r--    1 jos      jos           514 Jun 27 10:50 l2hc.tex

 >cat Makefile

NAME = l2hc

$(NAME): $(NAME).aux
	latex2html $(NAME).tex

$(NAME).aux: $(NAME).tex
	latex $(NAME)

clean:
	/bin/rm -f *.dvi *.aux *.log *~
	/bin/rm -rf $(NAME)

 >cat l2hc.tex

%&latex

\documentclass{article}
\usepackage{html}

%This version works (no crash) for either case below:
%\newcommand{\ExampOp}{\mbox{ExampOp}}

%This version crashes latex2html when '\protect' is used below:
\newcommand{\ExampOp}{
\mbox{ExampOp}
}

\begin{document}

\begin{figure}[h]

%This version works (no crash) for either case above:
%\caption{Illustration of $\ExampOp_2(x)$.}

%This version crashes latex2html when ExampOp def contains newline:
\caption{Illustration of $\protect\ExampOp_2(x)$.}

\end{figure}

\end{document}

 >make
latex l2hc
This is TeX, Version 3.14159 (Web2C 7.3.1)
(l2hc.tex
LaTeX2e <2000/06/01>
Babel <v3.7h> and hyphenation patterns for american, french, german, ngerman, i
talian, nohyphenation, loaded.
(/usr/share/texmf/tex/latex/base/article.cls
Document Class: article 2000/05/19 v1.4b Standard LaTeX document class
(/usr/share/texmf/tex/latex/base/size10.clo))
(/usr/local/src/l2h/texinputs/html.sty)
No file l2hc.aux.
[1] (l2hc.aux) )
Output written on l2hc.dvi (1 page, 372 bytes).
Transcript written on l2hc.log.
latex2html l2hc.tex
This is LaTeX2HTML Version 2002-1 (1.68)
by Nikos Drakos, Computer Based Learning Unit, University of Leeds.

Revised and extended by:
  Marcus Hennecke, Ross Moore, Herb Swan and others
...producing markup for HTML version 3.2



Loading /usr/local/share/lib/latex2html/versions/html3_2.pl

  *** processing declarations ***

Loading /usr/local/share/lib/latex2html/versions/latin1.pl
OPENING /k/l/l2hc/l2hc.tex

Note: Working directory is /k/l/l2hc/l2hc
Note: Images will be generated in /tmp/l2h5259

texexpand V2002-1 (Revision 1.11)



Loading /usr/local/share/lib/latex2html/styles/texdefs.perl...
Loading /usr/local/share/lib/latex2html/styles/article.perl
Loading /usr/local/share/lib/latex2html/styles/html.perl
Reading ...
%%%%%%%,++.
@@@@@@@@

Reading aux file: /k/l/l2hc/l2hc.aux ...
Processing macros ...++..

  *** Error: unclosed math or extra `$', before:









Died at /usr/local/bin/latex2html line 2663.
make: *** [l2hc] Error 2
 >