[l2h] Unexpected failure within theorem environment.

Ross MOORE Ross MOORE <ross@ics.mq.edu.au>
Thu, 2 Sep 1999 20:37:17 +1000 (EST)


> The enclosed short file is, I hope, very standard LaTeX.  It gives me
> trouble in l2h -- the generated images.tex file contains HTML code and
> image generation fails.  The example is condensed from a (very) much
> longer file, and most elements in it now seem critical.  
> 
> Removing the first "(" in the first "thm" restores sensible behaviour.
> I am using latex2html 99.1 release with options -no_math -html_version
> 3.2,table,math.  Perl is 5.005_02.
> 
> Is this a known problem?  Can I spot it before it bites next time?

Well, it is meant to be a feature, but it is going wrong here.

The idea is to capture "named theorems" such as:

\begin{thm}(Fermat--Wiles) 
...
...


Where the (....)  is the name of the theorem,
not part of the body of the theorem.

In your case, the ( is unclosed, and funny things happen.
I can program it to not count an unclosed ( as starting
a name, to prevent this.

The simplest way to override this "feature"
is to put a pair of empty braces:

 \begin{thm}
{}(....<math>...


> Here is the failing (for me) LaTeX:
> 
> \documentclass{article}
> \newtheorem{thm}{Theorem}
> \begin{document}
> 
> \begin{thm}
> ( $\sin(x)$

Use:  {}( $\sin(x)$

> \end{thm}
> 

Thanks for the report.

	Ross Moore