[l2h] "regexp explosion" - apology and a bit more

Mako Sasaki Mako Sasaki <sasaki@tyo.sci.jri.co.jp>
Wed, 12 Jan 2000 19:30:09 +0900


Hi, 

 Last month I reported a l2h processing error for my documents as
"regexp explosion for large toc on l2h99.2", and Ross Moore pointed
out as;

> > 
> > I suspect you have a macro definition like:
> > 
> > \def\mysection#1{\begingroup
> >  \renewcommand\theenumi{...}%
> >  \renewcommand\labelenumi{...}%
> >  ...
> >  \section...{#1}.....
> >  \endgroup}
> > 
> > so as to get a nice numbering style/layout in LaTeX.
> > These style changes have no effect at all in LaTeX2HTML,
> > which handles the TOC without reference to \theenumi
> > and \labelenumi etc.

This was partly true because i had no \...enumi definition in my
style file but my TeX document itself had many re-definition of
 \...enumi, like;


{
\renewcommand{\theenumi}{(\arabic{enumi})}
\renewcommand{\labelenumi}{\theenumi}
\begin{enumerate}
\item Item1
\item Item2
\item Item3
\item Item4
\end{enumerate}
}

So the following monologue(?) of me was, of course, pointless;

> Is it necessary to concatenate all tex files or make a style file
> using \begin{htmlonly} ?


As a matter of fact, these redefitions are not added by me but
inserted automatically by a tool to convert simple text files to LaTeX
documents ("Plain2" by A.Uchida - a popular tool in Japan), to create
enumerate environment from a list like;

(1) Item1
(2) Item2
(2) Item3
(2) Item4


Currently I'm using a gimmick to convert \renewcommand's to \def's
using "sed" (yes, workaround again :-P).

  sed 's/^ *\\renewcommand *{\(.*\)} *{\(.*\)} *$/\\def\ \1{\2}/'


Is it difficult to modify l2h99.x to accept any number of *enumi
redefinitions ?

 ==========================================
  Makoto Sasaki
   The Japan Research Institute Ltd.
   sasaki@tyo.sci.jri.co.jp