How can I retrieve the name of a theorem?
I know how to refer to theorems using labels and take the responsibility of giving the title "Theorem" or "Lemma" myself. I also know that packages such as ntheorem
can go further, and put the name "Theorem" or "Lemma" and then keep the consistency for me. However, I could not find a package that allows me to define a theorem and recover its title.
For example, take the following snippet:
\begin{theorem}[Rely-to-Atomic] For any predicate @{term "p"}, and relations @{term "r"}
and @{term "q"}, such that @{term "❙[p,q❙]"} tolerates interference @{term "r"},
\begin{IEEEeqnarray*}{c}
@{thm (concl) Law_7_4_Rely_To_Atomic_Ref}
\end{IEEEeqnarray*}\label{RTA_Ref}
\end{theorem}
After the system processing the funny quotations within @ blocks, this generates the corresponding latex and compiles to:
What I want is a way of retrieving the string "Rely-to-Atomic" from the label RTA_Ref
. If I have that, I can reference theorems including the title for the convenience of my reader. For example, by typing:
Law~\ref{RTA_Ref}~(\nameofthm{RTA_Ref})
To obtain:
Law 3.95 (Rely-to-Atomic)
Since I know that some packages are able to provide a table of theorems, I believe that there should be a way of accessing the title of a theorem or then a package that fits this purpose.