# [OS X TeX] ntheorem and the equation environment

Don Green Dragon fergdc at Shaw.ca
Fri Jun 15 23:02:00 EDT 2012

Hi All,

For some months now, I've been using the ntheorem package in my basic template. The document line is

\documentclass [11pt, fleqn, leqno] {book}

and the main two lines relating to ntheorem are:

\usepackage[amsthm, thmmarks, framed, thref]{ntheorem}
\usepackage{framed}		% needed by ntheorem for theorem-like structures within a frame

Everything has been working well until I recently noticed that source code of the form

$$. . .$$

does not work. Even something as simple as

$$a + b + c = d$$

fails to typeset and the error message is essentially:
----------
./Untitled.tex:536: LaTeX Error: Something's wrong--perhaps a missing \item.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
...

l.536
----------
However, other math environments work properly. For example, the align environment works. Starting with the source

\begin{align}
x &= a+b\\
y &= c+d
\end{align}

we find that it typesets as (approximately) [first equations in chapter 1]

(1.1) 	x = a + b
(1.2) 	y = c + d

which is correct.

I tracked the error warning down to the inclusion of the option "fleqn" in the \documentclass line. If that line is replaced by

\documentclass [11pt, leqno] {book}

then the simple $$a + b + c = d$$ typesets, but, the equations is centred which I want to avoid. As to "fleqn" and other matters, the ntheorem manual by May & Schedler state (in section 6.1 Known Limitations, page 24)
----------
• Document option fleqn is problematic: fleqn handles equations not by  but by lists (check what happens for

\begin{theorem} $displaymath$ \end{theorem}

in standard LATEX: The displaymath is not set in an own line). Also, for long formulas, the equation number and the endmark are smashed into the formula at the right text margin.

• Naturally, ntheorem.sty will not work correctly in combination with other styles which change the handling of
1. theorem-like environments, or
2. environments concerned with the handling of endmarks, e.g. $...$, eqnarray, etc.
----------

I checked out the first possibility and it did not cause any problem. Specifically, the code

\begin{thm}
For the sine function, we know that
$\int_{0}^{\pi} \sin \qquad \text{exists}$
\end{thm}

did typeset as shown below (after sign off); i.e., the $displaymath$ was set on its own line. However, with respect to the remark "Naturally . . . " I'm concerned about the comment

2. environments concerned with the handling of endmarks, e.g. $...$, eqnarray, etc.

I wonder if people on this list know which "environments concerned with the handling of endmarks" will fail. At this point, I have not made a careful study of which math environments work and which  do not when the option "fleqn" is operative.

I hate the idea of dropping the ntheorem package, or of deleting the option 'fleqn". Any suggestions?

Don Green Dragon
fergdc at Shaw.ca

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PastedGraphic-1.pdf
Type: application/pdf
Size: 111368 bytes
Desc: not available
URL: <http://email.esm.psu.edu/pipermail/macosx-tex/attachments/20120615/9055765e/attachment.pdf>