我想在带有 的方框中写些内容\makeemptybox{1.8in}
,我正在使用\documentclass[addpoints]{exam}
。
谢谢。
答案1
您可以定义一个\makenonemptybox
宏:
\documentclass[addpoints]{exam}
\newcommand{\makenonemptybox}[2]{%
\par\nobreak\vspace{\ht\strutbox}\noindent
\fbox{%
\parbox[c][\dimexpr#1-2\fboxsep][t]{\dimexpr\linewidth-2\fboxsep}{
\hrule width \hsize height 0pt
#2
}%
}%
\par\vspace{\ht\strutbox}
}
\makeatother
\begin{document}
\begin{questions}
\question
In no more than one paragraph, explain why the earth is round.
\makeemptybox{1in}
\question
\begin{parts}
\part
What changes to the van Allen radiation belt are needed to make
the earth into a regular icosahedron?
\makenonemptybox{1in}{(Hint: try splitting hairs)}
\part
Where should the field generator be constructed if you want one of
the vertices to be located at the Royal Observatory at Greenwich?
\makeemptybox{1in}
\end{parts}
\end{questions}
\end{document}