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 want to create subequations and allign them such that nice 'inquality constraints' arise. My current code:

a & \le b & \le c \label{eq:constr1}\\
d & \le effff & \le f \label{eq:constr1}\\

The result in PDF is a much too large distance between "b and c" and "efffff and f". I would like to have \le exactly below eachother. Have b and effff centered between those. Finally a and d should be right aligned to the \le and c and f should be left aligned to the \le.

share|improve this question
Leave the second & out. The columns in align (and family) are rlrlrl… aligned. Or use aligned and a & \le b && \le c. – Qrrbrbirlbel Dec 2 '12 at 21:50
Also, don't use the same \label ("eq:constr1") more than once. – Mico Dec 2 '12 at 21:52
… or (“centering for b and e”) use simply a \le b & \le c (i.e. leave the first & out). Related: alignat examples, more complex case of alignments – Qrrbrbirlbel Dec 2 '12 at 21:58
In reality b and e are strings of unequal length, sorry for not mentioning that. – Martijn Dec 2 '12 at 22:14
@Martijn Well, a minimal working example (MWE) could help out and maybe an image of what you actually want to achieve. – Qrrbrbirlbel Dec 2 '12 at 22:19

If you want the middle column to be centered than you need to either resort to using a \makebox to reserve enough width for that column, which requires knowing what the widest element is beforehand, or to use an array:

enter image description here


  • The alignat provides pairs of rl aligned equations. Since we want the third column to be left aligned, we need to use a && to skip past the prior column that would have been right aligned.
  • For the array solution we need to use {} to make the inequality symbols be treated as relational operators, similar to the difference in spacing of $-x$ and ${}-x$.
  • The calc package was used for the \widthof{} macro, so is only required for the alignat solution.
  • As Qrrbrbirlbel commented, you could make use of the array package and incorporate the required {} into the column specification, as shown in the last example in the code below.



You can use \verb|alignat|:
    a & \le \WideAs{b}     && \le c \\
    d & \le \WideAs{effff} && \le f 
Or use \verb|array|:
    a \le {}& b     &{} \le c \\
    d \le {}& effff &{} \le f 
Alternatively using the \verb|array| package:
    a \le & b     & \le c \\
    d \le & effff & \le f 
share|improve this answer
You could use {r<{{}}@{}c@{}>{{}}l} (array package) to mimic the behavior of *align* and wouldn’t have to manually insert {}. And you might point out that alignat does provide equation numbers quite easier than array. – Qrrbrbirlbel Dec 3 '12 at 3:05
@Qrrbrbirlbel: Thanks, incorporated that as well. – Peter Grill Dec 3 '12 at 3:11
Thank you so much! The equations however are compressed in height as would normally don for using $some-equation$. What would be a solution to keep the proper full size? – Martijn Dec 3 '12 at 9:26
@Martijn: I do not know why you think the equations are compressed. The solutions here produce the correct display mode math spacing. If you are using inline math (as is the case $some-equation$, then the equations are compressed in order to not alter the interline spacing of a paragraph. – Peter Grill Dec 3 '12 at 9:33
If you still think they are compressed I would recommend you post a follow up question and be sure to include a minimum working example including \documentclass and the appropriate packages that illustrates this compression. It should start with \documentclass{} and end with \end{document}. – Peter Grill Dec 3 '12 at 9:34

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.