Math & ScienceLabel two Equations in the Middle

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
User avatar
toastermm
Posts: 8
Joined: Wed Feb 02, 2011 5:37 pm

Label two Equations in the Middle

Post by toastermm »

Again, my advisor wants specific formatting... arg. I have two equations and want to label them both together. I would like the label to be on the normal right side, but be in between the two equations. I know it can be done, because I've seen it done (albeit not the code).

What I've tried to do is:

Code: Select all

\begin{align} \label{Equation1}
f(x) = x, \\
g(x) = x. \notag
\end{align}
Which returns something to the effect of:

f(x) = x, (Eq. 1)
g(x) = x.

This is *almost* what I want, except the label is across the first equation, not in the middle. Any ideas?
Last edited by toastermm on Sat Nov 19, 2011 10:10 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Label two Equations in the Middle

Post by Stefan Kottwitz »

You could used an aligned environment within an equation environment, such as

Code: Select all

\begin{equation}
  \begin{aligned} \label{Equation1}
    f(x) &= x \\
    g(x) &= x
  \end{aligned}
\end{equation}
The aligned environment makes an unnumbered multiline equation block within math mode, and the outer equation environment produces the equation number.

Stefan
LaTeX.org admin
User avatar
toastermm
Posts: 8
Joined: Wed Feb 02, 2011 5:37 pm

Re: Label two Equations in the Middle

Post by toastermm »

Perfect, thank you.
Post Reply