[l2h] regexp explosion for large toc on l2h99.2beta

Mako Sasaki Mako Sasaki <sasaki@tyo.sci.jri.co.jp>
Thu, 23 Dec 1999 17:25:44 +0900


I got an error as follows for \tableofcontents processing on
latex2html 99.2 beta5.

 wrapping raw arg commands/()\\(theenumi|labelenumii|labelenumi|
 regexp too big at /usr/local/bin/latex2html line 12652

 I found that the size of $raw_arg_cmd_rx began to grow twice :-) at
each call to &wrap_raw_arg_cmds after some timing.
 My latex document has over 300 pages and more than 10 pages of table
of contents are created.

 Commenting out the following loop was a workaround to this problem,
but i think it should not be a correct solution.  (loosing section
numbers on output HTML despite of "-show_section_numbers" is caused by
this ??)

  12645 #    if (%renew_command) {
  12646 #        local($key);
  12647 #        foreach $key (keys %renew_command) {
  12648 #            $raw_arg_cmds{$key} = 1;
  12649 #            $raw_arg_cmd_rx =~ s/^(\(\)\\\\\()/$1$key\|/;
  12650 #        }
  12651 #    }
  12652     print "\n" if (/$raw_arg_cmd_rx/);

L2h 99.2 beta 1 to 5 have the same problem. L2h 98.1 does not, but I
forced to use 99.x because 98.1 ran into an endless loop for my
document on Linux RedHat5.2 and i could not find any fix (oh, this
should be another problem to post, but currently cannot find clear
condition to fail).

Does anyone have correct solution to my problem?

  Thanks in advance.

  I'm using japanese version for LaTeX (ASC II pLaTeX 2e) and dvips,
but this should not make any difference (i hope?).

  Makoto Sasaki
  The Japan Research Institute Ltd.