I have a document in which I have a named proposition, which I wish to reference by its acronym. Since it is named, it ought not be numbered. Still, I'd like to reference it using a cross-reference, rather than hard-coding the acronym, in case I change it (so it gets updated everywhere) or remove it (so I get a warning).
The best I've been able to come up with uses a combination of thmtools
, cleveref
and manual definitions of the cleveref
reference format and of the representation of the relevant LaTeX counter.
All of this seems rather circuitous and - at least in the case of the counter, which I don't even need - unnecessary. However, no simpler approach seems to work.
Dropping the following are NOT really viable options for me at this point as lots now depends on them: mathtools
, amsthm
and cleveref
.
However, thmtools
can be dropped if, for some reason, a nicer solution is possible without it. (I only started using it to try to deal with this case - I can easily revert to plain amsthm
.)
Loading hyperref
is NOT an option, as I can't submit a paper to a journal if it's got hyperlinks. So, even if this would help, I can't use such an approach.
MWE:
\documentclass{article}
\usepackage{mathtools,amsthm,thmtools,cleveref}
\declaretheorem[numbered=yes, name=Big Friendly Giant, refname={BFG,BFG}]{bfg}
\crefformat{bfg}{#2BFG#3}
\let\thebfg\unskip
\begin{document}
\begin{bfg} Big Friendly Giant theorem \label{thm:bfg}
\end{bfg}
Here's a reference: \cref{thm:bfg}.
\end{document}
Note that this output is both what I get and what I want. What is the most elegant way to get it?
If I use numbered=no
or numbered=unless unique
, I get an unnumbered proposition (good), but no cross-reference (bad). If I don't redefined \thebfg
, I get a cross-reference (good), but a numbered proposition (bad). If I set \thebfg
to \relax
, I get an unwanted space, which \unskip
gets rid of. And so on. That is, hackish though this code is, it is the most elegant - or the least inelegant - I've been able to come up with.
bfg
theorem/proposition asBFG
then; I do not think that this is what you have in mind? As another solution I suggest to use a normal environment that only 'fakes' the look of a theorem.