为什么我的表格在顶部/右侧附近(“设置”下方)缺少一点垂直线?
语境:
- 我正在为学生制作分数练习册,其中许多学生都有不同的特殊需求。这使得垂直规则变得必不可少,因为它定义了铅笔笔划应该去哪里和不应该去哪里。
- 我从此主题。我不太明白,但它在其他文档中运行良好。
梅威瑟:
\documentclass[12pt,letterpaper]{article}
\usepackage[left=1.52cm,right=1.5cm,top=2cm,bottom=2cm]{geometry}
\usepackage{tabularx}
\newcolumntype{C}[1]{>{\centering\arraybackslash}m{#1}}
\newcolumntype{Y}{>{\centering\arraybackslash}X}
\usepackage{lscape}
\usepackage{cellspace}
\setlength\cellspacetoplimit{20pt}
\setlength\cellspacebottomlimit{4pt}
\addparagraphcolumntypes{X}
% To create the the paddingtop part... which I don't totally understand.
\makeatletter
\newsavebox\saved@arstrutbox
\newcommand*{\setarstrut}[1]{%
\noalign{%
\begingroup
\global\setbox\saved@arstrutbox\copy\@arstrutbox
\global\setbox\@arstrutbox\hbox{%
\vrule \@height #1
\@depth 0cm
\@width\z@
}%
\endgroup
}%
}
\newcommand*{\restorearstrut}{%
\noalign{%
\global\setbox\@arstrutbox\copy\saved@arstrutbox
}%
}
\makeatother
\newcommand{\paddingtop}[2]{\setarstrut{#1} #2 \\ \restorearstrut}
\begin{document}
\begin{landscape}
\begin{tabularx}{24cm}{|C{3cm}|C{2.5cm}|C{7cm}|C{5cm}|Y|} \hline
Words & Symbols & Point \& Length on Number Line & Areas & Sets \\ \hline
\paddingtop{0.5cm}{&&&}
Three Halves or one and a half &&&& \\ [1cm]\hline
\end{tabularx}
\end{landscape}
\end{document}