[l2h] Fails to number figures: bogus "arguments too complex" erro r.

John Blackburn John.Blackburn at npl.co.uk
Wed Oct 19 13:06:03 CEST 2005


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!)

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,

No number for "Experimentalsetupforconstantvoltage.OSCoutputisinrange5mV<FONTSIZ
E="-1">rms</FONT>-1.1V<FONTSIZE="-1">rms</FONT>.Theamplifiermagnifiesvoltageupto
$100times$.TheinputtoportAisvoltageoverpiezoelectricdividedby10,000tokeepitlowen
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.

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.

John.

> -----Original Message-----
> From: Ross Moore [mailto:ross at ics.mq.edu.au]
> Sent: 19 October 2005 08:40
> To: John Blackburn
> Subject: Re: [l2h] Fails to number figures: bogus "arguments too
> complex" erro r.
> 
> 
> Hello John,
> 
> On 19/10/2005, at 12:15 AM, John Blackburn wrote:
> 
> > I am having problems compiling a LaTeX document to HTML. It works  
> > fine except that some of the figures are not numbered (they are  
> > referenced by number in the text but figure caption just says  
> > Figure: blah..). The output contains many errors like:
> >
> > ===============================================
> > ,Arguments to leftmargin are too complex ...
> > It will not be processed unless used in another environment
> > ===============================================
> >
> > and then many instances of
> >
> > ===============================================
> > No number for "Thefourpossibleconstitutiveequationforms.Innon- 
> > linearsystems,them
> > aterialparameters,$s,c,hatepsilon,beta,d,e,g,h$ 
> > (compliance,stiffness,permittivit
> > y,inversepermittivity,and4piezoelectriccouplingfactors) 
> > arefunctionsofthespecifie
> > dindependentvariables.Inlinearsystemsonly,etc."
> > ===============================================
> >
> > I don't understand the problem as I am not using the \leftmargin  
> > command.
> 
> Ahh, but you do, indirectly.
> 
> Have a look in the .aux file for your document, when 
> processed by LaTeX.
> Find the lines that refer to figure captions.
> 
> You should find the font-switching command, such as \bf or \it or  
> whatever,
> have been expanded into TeX primitives and/or LaTeX internals.
> 
> This is because you forgot to \protect fragile commands used within
> your captions.
> 
> 
> > I don't even know what it does!
> >
> > Also, it says
> >
> > ===============================================
> > Unknown commands: z_at_ p_at_
> > ===============================================
> 
> These are from \z@ and \p@ within the expansion of macros.
> 
> 
> 
> Find the figure in your manuscript that use the caption:
> 
>     The four possible constitutive equation forms. In non-linear  
> systems ...
> 
> Look for macros that could be fragile.
> If you don't know what this means, then post me the complete caption.
> 
> Include the definitions of any home-grown macros that you use...
> 
> 
>    ... ahh, you have done this already. Good.
> 
> >
> > I am not using these commands, I don't know what they are!
> >
> > My .tex file is vanilla LaTeX, the preamble is
> >
> > ===============================================
> > \documentclass{article}
> > \usepackage{graphics}
> >
> > \setlength{\topmargin}{0cm}
> > \setlength{\textwidth}{16cm}
> > \setlength{\textheight}{22cm}
> > \setlength{\oddsidemargin}{0cm}
> > \setlength{\evensidemargin}{0cm}
> > \setlength{\marginparwidth}{2cm}
> >
> > \begin{document}
> >
> > \renewcommand{\vec}[1]{\mbox{\boldmath $#1$}}
> > \renewcommand{\d}{\partial}
> > \renewcommand{\t}[1]{\mathrm{#1}}
> >
> > \newcommand{\eq}[1]{(\ref{#1})}
> > \newcommand{\f}[1]{Figure \ref{#1}}
> > \newcommand{\dee}{\mathrm{d}}
> > \newcommand{\dd}[2]{\left(\frac{\d #1}{\d #2}\right)}
> > \newcommand{\ddd}[3]{\left(\frac{\d #1}{\d #2}\right)_{#3}}
> >
> 
> Here's the problem...
> 
> > \newcommand{\rms}{{\footnotesize rms}~}
> > \newcommand{\peak}{{\footnotesize peak}~}
> 
> Change these to either:
> 
>    \newcommand{\rms}{{\protect\footnotesize rms}\protect~}
>    \newcommand{\peak}{{protect\footnotesize peak}\protect~}
> 
> or to
> 
>    \DeclareRobustCommand{\rms}{{\footnotesize rms}~}
>    \DeclareRobustCommand{\peak}{{\footnotesize peak}~}
> 
> 
> 
> >
> > \title{Non linear piezoelectric resonance}
> > \author{John Blackburn}
> > \maketitle
> >
> > \section{Introduction}
> >
> > This aim of this document is to compare three non-linear 
> piezoelectric
> > test methods: constant voltage, constant current and burst mode ...
> > ===============================================
> >
> > Typical figure
> >
> > ===============================================
> > \begin{figure}
> >   \scalebox{0.8}{\includegraphics{contv}}
> >   \caption{Experimental setup for constant voltage. OSC output is in
> >   range 5mV\rms-1.1V\rms. The amplifier magnifies voltage up to
> >   $100\times$. The input to port A is voltage over piezoelectric
> >   divided by 10,000 to keep it low enough. The current detectors
> >   create 1V per 1A.}
> >   \label{contv}
> > \end{figure}
> 
> This uses the \rms  which expands to include an un-\protect'd
> \footnotesize command, which then expands into the hideous mess
> that you will see inside the .aux file.
> 
> 
> 
> > ===============================================
> >
> > and it is referenced by
> >
> > ===============================================
> > ... as shown in \f{contv}.
> > ===============================================
> >
> > I would appreciate any help!!
> 
> 
> 
> Hope this does it for you.
> 
> 
> Cheers,
> 
>      Ross Moore
> 
> >
> > John Blackburn
> >
> > -------------------------------------------------------------------
> > 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
> > -------------------------------------------------------------------
> >
> > _______________________________________________
> > latex2html mailing list
> > latex2html at tug.org
> > http://tug.org/mailman/listinfo/latex2html
> >
> 
> --------------------------------------------------------------
> ----------
> 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