[latex2html] [l2h] (nested) enumerate not nice [+quick fix?]
David Rourke
David Rourke <rourke@magres.nottingham.ac.uk>
Wed, 20 Dec 2000 15:56:40 +0000 (GMT)
As noted by Boris Blankleider on 30 Apr 99, nested enumerate environments
aren't numbered correctly by latex2html. This is particularly bothersome
when referencing item numbers, e.g.,
\documentclass{article}
\begin{document}
\begin{enumerate}
\item Hello
\begin{enumerate}
\item sub hello\label{i}
\end{enumerate}
\end{enumerate}
See part \ref{i}.
\end{document}
results in
1.Hello
1.sub hello
See part 1a.
The following (trivial) diff seems to fix this.
David
PS Does anyone know that the link to the online archive given at
http://saftsack.fs.uni-bayreuth.de/~latex2ht/node4.html is wrong? It
should be .../mailing-lists/latex2html/, not
.../mailing-lists/LaTeX2HTML/.
*** latex2html.orig Wed Dec 20 14:44:42 2000
--- latex2html Wed Dec 20 15:27:53 2000
***************
*** 10915,10921 ****
local($enum_result);
! if (($standard_label)||(/\\item\[/)) {
# split it into items
@items = split(/\\item\b/,$_);
# save anything (non-blank) before the items actually start
--- 10915,10925 ----
local($enum_result);
! # Always use this code block to handle item generation. Using OL doesn't
! # produce the correct item labels (particularly so when nested enumerate
! # environments are used). der
! # if (($standard_label)||(/\\item\[/)) {
! if (1) {
# split it into items
@items = split(/\\item\b/,$_);
# save anything (non-blank) before the items actually start
***************
*** 10961,10966 ****
--- 10965,10971 ----
# Original, but $enum_result
$enum_result = &do_env_description($_, " COMPACT");
} else {
+ # Shouldn't be using this anymore. der.
$enum_result = &list_helper($_, 'OL', '', '');
}