# vertical alignment in multirow tabular

I'm making a table that contains a cell spanning multiple rows. The contents in the rows are long that requires line-break.

\documentclass{amsbook}

\usepackage{pgfplots,graphicx,amsmath,tikz,bm,amsthm,setspace}
\usepackage[framemethod=TikZ]{mdframed}
\usepackage{mathrsfs}%curvy letters
\usepackage{xspace}%degree symbol
\usepackage{amssymb}

\usepackage{subfiles}
\usepackage{framed,multicol}%two columns in one frame
\usepackage{enumitem}
\usepackage{tabularx}
\newcolumntype{Y}{>{\centering\arraybackslash}X}
\newcolumntype{L}{>{\raggedright\arraybackslash}X}
\usepackage{multirow}
\usepackage{mathtools}

\begin{document}

\begin{tabularx}{\textwidth}{| c | Y | X |}
\hline
Surface&Equation&Traces\\
\hline
\multirow{2}{*}{Ellipsoid}&\multirow{2}{*}{$\cfrac{x^2}{a^2}+\cfrac{y^2}{b^2}+\cfrac{z^2}{c^2}=1$}&{All traces are ellipses.}\\
&&If $a=b=c$, the ellipsoid is a sphere.\\
\hline
\multirow{3}{*}{Elliptic Paraboloid}&{$\cfrac{z}{c}=\cfrac{x^2}{a^2}+\cfrac{y^2}{b^2}$}&{Horizontal traces are ellipses.}\\
&&Vertical traces are parabolas.\\
&&The variable raised to the first power indicates the axis of the paraboloid.\\
\hline
\multirow{2}{*}{Hyperbolic Paraboloid}&{$\cfrac{z}{c}=\cfrac{x^2}{a^2}-\cfrac{y^2}{b^2}$}&Horizontal traces are hyperbolas.\\
&&Vertical traces are parabolas.\\
\hline
\multirow{2}{*}{Cone}&{$\cfrac{z^2}{c^2}=\cfrac{x^2}{a^2}+\cfrac{y^2}{b^2}$}&Horizontal traces are ellipses.\\
&&Vertical traces in the planes $x=k$ and $y=k$ are hyperbolas if $k\neq 0$ but are pairs of lines if $k=0$.\\
\hline
\multirow{3}{*}{Hyperboloid of One Sheet}&{$\cfrac{x^2}{a^2}+\cfrac{y^2}{b^2}-\cfrac{z^2}{c^2}=1$}&Horizontal traces are ellipses.\\
&&Vertical traces are hyperbolas.\\
&&The axis of symmetry corresponds to the variable whose coefficient is negative.\\
\hline
\multirow{3}{*}{Hyperboloid of Two Sheets}&{$-\cfrac{x^2}{a^2}-\cfrac{y^2}{b^2}+\cfrac{z^2}{c^2}=1$}&Horizontal traces in $z=k$ are ellipses if $k>c$ or $k<-c$.\\
&&Vertical traces are hyperbolas.\\
&&The two minus signs indicate two sheets.\\
\hline

\end{tabularx}

\end{document}


As you can see, the contents in the first and second columns are not vertically centered. I searched similar questions but either answers were way too hard to understand for me to follow or a bit primitive ([fixup]), and read that it is a known problem with \multirow. Is there any suggestions?

On side note, I also just noticed that the first row's top padding is smaller than the others. How do I fix this?

• Welcome to TeX.SX! Sep 5 '17 at 10:38

Don't split the entries in the third column.

\documentclass{amsbook}

\usepackage{pgfplots,graphicx,amsmath,tikz,bm,amsthm,setspace}
\usepackage[framemethod=TikZ]{mdframed}
\usepackage{mathrsfs}%curvy letters
\usepackage{xspace}%degree symbol
\usepackage{amssymb}

\usepackage{subfiles}
\usepackage{framed,multicol}%two columns in one frame
\usepackage{enumitem}
\usepackage{tabularx}
\usepackage{multirow}
\usepackage{mathtools}

\newcolumntype{Y}{>{\centering\arraybackslash}X}
\newcolumntype{L}{>{\raggedright\arraybackslash}X}

\begin{document}

\begin{table}[htp]

\renewcommand{\tabularxcolumn}[1]{m{#1}} % local change

\begin{tabularx}{\textwidth}{| c | Y | L |}
\hline
Surface&Equation&Traces\\
\hline
Ellipsoid & $\cfrac{x^2}{a^2}+\cfrac{y^2}{b^2}+\cfrac{z^2}{c^2}=1$ &
All traces are ellipses.\newline
If $a=b=c$, the ellipsoid is a sphere.\\
\hline
Elliptic Paraboloid & $\cfrac{z}{c}=\cfrac{x^2}{a^2}+\cfrac{y^2}{b^2}$ &
Horizontal traces are ellipses.\newline
Vertical traces are parabolas.\newline
The variable raised to the first power indicates the axis of the paraboloid.\\
\hline
Hyperbolic Paraboloid & $\cfrac{z}{c}=\cfrac{x^2}{a^2}-\cfrac{y^2}{b^2}$ &
Horizontal traces are hyperbolas.\newline
Vertical traces are parabolas.\\
\hline
Cone & $\cfrac{z^2}{c^2}=\cfrac{x^2}{a^2}+\cfrac{y^2}{b^2}$ &
Horizontal traces are ellipses.\newline
Vertical traces in the planes $x=k$ and $y=k$ are hyperbolas if $k\neq 0$
but are pairs of lines if $k=0$.\\
\hline
Hyperboloid of One Sheet & $\cfrac{x^2}{a^2}+\cfrac{y^2}{b^2}-\cfrac{z^2}{c^2}=1$ &
Horizontal traces are ellipses.\newline
Vertical traces are hyperbolas.\newline
The axis of symmetry corresponds to the variable whose coefficient is negative.\\
\hline
Hyperboloid of Two Sheets & $-\cfrac{x^2}{a^2}-\cfrac{y^2}{b^2}+\cfrac{z^2}{c^2}=1$ &
Horizontal traces in $z=k$ are ellipses if $k>c$ or $k<-c$.\newline
Vertical traces are hyperbolas.\newline
The two minus signs indicate two sheets.\\
\hline
\end{tabularx}
\end{table}

\end{document}