Tell me more ×
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.

I am using align*, but I still need an equation number. I know one solution is to use align and add \nonumber to all lines but the last. Is there a 'lazy' way to do it?

I searched a little and found similar ones suggesting use split: Show equation number only once in align environment

Unfortunately, due to the page break issue I have, I need to use align, because split won't auto page break, as described in Long equation does not page break.

share|improve this question

2 Answers

up vote 19 down vote accepted

Use \tag:

\documentclass{article}
\usepackage{amsmath}
\newcommand\numberthis{\addtocounter{equation}{1}\tag{\theequation}}
\begin{document}
\begin{align*}
a &=b \\
  &=c \numberthis \label{eqn}
\end{align*}
Equation \eqref{eqn} shows that $a=c$.
\begin{equation}
d = e
\end{equation}
\end{document}

See page 3 of the amsmath package documentation for details.

share|improve this answer
this \numberthis works beautifully. Thank you very much! – cpp initiator Jan 29 '12 at 22:16

Here are minimal working examples that I use. This is what I have as a header

\documentclass[12pt]{amsart}

\usepackage{amsmath,amsfonts,amssymb,epsfig}
\usepackage{graphicx}
\usepackage{hyperref}
%\usepackage{srcltx}
\hypersetup{colorlinks}
\usepackage{color}

Two equations each with separate equation numbers and separate reference labels

\begin{align}
        \dot{a} &  =2\alpha(t)\eta\label{classicalmotion1}\\
        \dot{\eta} &  =-2\gamma(t)a\label{classicalmotion2}%
\end{align}%

Two equations with single equation number and single reference label

\begin{equation}
        \begin{aligned}
        \dot{A} &  =2i\alpha(t)B\\
        \dot{B} &  =2i\gamma(t)A
        \end{aligned}
\label{eqn2.qo}
\end{equation}

I am guessing you know how to do the one without equation numbers.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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