I'm writing out a collection of theorems and their proofs corresponding to several theorems that appear without proof (or with only minimal proof sketches) in a published book. I am using thmtools to specify the theorem and proof environments.
Of course, it is important that the numbering of the theorems in my write-up matches the numbering of the corresponding theorems in the original text. Many of the theorems in this book come in "dual pairs", and the book uses the typographic convention illustrated by this example: Theorem VI.2.1* is the theorem dual to theorem VI.2.1.
Is there some way to define (through thmtools) a "dual theorem" environment that would produce the correct "starred" theorem number for it?
Edit: FWIW, here's the definition I'm using for my theorem environment:
\declaretheoremstyle[%
spaceabove=4ex%
]{thmstyle}
\declaretheorem[%
name={Theorem},%
numberwithin=section,%
style=thmstyle,%
]{thm}
P.S. it would be insanely cool if this environment could also automatically produce the statement of the dual theorem based on the statement of the original theorem, and even the proof from the original proof, but that would really be pushing the LaTeX envelope... :)
Edit2: Here's my attempt to implement egreg's suggestion:
%% the following block is meant to replace egreg's original
%% \newtheorem*{dualthm*}{Theorem \dualnumber\rlap{*}}
\declaretheorem[%
name={Theorem \dualnumber\rlap{*}},%
style=thmstyle,% %% see earlier Edit for the definition of thmstyle
unnumbered,%
]{dualtheorem}
%% `dualthm` below is almost identical to egreg's `dualthm`, except that
%% it refers to `\dualtheorem` instead of `\dualthm*`.
\newenvironment{dualthm}[1]
{\newcommand\dualnumber{\ref{#1}}\begin{dualtheorem}}
{\end{dualtheorem}}
Unfortunately, it fails with:
! Undefined control sequence.
\thmt@thmname ->Theorem \dualnumber
\rlap {*}
l.50 ]{dualtheorem}
?
I understand (I think) what egreg's scheme is doing, but I don't see how to translate it to thmtools, since, unlike newtheorem*
, thmtool's declaretheorem
apparently won't allow a mention of an undefined symbol in its specification. BTW, I tried multiple variants of the above, all of which failed for one reason or another. Then again, I'm a rank n00b at this, so it is very likely that I am missing something obvious. If so, please let me know.
[restate=...]
and the restated version is marked by having its number starred? (What happens to subordinate equation numbers? I can't even remember whatthmtools
does in that case, I hate restate that much :D )\dualnumber
.