在 svjour3 中干净地写入“证明...”

在 svjour3 中干净地写入“证明...”

也许我被宠坏了amsthm,但我更喜欢能够自由地重命名证明环境,尤其是当有中间语句时。例如:

示例 1:良好行为

\documentclass[11pt]{article}
\usepackage{amsthm}
\newtheorem{prop}{Proposition}[section]
\newtheorem{lem}[prop]{Lemma}

\begin{document}
\begin{prop} \label{eq:prop1}
 Some proposition.
\end{prop}
We prove the above proposition with the help of the following lemma (see [citation]).
\begin{lem}
A useful lemma.
\end{lem}
\begin{proof}[Proof of Prop.~\ref{eq:prop1}]
This is desired behaviour.
\end{proof}
\end{document}

标准环境:原始“证明”被覆盖

svjour3然而,没有这个属性。proof预定义的环境不会省略原始的“证明。”文本,而是将您的添加放在括号中。我的解决方法是使用proofrename一个空名称的证明,并按照他们的建议,使用环境theopargself省略可选参数周围的括号。

示例 2:不良行为

\RequirePackage{fix-cm}
\documentclass[smallextended,envcountsame,envcountsect]{svjour3}    
\smartqed  % flush right qed marks, e.g. at end of proof
\usepackage{graphicx}
\usepackage{mathptmx}      % use Times fonts if available on your TeX system
\usepackage{amsmath,amssymb}

\spnewtheorem*{proofrename}{}{\itshape}{\rm}

\begin{document}

\begin{proposition} \label{prop:prop1}
The \texttt{proof} environment is strange in \texttt{svjour3}.
\end{proposition}
We prove the above proposition with the help of the following lemma (see [citation]).
\begin{lemma}
A useful lemma.
\end{lemma}

\begin{proof}[Proof of \ref{prop:prop1}, Version 1]
Optional arguments do \textit{not} supersede the ``proof'' statement.  
\end{proof}

\begin{theopargself}
\begin{proofrename}[Proof of \ref{prop:prop1}, Version 2.]
Even suppressing the name, there is still some whitespace.  
\end{proofrename}
\end{theopargself}
\end{document}

svjour3 行为:证明没有省略,或者有一些空格

有什么建议可以改善proof环境吗?我知道这是可能的,因为我正在考虑的期刊上有一篇免费文章:请参阅 Z. Ercan 的免费文章积极性

笔记:我看到大多数其他svjour3答案都使用;但是,您避开请求附带的\def模板LaTeX文件而使用。因此,我更喜欢没有的答案,尽管我认识到这可能是不可能的。 svjour3\def\newcommand\def

答案1

仅使用标准命令并利用存储作为扩展的svjour事实:\spnewtheorem*{foo}{Foo}{}{}Foo\fooname

\documentclass[smallextended,envcountsame,envcountsect]{svjour3}
\smartqed  % flush right qed marks, e.g. at end of proof

\spnewtheorem*{xproof}{}{\itshape}{\rmfamily}% the label is assigned later
\newcommand\xprooftitle{}
\renewenvironment{proof}[1][\proofname]
 {\renewcommand\xproofname{#1}\xproof}
 {\endxproof}

\begin{document}
\begin{proposition}\label{prop1}
Some proposition.
\end{proposition}
We prove the above proposition with the help of the following lemma (see [citation]).
\begin{lemma}
A useful lemma.
\end{lemma}
\begin{proof}[Proof of Prop.~\ref{prop1}]
This is desired behaviour.\qed
\end{proof}
\end{document}

在此处输入图片描述

这种方法的优点是,如果 Springer 的员工不喜欢您对 的更改proof,他们只需删除上面的五行即可。在文件中清楚地标记它们,并用注释说明您做了什么:

% I redefine the `proof` environment in order that
% \begin{proof}[Proof of the main theorem]
% produces ``Proof of the main theorem'' and not
% ``Proof (Proof of the main theorem)''
\spnewtheorem*{xproof}{}{\itshape}{\rmfamily}% the label is assigned later
\newcommand\xprooftitle{}
\renewenvironment{proof}[1][\proofname]
 {\renewcommand\xproofname{#1}\xproof}
 {\endxproof}
% Comment the five lines above to restore the default behavior of `proof'

答案2

在下面的例子中,我定义了一个行为类似于证明环境的版本amsmath:没有可选参数,使用的标签是“证明”;如果使用可选参数,则使用其内容(不带括号)作为标签。

\RequirePackage{fix-cm}
\documentclass[smallextended,envcountsame,envcountsect]{svjour3}    
\smartqed  % flush right qed marks, e.g. at end of proof
\usepackage{graphicx}
\usepackage{mathptmx}      % use Times fonts if available on your TeX system
\usepackage{amsmath,amssymb}
\usepackage{etoolbox}

\makeatletter
\BeforeBeginEnvironment{proof}{%
  \def\@Opargbegintheorem#1#2#3#4{#4\trivlist
      \item[]{#3#2\@thmcounterend\ }}%
}
\AfterEndEnvironment{proof}{%
  \def\@Opargbegintheorem#1#2#3#4{#4\trivlist
      \item[\hskip\labelsep{#3#1}]{#3(#2)\@thmcounterend\ }}%
}

\begin{document}

\begin{proposition} \label{prop:prop1}
The \texttt{proof} environment is strange in \texttt{svjour3}.
\end{proposition}
We prove the above proposition with the help of the following lemma (see [citation]).
\begin{lemma}
A useful lemma.
\end{lemma}

\begin{proof}
Without optional argument, the standard ``Proof'' label is used.
\end{proof}

\begin{proof}[Proof of \ref{prop:prop1}, Version 1]
An optional argument supersedes the ``Proof'' label.  
\end{proof}

\end{document}

结果:

在此处输入图片描述

相关内容