我知道还有其他方法可以引用理论证明,但我想知道如何使用这个“ \newproof{pot}{定理证明 \ref{thm2}}”。如果我把它放在序言中,并通过 \begin{pot} ... \end{pot} 创建证明环境,它将引用所有 thm2 证明。
答案1
您可以使用\newproof
取决于可重新定义的宏的文本来定义一个通用环境。
\documentclass{elsarticle}
\newtheorem{theorem}{Theorem}
\newcommand{\proofofref}{}
\newproof{zproofof}{Proof of \proofofref}
\newenvironment{proofof}[1]
{\renewcommand{\proofofref}{#1}\zproofof}
{\endzproofof}
\begin{document}
\begin{theorem}\label{1+1}
$1+1=2$
\end{theorem}
\begin{theorem}\label{twins}
There exist infinitely many twin primes.
\end{theorem}
\begin{proofof}{Theorem \ref{twins}}
It's really easy, isn't it?
\end{proofof}
\begin{proofof}{Theorem \ref{1+1}}
Too difficult.
\end{proofof}
\end{document}