如何在证明环境中删除点(使用 ntheorem 包)?

如何在证明环境中删除点(使用 ntheorem 包)?

\begin{proof} something \end{proof}生产

证明。某事

而且我要

证明:某事

建议的解决方案这里ntheorem如果使用包而不是amsthm如上所述,则会产生错误这里ntheorem。虽然我不记得我选择的理由amsthm,但我不会冒险去改变它……

我还尝试了以下方法,但均无效果:

\theoremstyle{nonumberplain} 
\theoremseparator{:} (other irrelevant font modifications also)
\newtheorem{beweis}{Proof}
\let\proof\beweis

答案1

不要使用该amsthm选项,并在序言中使用类似这样的内容:

\theoremstyle{nonumberplain}
\theoremheaderfont{\itshape}
\theoremseparator{:}
\theorembodyfont{\upshape}
\theoremsymbol{\ensuremath{\square}}
\newtheorem{proof}{Proof}

答案2

是的,这是一个一问一答,但我可以说,我绝望地找到答案,因为我几乎不理解代码,我觉得我必须分享。

我复制了“nonumberplain”定理样式的定义(我在 C:\Program Files\MiKTeX 2.9\tex\latex\ntheorem.sty 中找到它并用 notepad ++ 打开),以不同的方式调用它,对其进行修改并使“证明”环境使用该样式:

\makeatletter
 \gdef\th@styledemo{% I chose the name "styledemo"for the style
  \def\theorem@headerfont{\normalfont\itshape\small}\itshape% Here you can actually further modify the "header" and body font
 \def\@begintheorem##1##2{%
  \item[\hskip\labelsep \theorem@headerfont ##1:]}% Here I replaced the . with :
 \def\@opargbegintheorem##1##2##3{%
 \item[\hskip\labelsep \theorem@headerfont ##1\ (##3):]}}% same replacement here

\newenvironment{beweis}[1][Proof]{% the proof environement already exists so I chose another one
 \th@styledemo  % here I call the theoremstyle define above
 \def\theorem@headerfont{\itshape\small}% Here I don't really understand but nevertheless write the same specification for the font again...
 \normalfont\itshape\small
 \theoremsymbol{\ensuremath{_\blacksquare}}
\@thm{proof}{proof}{#1}}% here one should keep proof, don't ask why...
{\@endtheorem}
\makeatother
\let\proof\beweis % replace the environment proof with beweis

相关内容