Discussion:
Theorem-like environment referenced by name (rather than number)
(too old to reply)
Kurio
2005-08-06 23:34:52 UTC
Permalink
I'd like to be able to define a theorem-like environment in LaTeX, such
that:
*) when I reference a theorem in the text, the \ref gets expanded into
the theorem's *name* (i.e. that given as optional argument) rather than
number
*) (possibly) numbering of theorems is not displayed

An example, just to be more clear.
If I introduce a theorem with something like:
\begin{theorem}[mytheorem] \label{th:myth}
...
\end{theorem}
and reference to it with \ref{th:myth} I'd like to get a "mytheorem"
string, rather than the theorem's number.

Anyone can suggest how to properly do it in vanilla LaTeX (or using some
extra package)? I googled a bit but couldn't find anything suitable.
Thanks in advance for any suggestion you may have.

Kurio
Morten Høgholm
2005-08-06 23:37:44 UTC
Permalink
Post by Kurio
I'd like to be able to define a theorem-like environment in LaTeX, such
*) when I reference a theorem in the text, the \ref gets expanded into
the theorem's *name* (i.e. that given as optional argument) rather than
number
*) (possibly) numbering of theorems is not displayed
An example, just to be more clear.
\begin{theorem}[mytheorem] \label{th:myth}
...
\end{theorem}
and reference to it with \ref{th:myth} I'd like to get a "mytheorem"
string, rather than the theorem's number.
Anyone can suggest how to properly do it in vanilla LaTeX (or using some
extra package)? I googled a bit but couldn't find anything suitable.
Thanks in advance for any suggestion you may have.
The ntheorem package has such a feature. Look up \thref in its manual.
--
Morten
Kurio
2005-08-07 18:14:12 UTC
Permalink
Post by Morten Høgholm
Post by Kurio
I'd like to be able to define a theorem-like environment in LaTeX,
[...]
Anyone can suggest how to properly do it in vanilla LaTeX (or using
some extra package)? I googled a bit but couldn't find anything
suitable.
Thanks in advance for any suggestion you may have.
The ntheorem package has such a feature. Look up \thref in its manual.
I've tried it. It's not exactly what I was looking for, but it was
nonetheless very useful as I managed to borrow from some of its macros
to write something that does exactly what I need.

Thanks for the reference: this newsgroup is really helping improving my
[La]TeX skills a lot!

Kurio

Loading...