1

In the minimal example

\documentclass{article}

\usepackage{amsmath}
\usepackage[amsmath,thmmarks]{ntheorem} 
\theoremsymbol{$\diamondsuit$}
\newtheorem{defi}{Definition}
\usepackage{mathtools}
\mathtoolsset{showonlyrefs=true} % endmark appears if this is commented out

\begin{document} 
\begin{defi}
\begin{equation}
A
\end{equation}
\end{defi}
\end{document}

the endmark at the end of the definition is not shown as expected.

This happens specifically if the environment ends in an equation/align that is affected by the showonlyrefs option.

Does anybody have a fix?

1 Answer 1

1

This issue is referenced in the mathtools documentation. It gives two suggestions:

  1. Load empheq first with the overload and ntheorem options. Note mathtools should always be loaded before ntheorem.
\documentclass{article}

\usepackage[overload,ntheorem]{empheq}
\usepackage{mathtools}
\usepackage[amsmath,thmmarks]{ntheorem} 
\theoremsymbol{$\diamondsuit$}
\newtheorem{defi}{Definition}

\mathtoolsset{showonlyrefs=true}

\begin{document} 
\begin{defi}
\begin{equation}
A 
\end{equation}
\end{defi}

\end{document}

This does, however, disable various things like \intertext.

  1. Load empheq with just the ntheorem option and for the last equation-like environment in the theorem, use \begin{empheq}{<env>} instead of \begin{<env>}:
\documentclass{article}

\usepackage[ntheorem]{empheq}
\usepackage{mathtools}
\usepackage[amsmath,thmmarks]{ntheorem} 
\theoremsymbol{$\diamondsuit$}
\newtheorem{defi}{Definition}

\mathtoolsset{showonlyrefs=true}

\begin{document} 

\begin{defi}
\begin{empheq}{equation}
A 
\end{empheq}
\end{defi}

\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .