For example (abbreviated code),
\newtheorem{prop}{Proposition}
\begin{document}
\begin{prop}
\label{foo}
\end{prop}
In \thref{prop} we saw that.
vs.
In the preceding \envref{prop} we saw that.
\end{document}
\envref{prop} is the command I'm looking for that would substitute the
word 'Proposition'.
The definition of \thref in ntheorem.sty is
\def\thref#1{%
\expandafter\ifx\csname r@#1@type\endcsname\None
\PackageWarning{\basename}{thref: Reference Type of `#1' on page
\thepage \space undefined}\G@refundefinedtrue
\else\csname r@#1@type\endcsname~\fi%
\expandafter\@setref\csname r@#1\endcsname\@firstoftwo{#1}}
Hence you can construct a macro based on that which only inserts the type
name.
\makeatletter
\newcommand*\envref[1]{%
\expandafter\ifx\csname r@#1@type\endcsname\None
\PackageWarning{\basename}{thref: Reference Type of `#1' on page
\thepage \space undefined}\G@refundefinedtrue
\else\csname r@#1@type\endcsname\fi
}
\makeatother
--
Morten
Thank you very much. My low-level TeX/LaTex skills are poor
(non-existant). You really helped me out with the code.
\makeatletter
\newcommand\envref[1]{%
\@nameuse{r@#1@type}%
}
\makeatother
should do the trick.
HTH
Ulrich
--
http://talcum.sarovar.org/ (Current release: 0.5.138 20050911)
Thanks.
I've realized that it is probably incorrect to capitalize Proposition
as a proper noun when I am referring to the class of propositions, as
in "the preceding proposition..." and not a particular instance as in
"Proposition 1".
Is there any way to convert it to the proper case? That is, lower case
unless at the start of a sentence.