I would like to suppress equation numbers for unlabeled (or better, unreferenced) equations but keep the equation count going. I am using the align environment throughout. Imagine \mathtoolsset{showonlyrefs} but with an equation number increment for every equation not just the visibly tagged ones.

(I prefer equation numbers everywhere, my coauthor does not; in this way we could keep the equation numbers synchronized while preparing the draft.)

  • Possible duplicate: How do I number equations only if they are referred to in the text?
    – Werner
    May 19, 2016 at 20:37
  • 1
    @Werner - I don't think it's a duplicate: I'm interpreting the OP's phrase "keep the equation count going" as meaning that equation numbers should be incremented but not shown. However, I may be wrong. Let's see if the OP weighs in with more information.
    – Mico
    May 19, 2016 at 20:40
  • 1
    @Mico: True. I've retracted my vote.
    – Werner
    May 19, 2016 at 20:46
  • As far as I understand, this seems to be needed during document preparation, when the presence of equation numbers should not bother your coauthor. For the final version, having numbers jumping up almost at random will confuse readers.
    – egreg
    May 19, 2016 at 21:01
  • @egreg: yes. A submission for review will have all equations numbered. A publication will presumably have only the referenced ones with no jumps, as usual. That is the origin of the conundrum.
    – user66081
    May 19, 2016 at 21:06

1 Answer 1


You could load the mathtools package and use the \newtagform macro to create a new, "hidden", tag form for equation numbers. With the code shown below, use \usetagform{hidden} to suppress the showing of equation numbers and use \usetagform{default} to revert to default mode.

"Hidden" equation numbers will show when cross-referenced with \ref, \eqref, etc. Of course, readers may become rather confused if they see equation numbers shown in cross-references but not by the side of the actual equation...

enter image description here


\newcommand\hidden[1]{} % this macro doesn't do anything with its argument



A cross-reference to equation \eqref{eq:pyth}.
  • Thank you for the suggestion. This is roughly what it should look like. However, a referenced equation should indeed have a visible tag. And an automatic solution similar to \mathtoolsset{showonlyrefs} that can be turned on and off (eventually, depending on where the tex file is compiled) is of course preferable.
    – user66081
    May 19, 2016 at 20:57
  • 1
    This is the exact opposite of what the OP asked. Besides, it is a manual solution. Showing an equation number only when it is referenced, automatically, is probably more difficult.
    – Marijn
    May 19, 2016 at 21:51
  • 2
    @Marijn - My answer was based on the OP's initial write-up, which was not exactly clear as to what was supposed to be achieved. Since then, the OP has (a) augmented the posting with additional, important explanations and (b) clarified his/her objectives further via a comment left below my answer. (Please check the time stamps if you wish to verify these assertions.) To say that my answer is the exact opposite of what the OP asked is more than a bit unfriendly.
    – Mico
    May 19, 2016 at 22:04
  • Why answer if it is "not exactly clear as to what was supposed to be achieved"? But thanks for the newtagform / usetagform idea.
    – user66081
    May 21, 2016 at 9:28
  • @user66081 - I didn't fully realize how unclear the question was until after you started revising the posting. If I had, I wouldn't have posted an answer that wasn't likely to meet your objective. Would you like me to delete this answer?
    – Mico
    May 21, 2016 at 9:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .