TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
up vote 3 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.