4

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)?

5

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:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.