阅读:
带有 [amsthm] 选项的 ntheorem 忽略了定理环境的样式
我采用了建议的证明环境,ntheorem
没有amsmath
选项。我还确保将thmmarks
选项添加到ntheorem
,以启用定理结束/证明结束标记。但是 - 如果我写这个文档:
\documentclass{article}
\makeatletter
\usepackage[thmmarks]{ntheorem}
\usepackage{amssymb} % for \blacksquare
\usepackage{mathtools}
\newcommand{\proofname}{Proof}
\newcounter{proof}\newcounter{currproofctr}\newcounter{endproofctr}%
\newenvironment{proof}[1][\proofname]{
\th@nonumberplain
\def\theorem@headerfont{\itshape}%
\normalfont
\@thm{proof}{proof}{{#1}.}}%
{\@endtheorem} % and this ends the definition of the proof environment
\newcommand\proofSymbol{\ensuremath{\blacksquare}}
\qedsymbol{\ensuremath{\blacksquare}}
\makeatother
\begin{document}
\begin{proof}
The quick brown fox jumped over the lazy dog 1.
\end{proof}
\begin{proof}
The quick brown fox jumped over the lazy dog 2.
\begin{align*}
42
\end{align*}
\end{proof}
and some text afterwards.
\end{document}
我得到第一个校样上有黑色方块,但第二个校样上没有。这是为什么?
答案1
看起来常规界面按预期工作(编译两次后),包括修改后的格式:
\documentclass{article}
\usepackage{amsmath}
\usepackage[amsmath,thmmarks]{ntheorem}
\usepackage{amssymb} % for \blacksquare
\usepackage{mathtools}
\theoremstyle{plain}
\theorembodyfont{\normalfont}
\theoremheaderfont{\normalfont\itshape}
\theoremseparator{.}
\theoremsymbol{\ensuremath{\blacksquare}}
\newtheorem{proof}{Proof}
\begin{document}
\begin{proof}
The quick brown fox jumped over the lazy dog 1.
\end{proof}
\begin{proof}
The quick brown fox jumped over the lazy dog 2.
\begin{align*}
42
\end{align*}
\end{proof}
and some text afterwards.
\end{document}