Welcome to the UK List of
TeX Frequently Asked Questions
on the Web

Searching

The index of Frequently Asked Questions about TeX is searchable.

Please enter your keyword here:   then press here: ,    or:
Google

Numbers for referenced equations only

There are those who consider that papers look untidy with numbers on every equation; there is also a school of thought that claims that there should be numbers everywhere, in case some reader wants to make reference an equation to which the author made no cross-reference.

If you hold to the “only cross-referenced” school of thought, you can (using the \nonumber command on the relevant equations, or by using the AMSLaTeX unnumbered environments such as equation*) mark those of your equations to which you make no reference. In a long or complex paper, this procedure could well become deeply tedious.

Fortunately, help is at hand: the mh bundle’s mathtools package offers a ‘showonlyrefs’ switch through its \mathtoolsset command; when that’s in operation, only those equations to which you make reference will be numbered in the final output. See the package’s documentation for details of how to make references when the switch is in effect.

mathtools.sty
Distributed as part of macros/latex/contrib/mh (or browse the directory); catalogue entry


Go to previous question, or next question

Go to FAQ home.

URL for this question: http://www.tex.ac.uk/cgi-bin/texfaq2html?label=mathonlyref

Comments, suggestions, or error reports? - see “how to improve the FAQ”.

This is FAQ version 3.27, released on 2013-06-07.