Why is my table missing a little bit of its vertical rule near the top/right (just below where it says "Sets")?
Context:
- I'm making fractions worksheets for students, many of whom will have diverse special needs. This makes the vertical rules necessary as it defines where there pencil strokes should go and not go.
- I got all the `\paddingtop' stuff from this thread. I do not really understand it, but it has worked well in other documents.
MWE:
\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}