Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Using a combination of \usepackage[amsmath,thmmarks]{ntheorem}, display math enclosed in \[ \] and a \begin{split} environment inside it, pdflatex freaks out completely:

! LaTeX Error: Bad math environment delimiter.

This is the minimum (non)working example (obviously without theorem definitions, nor with the need to have a split environment there; those are not of the essence in showing the error):

\documentclass{article}
\usepackage{amsmath}
\usepackage[amsmath,thmmarks]{ntheorem}
\begin{document}

\[
\begin{split}
    a = b
\end{split}
\]

\end{document}

Also, a workaround is to use \begin{equation*} instead.

EDIT: I guess a question was missing: any ideas what the problem is up there?

share|improve this question
3  
Page 25 of ntheorem's documentation says: "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." –  Gonzalo Medina May 28 '12 at 23:41

1 Answer 1

up vote 6 down vote accepted

The problem is caused by the thmmarks option (if you delete it from your code, the error vanishes); this problem is documented in page 25 of the ntheorem documentation:

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."

As you have mentioned, the solution is to use equation*:

\documentclass{article}
\usepackage{amsmath}
\usepackage[amsmath,thmmarks]{ntheorem}
\begin{document}

\begin{equation*}
\begin{split}
    a = b
\end{split}
\end{equation*}

\end{document}

One might wonder why equation* works whilst \[...\] doesn't if both are equivalent as far as amsmath is concerned; the reason is that ntheorem redefines \[ and \] when the thmmarks option is activated and this definition is not compatible with the meaning expected by amsmath's environments.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.