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 have a set of equations, where each line consists of a formula and an explanation (info about indices). Now, let's say the structure looks like this:

    &\framebox[0.4\lw]{Formula 1} & \framebox[0.3\lw]{Info 1}& \\
    &\framebox[0.7\lw]{Formula 1} & \framebox[0.1\lw]{Info 1}& \\
    &\framebox[0.5\lw]{Formula 1} & \framebox[0.2\lw]{Info 1}&

This results in two columns of widths 0.7\lw and 0.3\lw, so the equation will be too wide for the page: output of the example code (too wide)

Yet, no single line is wider than 0.8\lw, so there is enough space if the two columns could "slide into each other", like this: desired output

In essence, I need some equiv. of \hfill between the two parts - but \hfill does not work here...

My question is whether there is a way to do this, i.e. to create a flexible space that would keep the left and right aligns. Note that the first align would typically be somewhere inside the formula, not in front of it.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

I wouldn't put the conditions flush right, but if you really insist, you can use flalign:

\qquad A&=\mathrlap{B} &\text{condition}\\
\qquad C&=\mathrlap{D} &\text{cond}\\
\qquad E&=\mathrlap{F} &\text{some longer condition}

Change the \qquad into some other spacing command that suits your needs.

This needs the package mathtools

share|improve this answer
Thanks, this helped! (Ironically, I looked at mathtools today, to check \smashoperator, but have not thought of this..) –  Michal Kaut Oct 27 '11 at 13:23

Your Answer


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.