# How to put several lines in the numerator of a fraction?

When I use \\ it breaks the frac layout. Now I come up with the following solution:

$$\frac{{O\vdash e_1:T_1 \atop O[T_1/x]\vdash e_2:T_2}}{O\vdash (let\ ((x e_1))\ e_2):T_2}$$


But it gives two lines with smaller font, and I need all 3 of them to be equal-sized.

### UPDATED:

Also it will be needed to place more than two (three or four) lines into the numerator of a frac.

you can use the aligned sub-environment from amsmath"

\frac{\begin{aligned} O&\vdash e_1:T_1 \\ O[T_1/x]&\vdash e_2:T_2 \end{aligned}}% {O\vdash (let\ ((x e_1))\ e_2):T_2}


(your question ended abruptly, so there may have been more specifications that i wasn't aware of.)

if you wish these lines to be centered, then use gathered rather than aligned (and omit the &s).

both aligned and gathered can accommodate any number of lines, even more than four, although it seems to me that this probably gets too complicated.

remember that the baseline is still relative to the math axis (which is coincident with the fraction rule), so all extra lines will continue to rise above the rest of the displayed expression, and if that part of the expression is in parentheses, the parentheses will be unattractively empty below the line.

• Instead of this, splitfrac command from mathtools is here for the occasion. \frac{\splitfrac{}{}}{}. And \splitdfrac{}{} if you want it in displaymath. Feb 7, 2013 at 19:41
• How to align them by centre, instead of right border? Feb 7, 2013 at 19:49

Package mathtools provides a proper command, I will give an example soon

[Update}

Here goes the unswer posted by Manuel: \splitfrac{〈numer〉}{〈denom〉} is what you are wanting to. Then:

$\frac{\splitfrac{O \vdash e_1 : T_1}{O[T_1/x] \vdash e_2 : T_2}} {O \vdash (let\ ((x e_1)) \ e_2) : T_2}$

• \splitfrac{〈numer〉}{〈denom〉} is what you are wanting to. Then: $\frac{\splitfrac{O \vdash e_1 : T_1}{O[T_1/x] \vdash e_2 : T_2}}{O \vdash (let\ ((x e_1)) \ e_2) : T_2}$ should be the correct way. Feb 7, 2013 at 19:40