我想重复一个定理编号,并添加一个星号。也就是说,原始定理是:
定理1。錯誤!
我希望类似定理是:
定理1*。錯誤!
答案1
有一种可能性是:
\documentclass{article}
\usepackage{amsthm}
\usepackage{thmtools}
\declaretheoremstyle[
spaceabove=6pt,
spacebelow=6pt,
headfont=\bfseries,
notefont=\mdseries, notebraces={(}{)},
bodyfont=\itshape,
]{mystyle}
\let\variant\relax
\declaretheorem[style=mystyle]{theorem}
\declaretheorem[
name={Theorem~\variant{$^\ast$}},
style=mystyle,
numbered=no,
]{theorem*}
\newenvironment{rtheorem}[1]
{\newcommand\variant{\ref{#1}}\begin{theorem*}}
{\end{theorem*}}
\begin{document}
\begin{theorem}
A test regular theorem.
\end{theorem}
\begin{theorem}[Euler's identity]
\label{thm:euler}
$e^{i\pi} + 1 = 0$
\end{theorem}
\begin{theorem}
Another test regular theorem.
\end{theorem}
\begin{rtheorem}{thm:euler}[Euler's identity revisited]
$e^{i\pi} = -1$
\end{rtheorem}
\begin{theorem}
Yet another test regular theorem.
\end{theorem}
\end{document}
核心思想是使用机制来对先前陈述的定理进行变型。使用环境生成“常规”定理;使用定理生成给定定理的变型,该定理具有用于标记原始定理的字符串作为强制参数(两个环境\label
都接受默认的可选参数)。\ref
theorem
rtheorem