[l2h] errors using l2h Version 2008 (1.71) with -show_section_numbers when using pdflatex generated .aux file

Nasser M. Abbasi nma at 12000.org
Sun Jan 13 08:37:13 CET 2013


l2h needs to the .aux file to generate section numbers.

So I run pdflatex on the tex file before running
l2h, so that the .aux file is there.

Noticed now that when .aux is generated by pdflatex, then
l2h generates errors:

--------------------------------
>pdflatex index.tex
>latex2html -show_section_numbers   index.tex
*********** WARNINGS ***********

? brace missing for \

Substitution of arg to newlabelxx delayed.

redefining command \

? brace missing for \oldcontentsline

? brace missing for \oldnewlabel

Done.
>
-------------------------------------

However, when running latex instead of pdflatex to generate the
.aux file, then l2h is happy:

---------------------------
>rm index.aux
>latex index.tex
>latex2html -show_section_numbers   index.tex
1/3:section:.."1 one" for node1.htm
;;
2/3:section:.."2 two" for node2.htm
;;
3/3:sectionstar:.."About this document ..." for node3.htm
;;.

Doing section links ..........
Copying navigation icons ...
Done.
>
----------------------------------

see, no errors !

The reason I run pdflatex first instead of latex, is that
my tex files include images (using includegraphicx), of type
.png and not .ps or .eps files, and I really do not need to make
.ps documents. No body reads these .ps files more now since
.pdf is around, So I mainly use pdflatex and l2h, I stopped using
latex command long time ago.

This used to work ok, since I am using the same Makefiles
I used for long time and this is the first time I noticed these
errors.

I just moved to Linux mint 14. and installed l2h and texlive from
apt. Here are the versions I am using:

>latex -v
pdfTeX 3.1415926-2.4-1.40.13 (TeX Live 2012/Debian)
kpathsea version 6.1.0

>latex2html -v
This is LaTeX2HTML Version 2008 (1.71)

>pdflatex -v
pdfTeX 3.1415926-2.4-1.40.13 (TeX Live 2012/Debian)
kpathsea version 6.1.0


Any one knows what is going on? Why these error come up
when the .aux file is generated using pdflatex and not
latex? btw, the html does come up with the section numbers
there actually. So I am not sure if I can just ignore these
errors or not. But it will be good to find out why they
come up.

Here is the index.tex

-------------------------------
\documentclass{article}%

\usepackage{html}
\usepackage{color}
\pagecolor{white}

\begin{document}
\section{one}
one
\section{two}
two
\end{document}
------------------------

Here is the index.aux generated by pdflatex:

-----------------
\relax
\providecommand\HyperFirstAtBeginDocument{\AtBeginDocument}
\HyperFirstAtBeginDocument{\ifx\hyper at anchor\@undefined
\global\let\oldcontentsline\contentsline
\gdef\contentsline#1#2#3#4{\oldcontentsline{#1}{#2}{#3}}
\global\let\oldnewlabel\newlabel
\gdef\newlabel#1#2{\newlabelxx{#1}#2}
\gdef\newlabelxx#1#2#3#4#5#6{\oldnewlabel{#1}{{#2}{#3}}}
\AtEndDocument{\ifx\hyper at anchor\@undefined
\let\contentsline\oldcontentsline
\let\newlabel\oldnewlabel
\fi}
\fi}
\global\let\hyper at last\relax
\gdef\HyperFirstAtBeginDocument#1{#1}
\providecommand\HyField at AuxAddToFields[1]{}
\@writefile{toc}{\contentsline {section}{\numberline {1}one}{1}{section.1}}
\@writefile{toc}{\contentsline {section}{\numberline {2}two}{1}{section.2}}
--------------------------


here is the index.aux generated by latex

---------------------------------
\relax
\@writefile{toc}{\contentsline {section}{\numberline {1}one}{1}}
\@writefile{toc}{\contentsline {section}{\numberline {2}two}{1}}
-----------------------------------

I think the problem is with this line in the .aux file

\providecommand\HyperFirstAtBeginDocument

generated by pdflatex. Since these give problems
also when I run l2h using the .aux generated by pdflatex
as you can see:

---------------- *.aux file was generated by pdflatex now -----

latex2html -show_section_numbers   index.tex

Reading aux file: /TMP/index.aux ...
Processing macros ..., *** Could not find argument for command \providecommand ***
\HyperFirstAtBeginDocument<<17>>\AtBeginDocument<<17>>
....
*** no brace for \ , before:
\HyperFirstAtBeginDocument{\AtBeginDocument}
*** using "\HyperFirstAtBeginDocument" as the argument instead; is this correct?  ***

,,,,, *** Could not find argument for command \providecommand ***
\HyField at AuxAddToFields[1]<<27>><<27>>
\@writefile<<28>>toc<<28>><<44>>\contentsline <<29>>section<<29>><<41>>\numberline
...

-----------------------------

any suggestions how to fix this, or do you think it can be ignored?

thanks
--Nasser


More information about the latex2html mailing list