Math & ScienceEquation number (two lines equation)

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
zhiwanxu
Posts: 16
Joined: Thu Aug 07, 2008 5:14 pm

Equation number (two lines equation)

Post by zhiwanxu »

I like to have (a) and (b) aligned and have the equation number 5 aligned with the the first line not in the center of two lines. How do I raise the equation number?

\begin{equation}
\label{5}
\begin{array}{llll}
(a)
& 2H(n, p)nn
& Q_{\rm m}=-2.2246
& E_{\rm b}=6.2572 \\
(b)
& 2H(n, nn)1H
& Q_{\rm m}=-2.2246
& E_{\rm b}=6.2572
\end{array}
\end{equation}

See reaction \ref{5}.

Thanks.

Recommended reading 2024:

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

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

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Equation number (two lines equation)

Post by localghost »

You can raise the number by tagging only one line of the equations. But for your purpose I think that there is an alternative.

Code: Select all

\documentclass[11pt,a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}

\begin{document}
  \begin{alignat}{3}\label{eqn:dummy}
    (a) &\quad 2H(n,p)nn &\quad Q_\text{m} &= -2.2246 &\quad E_\text{b} &= 6.2572 \\
    (b) &\quad 2H(n,nn)1H &\quad Q_Z\text{m} &= -2.2246 &\quad E_\text{b} &= 6.2572 \notag
  \end{alignat}

  \begin{subequations}
    \begin{alignat}{3}\label{eqn:dummy-sub}
      &\quad 2H(n,p)nn &\quad Q_\text{m} &= -2.2246 &\quad E_\text{b} &= 6.2572 \\
      &\quad 2H(n,nn)1H &\quad Q_Z\text{m} &= -2.2246 &\quad E_\text{b} &= 6.2572
    \end{alignat}
  \end{subequations}
\end{document}

Thorsten
zhiwanxu
Posts: 16
Joined: Thu Aug 07, 2008 5:14 pm

Re: Equation number (two lines equation)

Post by zhiwanxu »

Problem is solved! I used "tbtags" option to display equation number on the first line, not on the center.

\begin{equation}
\label{5}
\begin{split}
& (a) 2H(n, p)nn
& \quad Q_{\rm m}=-2.2246
& \quad E_{\rm b}=6.2572 \\
& (b) 2H(n, nn)1H
& \quad Q_{\rm m}=-2.2246
& \quad E_{\rm b}=6.2572
\end{split}
\end{equation}

See reaction \ref{5}.

Thansk.
Post Reply