我正在尝试帮助孩子们识别整数、混合数、真分数和假分数。我让他们练习使用这个需要两处修正的表格。
- 中间 10 个列之间的垂直规则。
- 水平线贯穿整个过程。
我尝试|
在行中的不同位置放置 a \begin{tabularx}
,但编译失败。我不知道为什么水平线没有完全对齐。我该如何修复这些问题?
\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}
答案1
这是一个解决方案。我重新定义 tabularx 列以合并您的列类型的功能C
,并将 tabularx wdth 设置为\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}