我目前正在尝试创建一个可以用于测试的模板,我一直喜欢的一件事是,问题可能获得的分数就列在问题本身的旁边。
过去,我这样做的方式是放弃包enumerate
,然后手动输入数字,例如:
$(+5)$ 2. Let $U_0 = 9$ and let your common ratio be $\frac{1}{2}$. Find an explicit formula for the sequence and use this formula to find the tenth term of the sequence. Round your answer to the nearest thousandth. \vspace{2in}
但是对于模板来说,利用环境提供的编号会很好enumerate
。到目前为止,我已经输出了看起来像
99% 的内容,如果我能弄清楚如何显示问题的分值就好了。
如果工作量很大,我想我总是可以在最后列出特定问题的分值,而不是在页边距中,但我想我会看看是否有人有任何想法。
答案1
\marginpar
对于非常基本的实现,您可以使用宏包装来插入点。下面是一个显示选项的最小示例:
\documentclass{article}
\usepackage{showframe}% http://ctan.org/pkg/showframe
\newcommand{\points}[1]{% Print points in margin
\leavevmode\marginpar{\makebox[\marginparwidth][r]{[#1]}}\ignorespaces}
\reversemarginpar% Points in left margin by default
\begin{document}
\begin{enumerate}
\item \points{5} This is what a simple open ended question, with no other parts could look like.
\par\vfill
\item This would be where you could put a question with two parts.
\begin{enumerate}
\item \points{2} This would be part~(a).
\par\vfill
\item \points{2} This would be part~(b).
\par\vfill
\end{enumerate}
\item \points{10} This is what a multiple-choice question would look like.
\par\vfill
\end{enumerate}
\end{document}
showframe
只是在文本块周围添加了一个框架。
答案2
去http://texdoc.net并输入包名 exam。预览文档,尤其是问题和要点部分。我认为这就是您要找的内容。我定期使用此包准备考试和测验。我还使用此包向中学数学教师授课。
答案3
您可以使用命令的定义来实现您想要的效果\Item
,该命令使用括号作为每个问题点的分隔符;此命令支持最多两级嵌套枚举的标签(如果需要更多级别,则修改很容易):
\documentclass{article}
\makeatletter
\def\Item(#1){%
\item[{\makebox[1cm][l]{(#1)\hfill}}
\refstepcounter{enum\romannumeral\the\@enumdepth}
\ifnum\@enumdepth=1
\csname theenum\romannumeral\the\@enumdepth\endcsname.%
\else
\ifnum\@enumdepth=2
(\csname theenum\romannumeral\the\@enumdepth\endcsname)%
\else\@toodeep
\fi\fi
]}
\makeatother
\begin{document}
\begin{enumerate}
\Item(10) Why is there air?
\Item(20) What if there were no air?
\begin{enumerate}
\Item(5) Describe the effect on the balloon industry.
\Item(15) Describe the effect on the aircraft industry.
\end{enumerate}
\end{enumerate}
\end{document}
下面是使用多功能exam
文档类,显示每个问题开头的要点,然后显示问题最后一行正前方的要点(使用 \pointsdroppedatright 和\droppoints
):
\documentclass{exam}
\begin{document}
\begin{questions}
\question[20]
Why is there air?
\question
What if there were no air?
\begin{parts}
\part[10]
Describe the effect on the balloon industry.
\part[10]
Describe the effect on the aircraft industry.
\end{parts}
\end{questions}
\pointsdroppedatright
\begin{questions}
\question[20]
Why is there air?\droppoints
\question
What if there were no air?
\begin{parts}
\part[10]
Describe the effect on the balloon industry.\droppoints
\part[10]
Describe the effect on the aircraft industry.\droppoints
\end{parts}
\end{questions}
\end{document}