8

I'm trying to get the following equation aligned two times per line and also I want to assign a single number to the equation. This is the code I have:

 \begin{alignat*}{2}
  [M/H] &\cong\; 0.917 [Fe/H] &(1)\\
   &\cong\; 0.977 [Fe/H] &(2)\\
   &\cong\; [Fe/H] + log(0.638f_{\alpha}+0.362) \;\;\;&(3)
 \end{alignat*}

This produces the properly aligned equations but no numbering. If I remove the asterisks I get one number for each line, which I don't want.

I've tried wrapping the above statement inside a \begin{equation} \end{equation} command, but it won't work. Ideas?

3
  • Use alignedat* with the exact same syntax wrapped inside an equation environment. However the \; after \cong are wrong and "log" should be input as \log.
    – egreg
    Jul 11, 2012 at 15:55
  • The alignedat* command gives an undefined error. Are you sure that the right command? The \; are correct, I want those spaces in the equation.
    – Gabriel
    Jul 11, 2012 at 16:17
  • 1
    Sorry! It's alignedat without the *
    – egreg
    Jul 11, 2012 at 16:38

1 Answer 1

8

Use the alignedat environment:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation}
\begin{alignedat}{2}
  \textup{[M/H]} &\cong 0.917 \textup{[Fe/H]} &&(1)\\
   &\cong 0.977 \textup{[Fe/H]} &&(2)\\
   &\cong \textup{[Fe/H]} + \log(0.638f_{\alpha}+0.362) \quad&&(3)
 \end{alignedat}
\end{equation}
\end{document}

The \; commands you're using are wrong, as they introduce an asymmetric space. Also the chemical symbols should be upright.

enter image description here

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .