Here is a way to do it in detail: I define two different environments, proof
(with a qed symbol) and proof-wo
without qed symbol.
However, note it is enough to define only a proof environment (with qed symbol by default), and add \NoEndMark
if you do not want this symbol.
Also I do not see the point of numbering proofs. Nevertheless, should you really want to, just change the theorem style to plain
and replace \newtheorem{proof-wo}{Proof}
with \newtheorem{proof-wo}[proof]{Proof}
if you want to have only one counter for both environments.
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{xcolor}
\usepackage{mathtools}
\usepackage[amsmath, thmmarks]{ntheorem}
\usepackage{amssymb}
\usepackage{lipsum}
\theoremstyle{nonumberplain}
\theoremheaderfont{\itshape}
\theorembodyfont{\normalfont}
\theoremseparator{.\,—}
\theoremsymbol{}
\newtheorem{proof-wo}{Proof}
\theoremsymbol{\ensuremath{\color{lightgray}\blacksquare}}
\newtheorem{proof}{Proof}
\begin{document}
\begin{proof-wo}
Without \verb|\qed| Nam dui ligula, fringilla a, euismod sodales, sollicitudin
vel, wisi. Morbi auctor lorem non justo. Nam lacus libero, pretium at, lobortis
vitae, ultricies et, tellus. Donec aliquet, tortor sed accumsan bibendum, erat
ligula aliquet magna, vitae ornare odio metus a mi. Morbi ac orci et nisl hen-
drerit mollis. Suspendisse ut massa. Cras nec ante. Pellentesque a nulla. Cum
sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus
mus. Aliquam tincidunt urna. Nulla ullamcorper vestibulum turpis. Pellen-
tesque cursus luctus mauris.
\end{proof-wo}
%
\begin{proof}
With \verb|\qed| Nam dui ligula, fringilla a, euismod sodales, sollicitudin
vel, wisi. Morbi auctor lorem non justo. Nam lacus libero, pretium at, lobortis
vitae, ultricies et, tellus. Donec aliquet, tortor sed accumsan bibendum, erat
ligula aliquet magna, vitae ornare odio metus a mi. Morbi ac orci et nisl hen-
drerit mollis. Suspendisse ut massa. Cras nec ante. Pellentesque a nulla. Cum
sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus
mus. Aliquam tincidunt urna. Nulla ullamcorper vestibulum turpis. Pellen-
tesque cursus luctus mauris.
\end{proof}
%
\begin{proof}\NoEndMark
Without \verb|\qed| Nam dui ligula, fringilla a, euismod sodales, sollicitudin
vel, wisi. Morbi auctor lorem non justo. Nam lacus libero, pretium at, lobortis
vitae, ultricies et, tellus. Donec aliquet, tortor sed accumsan bibendum, erat
ligula aliquet magna, vitae ornare odio metus a mi. Morbi ac orci et nisl hen-
drerit mollis. Suspendisse ut massa. Cras nec ante. Pellentesque a nulla. Cum
sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus
mus. Aliquam tincidunt urna. Nulla ullamcorper vestibulum turpis. Pellen-
tesque cursus luctus mauris.
\end{proof}
\end{document}
Best Answer
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 thentheorem
documentation:As you have mentioned, the solution is to use
equation*
:One might wonder why
equation*
works whilst\[...\]
doesn't if both are equivalent as far asamsmath
is concerned; the reason is thatntheorem
redefines\[
and\]
when thethmmarks
option is activated and this definition is not compatible with the meaning expected byamsmath
's environments.