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.

Consider the following code:

\begin{align}
f_1(x) &= \frac{15x}{3} \\
f_2(x) &= 3x + 5 \\
f_3(x) &= 4x + 13
\end{align}

This produces three lines where the first line takes up more vertical space than the others. Is there any way to make all the lines take the same vertical space (meaning effectively all lines take as much vertical space as the largest one)?

share|improve this question
add comment

3 Answers

up vote 12 down vote accepted

I don't know of an automatic way to do this, but in a particular case, you can use \vphantom to effect this.

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align}
f_1(x) &= \frac{15x}{3} \\
f_2(x) &= \vphantom{\frac11}3x + 5 \\
f_3(x) &= \vphantom{\frac11}4x + 13
\end{align}
\end{document}

alt text

share|improve this answer
3  
“These fracs go to eleven” ;-) –  Konrad Rudolph Jan 17 '11 at 20:46
add comment

if you do not want it globally changed put it into {...}

\documentclass{article}
\usepackage{amsmath}
\begin{document}

\savebox\strutbox{$\vphantom{\dfrac11}$}
\begin{align}
f_1(x) &= \frac{15x}{3} \\
f_2(x) &= 3x + 5 \\
f_3(x) &= 4x + 13
\end{align}

\end{document}
share|improve this answer
    
Despite the additional white space below the display, this is definitely most elegant. –  Hendrik Vogt Jan 17 '11 at 14:28
add comment

I can offer a variant of TH's answer that produces a bit less vertical space, but it is adjusted to your particular situation: Only the second line needs a bit of additional depth. The advantage of this more special adjustment is that it doesn't produce additional white space below the display.

\documentclass{article}
\usepackage{amsmath}
\begin{document}
Here's some text just to fill the line sufficiently
\begin{align}
f_1(x) &= \frac{15x}{3} \\
f_2(x) &= 3x + 5 \vphantom{\smash[t]{\frac11}} \\
f_3(x) &= 4x + 13
\end{align}
Here's some text just to fill the line sufficiently
\end{document}

share|improve this answer
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.