[Tex/LaTex] Vertical/Horizontal Rules in TabularX

rulestabularx

I am trying to help kids identify whole numbers vs mixed numbers vs proper fractions vs improper fractions. I am having them practice using this table which needs two fixes.

  1. Vertical rules between the 10 middle columns.
  2. The horizontal rule going the entire way.

I tried putting a | in various places in the \begin{tabularx} line, but then it didn't compile. And I have no idea why the horizontal rules are not going the entire way. How do I fix these things?

\documentclass[a4paper]{article}
\usepackage{tabularx}
\usepackage{amssymb}
\newcolumntype{C}[1]{>{\centering\arraybackslash}m{#1}}

\begin{document}

Classify the following numbers as whole, a proper fraction, an improper fraction, or a mixed number.

\begin{tabularx}{13cm}{|C{1.5cm}|*{10}{C{0.7cm}}|X|}

\hline
Number Type & \(\frac{1}{3}\) & \(10\) & \(5\frac{2}{7}\) & \(\frac{2}{9}\) & \(\frac{10}{7}\) & \(2\) & \(0\) & \(1\frac{1}{2}\) & \(3\frac{4}{5}\) & \(\frac{8}{8}\) & \(\frac{3}{1}\) \\

\hline
Whole &  &  &  &  &  &  &  &  &  &  &  \\

\hline
Proper & \checkmark  &  &  &  &  &  &  &  &  &  &  \\

\hline
Improper &  &  &  &  &  &  &  &  &  &  &  \\

\hline
Mixed &  &  &  &  &  &  &  &  &  &  &  \\

\hline
\end{tabularx}


\end{document}

Best Answer

Here is a solution. I redefine tabularx columns to incorporate the features of your C column type, ans set tabularx wdth to \linewidth:

\documentclass[a4paper]{article}
\usepackage{tabularx}
\usepackage{amssymb, amsmath, nccmath}
\renewcommand\tabularxcolumn[1]{>{\centering\arraybackslash}m{#1}}

\begin{document}

Classify the following numbers as whole, a proper fraction, an improper fraction, or a mixed number.
\begin{center}\renewcommand\arraystretch{1.25}
\begin{tabularx}{\linewidth}{|m{1.5cm}|*{11}{X|}}
\hline
Number Type & \(\mfrac{1}{3}\) & \(10\) & \(5\frac{2}{7}\) & \(\mfrac{2}{9}\) & \(\mfrac{10}{7}\) & \(2\) & \(0\) & \(1\frac{1}{2}\) & \(3\frac{4}{5}\) & \(\mfrac{8}{8}\) & \(\mfrac{3}{1}\) \\
\hline
Whole & & & & & & & & & & & \\
\hline
Proper & \checkmark & & & & & & & & & & \\
\hline
Improper & & & & & & & & & & & \\
\hline
Mixed & & & & & & & & & & & \\
\hline
\end{tabularx}
\end{center}

\end{document} 

enter image description here

Related Question