考试包中的多项选择题

考试包中的多项选择题

我正在尝试参加一场包含多项选择题的考试。以下是我正在做的一个简单示例

\documentclass[addpoints]{exam}

\begin{document}

\begin{center}
\gradetable
\end{center}


\begin{questions}

\titledquestion{\textbf{Multiple Choice}}[10]


What is the Capital of the United States in 1799?

\begin{oneparchoices}
\choice NY 
\CorrectChoice Washington D.C.
\choice Chicago
\choice LA

\end{oneparchoices}




\question[10]

What is the Capital of the United Kinddom in 1999?

\begin{oneparchoices}
\choice London 
\CorrectChoice Washington D.C.
\choice Chicago
\choice LA

\end{oneparchoices}


\end{questions}



\end{document}

我想实现以下目标:

  1. 这些选项彼此之间非常接近,有没有办法将它们放在整行中,并且彼此之间有相等的间距?

  2. 我想从第二个问题开始计算问题,我该如何实现?

答案1

1)我习惯xpatch在每次选择后固定空间大小。

2)我更新了\questionlabel第一道题的命令,\phantom{}保留了题目号的空间,但没有打印出来,我把它重置为第一道题之前的班级默认设置。

\documentclass[addpoints]{exam}
\usepackage{xpatch}

% Need both to patch both instances (choice, correctchoice) in the oneparchoices environment.
% Unless there is a global replacement that works within an environment. I don't know.
% Replaces \hskip 1em with \hfill
\xpatchcmd{\oneparchoices}{\penalty -50\hskip 1em plus 1em\relax}{\hfill}{}{}
\xpatchcmd{\oneparchoices}{\penalty -50\hskip 1em plus 1em\relax}{\hfill}{}{}

\begin{document}
\begin{center}
\gradetable
\end{center}
\begin{questions}

\renewcommand\questionlabel{\phantom{\thequestion.}}
\titledquestion{\textbf{Multiple Choice}}[10]
What is the Capital of the United States in 1799?

\begin{oneparchoices}
\choice NY
\CorrectChoice Washington D.C.
\choice Chicago
\choice LA
\end{oneparchoices}

\renewcommand\questionlabel{\thequestion.}
%\setcounter{question}{0}   %Uncomment if you want the first numbered question to start at 1.

\question[10]
What is the Capital of the United Kinddom in 1999?

\begin{oneparchoices}
\choice London 
\CorrectChoice Washington D.C.
\choice Chicago
\choice Los Angeles
\end{oneparchoices}

\end{questions}
\end{document}

在此处输入图片描述

相关内容