[l2h] numbering figures and inputenc package problem
Ross Moore
ross@ics.mq.edu.au
Wed, 13 Feb 2002 07:12:58 +1100 (EST)
> Hello:
>
> I have found two different problems with the numbers of figures in latex2html, and I hope somebody could help me.
>
> Problem I:
>
> If I use the package inputenc (Actually I write spanish documents) the number of the figures do not appear in the html version for those figures whose caption include any spanish character; The number is missing in the list of figures, the cross references and the caption of the figuer.
>
> For example, try the following document:
>
> \documentclass{srticle}
> \usepackage[spanish]{babel}
> \usepackage[latin1]{inputenc}
> \begin{document}
> \listoffigures
> See figure \ref{fig}
> \begin{figure}
> \label{fig}
> \caption{función}
> FIGURE
> \end{figure}
> \end{document}
>
> When I run l2h, I get a message "no number for xxx", with xxx the caption of the figure.
> Note: the caption of the figure has the spanish o with accent (ASCII 162), which is equivalent to the command \'o
Without testing, I'd guess that this is because the text strings for captions do not
match exactly (i) in the .aux file and (ii) in your document source.
This is consistent with your 1st work-around:
> I have found a strategy to avoid this problem, but it is not very good to me, because I would have to change a lot of tex documents::
>
> - To change the caption of the figure, avoiding non-english characters; in the example, I can use the \'o instruction instead of the spanish chartacter, and the numbers of the figures appear.
Your .aux file has raw 8-bit characters, while the document reads these and exchanges them
for entities &#<num>; . At least, I think that is what is happening.
I'd need an example of your source + .aux file produced by LaTeX, to check this.
One fix that might work is:
latex2html -html_version 3.2,latin1,latin1 ...options... filename.tex
^^^^^^^^^^^^^
include extra encoding declarations here
This should cause LaTeX2HTML to retain the original latin1 characters while processing
and not replace them with numeric entities.
Another fif is to process the .aux file with perl or sed ,
to exchange the raw 8-bit characters for the same entities that LaTeX2HTML uses.
(Hmm; that sounds like a 1-liner that should be included within LaTeX2HTML itself.)
> Problem II:
>
> The hyperreferences to figures and tables are made with an image (a little square 'crossreference.png') instead of the number of the figure/table. Is this a feature or an option of l2h? I would prefer the number, but I do not know how...
You need to have processed the document first in LaTeX, so that the \label commands
*following* the \caption commands in the figures, have written an entry into
the .aux file.
Note that it is a common LaTeX error to use:
\begin{figure}\label{blah}
.....
\caption{.....}
\end{figure}
instead of:
\begin{figure}
.....
\caption{.....}\label{blah}
\end{figure}
If this does not explain your problem, then I'd need to see an example
of your document source for testing.
>
> Thanks in advance for your help...
Hope this helps,
Ross moore
>
> Oscar Duarte
> http://ohm.ing.unal.edu.co/ogduarte
> Departamento de Ingeniería Eléctrica
> Universidad Nacional de Colombia
>
> _______________________________________________
> latex2html mailing list
> latex2html@tug.org
> http://tug.org/mailman/listinfo/latex2html