Selectively turn off hyperref links
Instead of \ref*
use \@refstar
:
\makeatletter
\let\ref\@refstar
\makeatother
Why? hyperref redefines \ref
this way.
\DeclareRobustCommand\ref{\@ifstar\@refstar\T@ref}%
\@ifstar
is a LaTeX command which tests if the next character is a *
. In this case the *
would be gobbled and the first of the following commands will be executed (\@refstar
), otherwise the second (\T@ref
).
Thus, \ref*
is essentially the same as \@refstar
und you could use that instead.
If one would like to go deeper: the source code documentation of hyperref (or hyperref.dtx
on CTAN or on your local TeX system) tells that \HyRef@StarSetRef
belongs to \ref*
and would not be linked, and \@refstar
is defined this way:
\def\@refstar#1{%
\HyRef@StarSetRef{#1}\@firstoffive
}
Just for the record, another simple way defined within the hyperref package
would be to do the following:
\begin{NoHyper} %% hyperref hyperlinking disabling environment!
\begin{equation}
\label{eq:one}
e^{i\pi} + 1 = 0
\end{equation}
\end{NoHyper}
Agreed, this won't disable all the necessary equation hyperlinks in one shot, but if needed a hyperref
has already made it available for you, if you don't mind a bit of manual labour.