I'm writing all my equations with

\begin{equation} ... \end{equation}

so all of them are numbered but only some of them are labeled. I don't want all of them with numbers but only the labeled ones.

Since I have a real big document I don't wanna do this manually using * for all the others. How can I do this automatically?

  • Since it seems that the answer by Bernard wasn't useful to you, please provide a minimal (non-)working example (MWE) showing the issue. Only then we can really help you. – yo' Aug 15 '14 at 0:37

You have a possibility, with the mathtools package (that loads amsmath, so it's useless to load the latter): write


in your preamble, and only the referenced equations will be numbered (use \eqref). It's not exactly what you ask (number labelled equations), but you can try to make ‘fake references’ at the very end of your document.

| improve this answer | |
  • Thanks for your answer. I tried that and equations are referred non of them have numbers – David Aug 14 '14 at 23:38
  • You mean non-referred equations have no number, I suppose? Your comment isn't quite clear to me. – Bernard Aug 14 '14 at 23:43
  • I mean, I have numbers in my text referring to equations but my equations don't have numbers anymore – David Aug 14 '14 at 23:52
  • Could you post a Minimal Working Example? – Bernard Aug 14 '14 at 23:55
  • 1
    Btw, did you think of using eqref rather than ref? – Bernard Aug 15 '14 at 0:11

No warranty. ;-)



\text{this has a number}\label{a}
\text{this hasn't}

enter image description here

| improve this answer | |
  • This is awesome but it failed for 'aligns' and for some reason links in my document don't lead to the right places anymore (I'm using \usepackage{hyperref}) – David Aug 14 '14 at 23:50
  • @David You just mentioned equation, didn't you? I can't guess what you're using in your document. Besides, do you really mean to number only the labeled equations in an align? – egreg Aug 15 '14 at 9:21

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.