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.

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?

share|improve this question
    
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 '12 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 '12 at 16:17
    
Sorry! It's alignedat without the * –  egreg Jul 11 '12 at 16:38

1 Answer 1

up vote 4 down vote accepted

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

share|improve this answer
    
This worked great, thanks! –  Gabriel Jul 11 '12 at 17:04

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.