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.

Below is some code I am working with.

\begin{tabular}{l|m{4.75in}}
Equation 1 & $y^{10} + x^{6} + 7x^{3} + 6y^{11}$\\\hline
Equation 2  & $\begin{alignedat}{1}(n + 1)^{2}u_{n + 3} &+ (n^{4} + 4n^3 + 3n^{2} + 2n + 1)u_{n + 2} + (5m^{9} + 6m^{7} + m^{6})u_{n + 1} + p^{7} \\&+ (n^{20} + n^{19} + n^{18} + n^{17} + n^{16} + n^{15} + 5n + 2)u_{n + 10}\end{alignedat}$\\\hline
Notes & This is some equation\\\hline
\end{tabular}

How does one increase the vertical spacing between Equation 1 and Equation 2? In the output the top of Equation 2 touches the horizontal line from the bottom part of Equation 1. I've tried \renewcommand{\arraystretch}{1.5} but that doesn't seem to work with the alignedat environment. Since I have many of these tables with similar code, it would also be nice if I didn't have to go through each one manually.

share|improve this question

1 Answer 1

up vote 2 down vote accepted
\begin{tabular}{l|m{4.75in}}
Equation 1 & $y^{10} + x^{6} + 7x^{3} + 6y^{11}$\\\hline
Equation 2  & 
  $\begin{aligned}
   \smash[b]{\vphantom{\bigg|}}
   (n + 1)^{2}u_{n + 3} &+ (n^{4} + 4n^3 + 3n^{2} + 2n + 1)u_{n + 2} +
     (5m^{9} + 6m^{7} + m^{6})u_{n + 1} + p^{7} \\
                        &+ (n^{20} + n^{19} + n^{18} + n^{17} + 
     n^{16} + n^{15} + 5n + 2)u_{n + 10}
  \smash[t]{\vphantom{\bigg|}}
\end{aligned}$\\\hline
Notes & This is some equation\\\hline
\end{tabular}

The \bigg| is smashed on the bottom in the first line and on the top in the second so the two lines are not spread apart too much. They are invisible, because are inside \vphantom.

Instead of \begin{alignedat}{1} you can use \begin{aligned} (it doesn't make any difference, in this case).

share|improve this answer

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.