[l2h] Broken enumerations

Ross Moore ross at ics.mq.edu.au
Wed Aug 20 10:26:30 CEST 2003


Hello Graham,

On Tue, 19 Aug 2003, Graham Gough wrote:

Have you tried the  \usecounter  command ?

> In LaTeX this is easliy accomplished by using something like
>
> \newcounter{saveenum}
>  ...
> \begin{enumerate}
>  ...
>  \setcounter{saveenum}{\value{enumi}}
> \end{enumerate}
> <Commentary text>
> \begin{enumerate}
>  \setcounter{enumi}{\value{saveenum}}
  \usecounter{enumi}   % <----  this may work for the 2nd list
>  ...
> \end{enumerate}

Alternatively,

\newcounter{saveenum}
 ...

\begin{enumerate}
\usecounter{saveenum}  %  <---- same counter for both parts
 ...
\end{enumerate}
  <Commentary text>
\begin{enumerate}
\usecounter{saveenum}   %  <---- same counter for both parts
 ...
\end{enumerate}


>
> However, l2h doesn't handle this at all well. The second and
> subsequent lists all start with 1 again. Is there a work round to
> this?

LaTeX has a \usecounter command for this.
LaTeX2HTML is supposed to detect the presence of this *at the beginning*
in a list-environment and then use it.

Setting a counter implicitly (from enumi) at the end of one
environment to save for resetting the next, is rather counter-intuitive,
and probably will not work since this command could be executed out of
step with the list's internal counter (Perl is not LaTeX).
Certainly the action will be treated as part of an item, rather than
as a global result of the environment as a whole --- though that
may be sufficient for your purposes.

It is more logical to simply \usecounter with the same counter for each.


Hope this helps,

	Ross Moore

>
> Graham
> _______________________________________________
> latex2html mailing list
> latex2html at tug.org
> http://tug.org/mailman/listinfo/latex2html
>


More information about the latex2html mailing list