我正在制作一个表格,需要调整行高。调整行高后,第二列上的垂直线没有延伸到正确的高度(它们留下了空隙)。
\documentclass[11pt]{article}
\usepackage{xcolor,colortbl}
\definecolor{Gray}{gray}{0.85}
\begin{document}
\Large\centering \textbf{APPROVALS} \\
\normalsize
\begin{center}
\begin{tabular}{|p{2in}|p{3.5in}|}
\hline\rowcolor{Gray}
& \centering SIGNATURE \tabularnewline
\hline
Document Owner \\ NAME 1 & \multicolumn{1}{c||}{ } \tabularnewline[15pt]
\hline
Reviewer \\ Someone 1 & \multicolumn{1}{c|}{ } \tabularnewline[15pt]
\hline
Reviewer \\ Someone 2 & \multicolumn{1}{c|}{ } \tabularnewline[15pt]
\hline
Approved: \\ NAME 4 & \multicolumn{1}{c|}{ } \tabularnewline[15pt]
\hline
\end{tabular}
\end{center}
\end{document}
答案1
出现空隙是因为你提早完成了行
Document Owner \\
没有第二个单元格,因此无法在该单元格中使用垂直规则
Document Owner & \\
答案2
David 给我指明了正确的方向。以下代码可以生成我想要的表格。
\documentclass[11pt]{article}
\usepackage{multirow}
\usepackage{xcolor,colortbl}
\definecolor{Gray}{gray}{0.85}
\begin{document}
\Large\centering \textbf{APPROVALS} \\
\normalsize
\begin{center}
\begin{tabular}{|p{2in}|p{3.5in}|}
\hline\rowcolor{Gray}
\multicolumn{1}{|c}{ }& \centering SIGNATURE \tabularnewline
\hline
Document Owner1 & \tabularnewline
NAME 1 & \tabularnewline[15pt]
\hline
Reviewer & \tabularnewline
Someone 1 & \tabularnewline[15pt]
\hline
Reviewer & \tabularnewline
Someone 2 & \tabularnewline[15pt]
\hline
Approved: & \tabularnewline
NAME 4 & \tabularnewline[15pt]
\hline
\end{tabular}
\end{center}
\end{document}