Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

This question already has an answer here:

If i do:

\begin{align}
    a = b \\
    b = c \\
    c = d \\
\end{align}

The output will be like:

(1)        a = b
(2)        b = c
(3)        c = d

If I use algin* instead. No row will be enumerated.

Is there a way to get the following output?

           a = b
           b = c
(1)        c = d
share|improve this question

marked as duplicate by Mico, mafp, Charles Stewart, Claudio Fiandrino, Kurt Apr 15 '13 at 11:01

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.

    
See for example tex.stackexchange.com/questions/65207/… and the linked questions. –  Torbjørn T. Apr 15 '13 at 9:36

1 Answer 1

up vote 2 down vote accepted

Rather than choosing which rows to enumerate you could let mathtools enumerate only the equations you reference.

\documentclass{article} 

\usepackage{mathtools}

\mathtoolsset{showonlyrefs}

\begin{document}

\begin{align}
  a = b \\
  b = c \label{eq:unused} \\
  c = d \label{eq:used} % Only this row will be enumerated as it's the
                        % only row that is referenced to.
\end{align}
\eqref{eq:used}

\end{document}
share|improve this answer
    
That's exactly what I was looking for! Than you very much. –  htellez Apr 15 '13 at 11:43
    
It didn't work as well as I expected. All my \refs point to the first \subsubsection above them and no equation is being enumerated. –  htellez Apr 15 '13 at 11:48
    
@htellez Did you try eqref rather than ref? –  N.N. Apr 15 '13 at 13:00
    
That was exactly the problem. Thank you so much. –  htellez Apr 15 '13 at 19:15

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