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.

Suppose I have the equations

\begin{align}
 f(x) = x^2
 g(x) = \exp( x )
\end{align}

I would like to use on single label for these lines, and ideally the equation number would be placed vertically between these two lines.

Although this question appears very basic, I have not found an explanation neither via search engines, nor on this website.

share|improve this question

marked as duplicate by mafp, Stefan Kottwitz Mar 4 '13 at 14:58

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.

1  
Amsldoc is a good source for all equation-related things –  JLDiaz Mar 4 '13 at 13:47
    
there's an answer in this question: Show equation number only once in align environment –  barbara beeton Mar 4 '13 at 13:51

2 Answers 2

The very thing you want is the split environment, provided by the amsmath class.

Sample code.

\documentclass{article}
\usepackage[paperwidth=90mm]{geometry}% <-- better demonstrates the vertical alignment
\usepackage{amsmath}
\begin{document}

Eqn.~\eqref{eqn:eqlabel} has a single label split
across the two equations, as you can see here:
\begin{align}
\label{eqn:eqlabel}
\begin{split}
 f(x) &= x^2 ,
\\
 g(x) &= \exp( x ) .
\end{split}
\end{align}

\end{document}

Result.

Sample document using the split environment

share|improve this answer
    
Note: You can also use split not just within the align environment, but also within eqnarray. –  Paul Nov 28 at 21:07
    
That's as maybe, but you should not use eqnarray. –  Niel de Beaudrap Nov 29 at 17:15

You can use an aligned or gathered environment inside an equation:

Sample output

\documentclass{article}

\usepackage{amsmath}

\begin{document}

\begin{equation}
  \label{eq:t}
  \begin{aligned}
    f(x) &= x^2\\
    g(x) &= \exp( x )
  \end{aligned}
\end{equation}

\begin{equation}
  \label{eq:u}
  \begin{gathered}
    f(x) = x^2\\
    g(x) = \exp( x )
  \end{gathered}
\end{equation}

\end{document}
share|improve this answer

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