2

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.

2
\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).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.