![如何调整表格中使用 \fillin 命令的间隙](https://linux22.com/image/439982/%E5%A6%82%E4%BD%95%E8%B0%83%E6%95%B4%E8%A1%A8%E6%A0%BC%E4%B8%AD%E4%BD%BF%E7%94%A8%20%5Cfillin%20%E5%91%BD%E4%BB%A4%E7%9A%84%E9%97%B4%E9%9A%99.png)
在下面这个例子中,我想\fillin
在表格环境中使用。
\documentclass{exam}
\begin{document}
\setlength\answerskip{3ex} % No effect
\begin{questions}
\question A regular question \par
The path of the \fillin[righteous] man is beset on all sides
By the inequities of the selfish and the tyranny of evil men.
\question Another question \par
\medskip
\begin{center}
\begin{tabular}{*3{|c}|}
Foo & Bar & Baz \\ \hline
A & \fillin[B] & C \\ \hline
\fillin[D] & E & \fillin[F] \\ \hline
\end{tabular}
\end{center}
\end{questions}
\end{document}
但该\answerskip
命令对表格不起作用。如何调整表格的间隙?
答案1
使用\setlength\answerclearance{<lenght>}
(而不是\setlength\answerskip{3ex}
}在文本中. 该线将打印\answerclearance
在基线以下的一段距离。
表中:
该命令\renewcommand{\arraystretch}{<factor>}
会按该因子垂直扩展单元格。使用它来为表格中的答案腾出空间。
用于\setlength\fillinlinelength{<lenght>}
使单元格更宽。
\documentclass{exam}
\begin{document}
\setlength\answerclearance{0.5ex} % The line is printed a distance of \answerclearance below the baseline <<<<<<<<<<<<<<
\begin{questions}
\question A regular question \par
The path of the \fillin[righteous] man is beset on all sides
By the inequities of the selfish and the tyranny of evil men.
\question Another question \par
\medskip
\renewcommand{\arraystretch}{2} % expand the cells vertically <<<<<<<<<<<<<<<<
\setlength\fillinlinelength{0.25\textwidth} % wider cells <<<<<<<<<<<<<<<<
\begin{center}
\begin{tabular}{*3{|c}|}
\hline
Foo & Bar & Baz \\ \hline
A & \fillin[B] & C \\ \hline
\fillin[D] & E & \fillin[F] \\ \hline
\end{tabular}
\end{center}
\end{questions}
\end{document}