TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Possible Duplicate:
How do I number equations only if they are referred to in the text?

While I am writing a document, I like to use align rather than align* and label them for all equations that I write in case I need to refer to them later in the document. I end up not referencing some of the equations I have labeled. I was wondering if there is an easy way to strip equation numbers for equations that are not called using eqref anywhere in the document?

I can imagine this can be a difficult task where LaTeX will have to keep a list of labels and a list of eqrefs and then unless the document is changed between compilations, "un-number" the ones in its list of labels that are not found in the list of eqrefs.

Well, worth asking anyway! :)

share|improve this question

marked as duplicate by Torbjørn T., N.N., lockstep, Stefan Kottwitz Nov 1 '11 at 11:32

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

up vote 8 down vote accepted

You can use the option showonlyrefs in the package mathtools. See §3.2.2 "Showing only referenced tags" in the manual for details.





See \eqref{eq:1}.




share|improve this answer
Wow! That is amazing. Thank you. – tchakravarty Nov 1 '11 at 8:10

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