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.

This question is basically a combination of two previous posts: Adding left aligned text to an equation. and AMS align / Align multiple “=”, too much space (the latter being my own question).

What I would need is a multicolumn align as discussed (and solved) in the second post linked above plus a left aligned label (text and/or math) as discussed in the first post. And if possible some indent for the left aligned text would be nice. So basically an itemized list with custom text / math instead of bullets and nicely aligned equations as items..

I tried

\begin{flalign}
 &aaaa & bbb &= cccccc && = d\\
 &ee & f &= g && = hh
\end{flalign}

and that gives me the left aligned labels and the other stuff aligned at the equal signs. But the third column is flushed all the way to the right. I guess that's the feature of flalign. Or am I doing something wrong here?

So: How can I get the desired format? Is there a way to combine flalign and alignat? Or are there other ways to do this? (I guess tables etc wouldn't really work here).

share|improve this question
    
I'm preeeetty sure all these "alignment environments" are \haligns under the hood (read: tables). –  morbusg Dec 6 '10 at 17:58
    
Related Question: Left-aligned text inside an equation. –  Peter Grill Jun 15 '12 at 17:30
add comment

2 Answers

It is a bit tricky ...

\documentclass{article}
\usepackage{amsmath}
\begin{document}

\noindent\hrulefill
\begin{flalign*}
\begin{aligned}
 \rlap{aaaa}\\
 \rlap{ee}
\end{aligned} 
&&\arraycolsep=1.4pt
\begin{array}{rll}
bbb &= cccccc &= d\\[\jot]
f   &= g      &= hh   
\end{array} 
&&
\begin{aligned}
\refstepcounter{equation}(\theequation)\\
\refstepcounter{equation}(\theequation)
\end{aligned} 
\end{flalign*}

\end{document}

enter image description here

share|improve this answer
    
Not bad, but the horizontal alignment is not OK. I guess you need some struts. (And I think the OP really wants left aligned labels; this also comes out if you compile his code.) –  Hendrik Vogt Feb 4 '11 at 21:43
    
@Hendrik: thanks, the \jot was missing ... –  Herbert Feb 4 '11 at 21:52
add comment

Since alignat allows you to specify the spacing, what about:

\begin{alignat}
 &aaaa \qquad\qquad& bbb &= cccccc && = d\\
 &ee & f &= g && = hh
\end{alignat}

Not perfect (the labels are not left flushed) but...

Another solution is to replace the normal equation numbering by your labels:

\begin{alignat}{2}
\tag*{aaaa}   bbb &= cccccc && = d\\
\tag*{ee}   f &= g && = hh
\end{alignat}

EDIT: note that the latest solution requires to pass the leqno option to the amsmath package...

share|improve this answer
add comment

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.