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.

To typeset some displayed equations, only the array environment was powerful enough. However, the spacing of the array environment doesn't match the spacing of the align environment.

How do I set the spacing of the array environment, such that equals the vertical spacing of the align environment.

For instance:

\begin{align*}
a & = b + c \\
d & = e + f
\end{align*}

and

\[\begin{array}{rl}
a & = b + c \\
d & = e + f
\end{array}\]

have different spacing.

share|improve this question
    
array is not the right way to typeset equations (as you've discovered). You should instead ask how to typeset the particular equations you want typeset. –  TH. Dec 25 '10 at 14:13
    
@TH. For the equation I wanted to set, see tex.stackexchange.com/questions/7730/… –  bas Dec 25 '10 at 14:57
add comment

1 Answer

up vote 2 down vote accepted
\documentclass[12pt]{article}
\usepackage{amsmath}

\begin{document}

\begin{align*}
a & = b + c \\
d & = e + f
\end{align*}

\[
\begin{array}{rl}
a & = b + c \\
d & = e + f
\end{array}
\]

\arraycolsep=1.4pt
\def\arraystretch{1.2}
\[
\begin{array}{rl}
a & = b + c \\
d & = e + f
\end{array}
\]
\end{document}
share|improve this answer
    
The horizontal space is now correct. Thanks. However, the vertical spacing still differs. A propos: where did you find the 1.4pt? –  bas Dec 25 '10 at 14:32
    
see example with defining the array stretch –  Herbert Dec 25 '10 at 14:43
    
Thanks again! The spacing is not exactly the same, though. See img143.imageshack.us/img143/7700/aboutright.png I've colored the {array} one red and moved it on top of the original {align*}. –  bas Dec 25 '10 at 15:16
    
It seems to work in the intended situation though. ( See tex.stackexchange.com/questions/7730/… ) –  bas Dec 25 '10 at 19:50
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.