How to make a hidden reference to an equation, such that \mathtoolsset{showonlyrefs=true}
is overridden (assuming it is active)?
Alternatively, how to switch off showonlyrefs
temporarily (regardless of whether it be set or not)?
How to make a hidden reference to an equation, such that \mathtoolsset{showonlyrefs=true}
is overridden (assuming it is active)?
Alternatively, how to switch off showonlyrefs
temporarily (regardless of whether it be set or not)?
You can use the command \noeqref{<label>}
. This ensures that the corresponding equation has a number regardless of the value of showonlyrefs
.
MWE:
\documentclass[a4paper,12pt]{report}
\usepackage{mathtools}
\mathtoolsset{showonlyrefs=true}
\begin{document}
\begin{equation}\label{eq:ab}\noeqref{eq:ab}
a=b
\end{equation}
%
Some text follows
%
\begin{equation}\label{eq:bc}
b=c
\end{equation}
%
Some text follows again
%
\begin{equation}\label{eq:dc}
d=c
\end{equation}
\end{document}
Output: