I am looking for a way to write several centered equations with a left-aligned text on each line. In other words, I would like to mix the functionality of flalign with gather (so the first column would be flushed left, while the second column would be centered), but I have not found a way to do so. Please help.

  • Could we have a minimal (non-)working example? – Bernard Feb 11 '15 at 14:04
  • Are the equations to be numbered? Are the centered equations "aligned" to some tab, or are each of the equations individually centered? – Steven B. Segletes Feb 11 '15 at 14:27

I had asked in a comment whether the centered equations were also aligned, since the approach differs in that case. So here, I show it using both equation and align environments, with my macro \addlefttext[textwidth-fraction]{left text}{equation}.

If using it with the equation environment, there is no need for the optional argument and one should enclose the full equation as the second mandatory argument.

With the align environment, there is some manual tuning, as one can only enclose the left-most field of the aligned equations as the second mandatory argument of \addlefttext. This means that the required leftward shift will depend on the eventual location of that left most align field.

The optional argument provides the fraction of \textwidth to shift the label leftward (relative to the right end of the first align field). The bad news is therefore, that the optional argument must be tuned to the particular align environment. However, the good news is that the tuned fraction is the same for each row of the align environment.

EDITED to remove need for ifthen package.

\addlefttext{My text}{y = mx + b}
\addlefttext{My other text}{E = mc^2}
\addlefttext[.452]{My text}{y} &= mx + b\\
\addlefttext[.452]{My other text}{E} &= mc^2

enter image description here

| improve this answer | |
  • Thank you. Your answer is suitable for some other situations I did not put in the original question as well. – Tunococ Feb 11 '15 at 22:50

You can use a variant of my answer to Aligning equations with left and right comment, adapted to flalign:



    \makebox[\ifcase\expandafter #1\maxcolumn@widths\fi]{$\displaystyle#2$}%


&\text{Straight line} & \Cen{3}{y=mx+q}      && \\
&\text{Parabola}      & \Cen{3}{y=ax^2+bx+c} &&


enter image description here

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.