[l2h] Fails to number figures: bogus "arguments too complex"
erro r.
John Blackburn
John.Blackburn at npl.co.uk
Thu Oct 20 11:59:57 CEST 2005
The commands
> \newcommand{\rms}{{\protect\footnotesize rms}\protect~}
> \newcommand{\peak}{{\protect\footnotesize peak}\protect~}
do not work either.
Here is the smallest LaTeX file which shows the bug
============================================
\documentclass{article}
\begin{document}
\begin{figure}
\caption{Here is {\protect\footnotesize small} text}
\label{foo}
\end{figure}
See Fig \ref{foo}
\end{document}
============================================
Error output:
============================================
No number for "Hereis<FONTSIZE="-1">small</FONT>text"
============================================
Version:
This is LaTeX2HTML Version 2002-2-1 (1.71)
John
> -----Original Message-----
> From: Ross Moore [mailto:ross at ics.mq.edu.au]
> Sent: 20 October 2005 00:52
> To: John Blackburn
> Cc: 'latex2html at tug.org'
> Subject: Re: [l2h] Fails to number figures: bogus "arguments too
> complex" erro r.
>
>
>
> On 19/10/2005, at 9:06 PM, John Blackburn wrote:
>
> > Thanks for that, Ross,
> >
> > The \rms and \peak commands I defined are certainly causing the
> > problem. Replacing with something simple like
> >
> > \newcommand{\rms}{\textbf{rms}~}
> > \newcommand{\peak}{\textbf{peak}~}
> >
> > solves the problem (though its not what I wanted!)
>
> Right; that's because \textbf is robust in LaTeX.
>
> >
> > However using
> >
> > \DeclareRobustCommand{\rms}{{\footnotesize rms}~}
> > \DeclareRobustCommand{\peak}{{\footnotesize peak}~}
> >
> > as you suggest does not work. The complaints about \leftmargin and
> > p_at_ go away but it still fails to number figures. It says, eg,
>
> OK; although I didn't say so in my mail, I suspected that
> this would *not* work, as you report.
>
> The reason is that LaTeX writes ... \rms ... into the .aux file,
> rather than expanding into the complete mess that \footnotesize gives.
>
> However, LaTeX2HTML sees \rms expanded into {\footnotesize rms}~
> within the figure caption, so cannot correlate this with the .aux
> contents.
>
>
> My other suggestion should work fine:
>
> > \newcommand{\rms}{{\protect\footnotesize rms}~}
> > \newcommand{\peak}{{\protect\footnotesize peak}~}
>
> since LaTeX writes: {\footnotesize rms}~
>
> and LaTeX2HTML sees: {\protect\footnotesize rms}~
> and should discard the \protect when looking for the figure number.
>
>
> >
> > No number for
> > "Experimentalsetupforconstantvoltage.OSCoutputisinrange5mV<FONTSIZ
> > E="-1">rms</FONT>-1.1V<FONTSIZE="-1">rms</
> > FONT>.Theamplifiermagnifiesvoltageupto
> > $100times
> >
> $.TheinputtoportAisvoltageoverpiezoelectricdividedby10,000toke
> epitlowe
> > n
> > ough.Thecurrentdetectorscreate1Vper1A."
> >
> > It would appear to have converted \footnotesize into html *before
> > looking up the caption*. Since the caption is in the aux file
> > generated by latex, there is no html there and the matching fails.
>
> Hmm. But did you test the case with \protect ?
>
> It's true that \DeclareRobustCommand needs a bit more work in the
> LaTeX2HTML programming. It is a much more recent addition to LaTeX
> than is the \protect mechanism.
>
>
>
> >
> > There is a less serious manifestation of this behaviour in
> > footnotes. I have the tex source
> >
> > 20mV\rms\footnote{In fact the HP...}
> >
> > This comes out as
> >
> > ... SIZE="-1">rms 5
> > In fact the HP outputs voltage in dBm: ...
> >
> > on the footnote page (footnote number 5)
> >
> > So it seems that Latex2html struggles with sizing commands in
> > captions.
>
> If unprotected, yes.
> Perhaps more generally too.
>
>
> Thanks for these reports,
>
> Ross
>
>
>
> >
> > John.
> >
>
> --------------------------------------------------------------
> ----------
> Ross Moore
> ross at maths.mq.edu.au
> Mathematics Department office: E7A-419
> Macquarie University tel: +61
> +2 9850 8955
> Sydney, Australia 2109 fax: +61
> +2 9850 8114
> --------------------------------------------------------------
> ----------
>
>
-------------------------------------------------------------------
This e-mail and any attachments may contain confidential and/or
privileged material; it is for the intended addressee(s) only.
If you are not a named addressee, you must not use, retain or
disclose such information.
NPL Management Ltd cannot guarantee that the e-mail or any
attachments are free from viruses.
NPL Management Ltd. Registered in England and Wales. No: 2937881
Registered Office: Serco House, 16 Bartley Wood Business Park,
Hook, Hampshire, United Kingdom RG27 9UY
-------------------------------------------------------------------
More information about the latex2html
mailing list