[l2h] no number for table

Ross Moore ross at ics.mq.edu.au
Fri Feb 27 23:09:25 CET 2009

Hi Nicola,

On 27/02/2009, at 8:44 PM, Dr Nicola L C Talbot wrote:

> It may be that the caption contains commands that vary between  
> LaTeX and
> LaTeX2HTML. For example:

>  The
> problem can be fixed by placing \protect before the command to prevent
> expansion when LaTeX writes it to the aux file:
> \caption{A \protect\sample{Sample} Table}
> or by using the optional argument:
> \caption[A Sample Table]{A \sample{Sample} Table}

Yes, this is definitely a possibility.

LaTeX2HTML works at the level of the commands that a user
types, whereas LaTeX itself translates into underlying
TeX primitives, when writing information into files.
LaTeX's \protect command was developed to provide a
partial mechanism to stop unwanted expansion when
writing files.

An extension of this mechanism is to make commands
"robust", using  \DeclareRobustCommand  rather than
  \newcommand  for making your own definitions.

Most LaTeX commands are meant to be robust now
  --- much more so than say 5-10 years ago.
So \protect is rarely needed now, *provided* you
stick to LaTeX's commands only, and have updated
your TeX installation recently.

However, if you write your own commands and do not
declare them to be robust, then there is still a
need to use \protect with captions.

> Regards
> Nicola Talbot
> -- 
> Dr Nicola Talbot
> http://theoval.cmp.uea.ac.uk/~nlct/

Hope this helps,


Ross Moore                                       ross at maths.mq.edu.au
Mathematics Department                           office: E7A-419
Macquarie University                             tel: +61 (0)2 9850 8955
Sydney, Australia  2109                          fax: +61 (0)2 9850 8114

More information about the latex2html mailing list