I would like to repeat a theorem number with an added asterisk. That is, the original theorem is:
Theorem 1. Lorem ipsum...
And I would like the analogue theorem to be:
Theorem 1*. Lorem ipsum...
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.
Sign up to join this communityHere's one possibility:
\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}
The central idea is to use the \label
, \ref
mechanism for a variation of a previously stated theorem. The "regular" theorems are produced using the theorem
environment; a variation of a given theorem is produced using the rtheorem
theorem which has as mandatory argument the string used to label the original theorem (both environments admit the default optional argument).
\begin{rtheorem}{<label>}[<opt>]
would avoid the need of having different cases: just do \newcommand{\variant}{\ref{#1}}{\begin{theorem*}
and \begin{theorem*}
will take care of the optional argument.
– egreg
Jan 19 '14 at 20:04