为了写一份多题考试,我目前使用麦克萨姆包,允许将问题和答案随机化。我需要将答案打印在一行中,但包文档中没有说明这是否可行。默认情况下,输出是一个数字列表,类似于使用 enumitem 包获得的数字列表。有没有办法将答案打印在一行中?谢谢!
梅威瑟:
\documentclass{article}
\usepackage[output=exam, numberofversions=8, version=3, randomizequestions=true,randomizeanswers=true]{mcexam}%
\usepackage[top=10mm,bottom=10mm,inner=10mm,outer=10mm, marginparwidth=20mm, marginparsep=4mm]{geometry}
\begin{document}
\setlist[setmcquestions]{label=\mcquestionlabelfmt{*}.
,ref=\mcquestionlabelfmt{*}
14
,itemsep=.5\baselineskip
,topsep=.5\baselineskip }
\setlist[setmcanswerslist]{label=\mcanswerlabelfmt{*}
,noitemsep}
\setlist[setmcquestioninfo]{before=\footnotesize\sffamily}
\begin{mcquestions}
\question Question 1:
\begin{mcanswerslist}
\answer first answer
\answer second ansewr
\answer third answer
\answer fourth answer
\end{mcanswerslist}
\end{mcquestions}
\end{document}
答案1
第一种方法列在软件包文档中(截至撰写本文时,在 2.2 小节中)。第二种方法我只是出于好奇而测试的,它对于简短答案非常有效。
\documentclass{article}
\usepackage[
output=exam,
numberofversions=8,
version=3,
randomizequestions=true,
randomizeanswers=true]{mcexam}%
\usepackage{multicol}
\begin{document}
\setlist[setmcquestions]{label=\mcquestionlabelfmt{*}.
,ref=\mcquestionlabelfmt{*}
14
,itemsep=.5\baselineskip
,topsep=.5\baselineskip }
\setlist[setmcanswerslist]{label=\mcanswerlabelfmt{*}
,noitemsep}
\setlist[setmcquestioninfo]{before=\footnotesize\sffamily}
\begin{mcquestions}
\question Question 1:
\begin{mcanswers}
\begin{tabular}
{c@{\hskip\tabcolsep}*3{c@{\hskip3\tabcolsep}c@{\hskip\tabcolsep}}c}
\answernum{1}&\answer{1}{first answer} &
\answernum{2}&\answer{2}{second answer} &
\answernum{3}&\answer{3}{third answer} &
\answernum{4}&\answer{4}{fourth answer}
\end{tabular}
\end{mcanswers}
\end{mcquestions}
\begin{mcquestions}
\question Question 1:
\begin{multicols}{4}
\begin{mcanswerslist}
\answer one
\answer two
\answer three
\answer four
\end{mcanswerslist}
\end{multicols}
\end{mcquestions}
\end{document}