# Equation numbers in split environment messed up by ntheorem thref

When I use ntheorem with the thref option, every time I use the amsmath split command the numbering skips ahead by one.

Here is an example:

\documentclass{article}

\usepackage{amsmath}
\usepackage[amsmath,thref]{ntheorem}

\begin{document}

$$a = b$$

$$b = c$$

$$\begin{split} a & = b\\ &= c \end{split}$$

\end{document}


The final equation should be numbered (3), but is instead numbered (4). Removing thref resolves the issue.

Can anyone tell me how to fix this? Any help is greatly appreciated.

• I usually advise against using ntheorem. – egreg Feb 10 '16 at 19:23

I usually advise against using ntheorem, but you may prefer it to amsthm. You can solve the problem of thref by not using the option and going to the much more powerful cleveref package.

\documentclass{article}

\usepackage{amsmath}
\usepackage[amsmath]{ntheorem}
\usepackage{cleveref}

\newtheorem{theorem}{Theorem}

\begin{document}

\begin{theorem}\label{test}
$$a = b$$
\end{theorem}

\Cref{test} says something interesting.

$$b = c$$

$$\begin{split} a & = b\\ &= c \end{split}$$

\end{document}


Work-around: replace split with the aligned environment:

\documentclass{article}

\usepackage{amsmath}
\usepackage[amsmath,thref]{ntheorem}

\begin{document}

$$a = b$$

$$b = c$$

\begin{aligned} a & = b\\ &= c \end{aligned}

\end{document}


• is that "work-around"? (as it is, it sounds a bit dizzy.) – barbara beeton Feb 10 '16 at 19:32
• Thank you! It is interesting to me that this works, since split and aligned are both from amsmath and do similar things. – Andrew Patrick Turner Feb 10 '16 at 19:37
• @Barbara Beeton: Maybe I meant ‘lol-around’ ;o) – Bernard Feb 10 '16 at 20:13

You may try this:

\documentclass{article}

\usepackage{amsmath}
\usepackage[amsmath,thref]{ntheorem}
\makeatletter
\newcommand\forcefirstchoice{\firstchoice@false}
\makeatother

\begin{document}

$$a = b$$

$$b = c$$

$$\forcefirstchoice \begin{split} a & = b\\ &= c \end{split}$$

$$\forcefirstchoice \begin{split} a & = b\\ &= c \end{split}$$

\end{document}


Output: