表格标题为三行

表格标题为三行

我使用环境将标题排版为三行center。行与行之间的垂直间距看起来非常糟糕。

\documentclass{amsart}

\usepackage{mathtools,array}
\usepackage{makecell}


\begin{document}


\begin{center}{\bfseries{Average Number of Video}}\end{center}
\begin{center}{\bfseries{Rentals Per Premium Member}}\end{center}
\begin{center}{\bfseries{at Store \textit{B}}}\end{center}
\smallskip

\noindent \hspace*{\fill}
\begin{tabular}{|| c !{\vrule width0.8pt} c | c | c||} \hline
    Year                &   1985    &   1986    &   1987 \\ \Xhline{0.8pt}
    Rentals             &   12      &   15      &   20 \\ \hline
\end{tabular}
\hspace{\fill}


\end{document}

答案1

将标题加粗从来都不是一个好主意。

\documentclass{amsart}
\usepackage[skip=0pt]{caption}
\usepackage{array}
\usepackage{makecell}
\begin{document}
\begin{table}
\centering
\caption*{Average Number of Video\\Rentals Per Premium Member\\at Store \textit{B}}
\begin{tabular}{|| c !{\vrule width0.8pt} c | c | c||} \hline
    Year                &   1985    &   1986    &   1987 \\ \Xhline{0.8pt}
    Rentals             &   12      &   15      &   20 \\ \hline
\end{tabular}
\end{table}
\end{document}

相关内容