在下面这个例子中,我想\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}