В приведенном ниже примере NQMWE (не совсем минимальный рабочий пример) один вопрос имеет два parts
:
\documentclass[addpoints]{exam}
\pointsinrightmargin
\begin{document}
\header{English 245}{Quiz on \emph{Childhood's End}, pp. 1--23}{2019/02/26}
\vspace{2mm}
\noindent Name: \makebox[0.5\textwidth]{\dotfill}
\vspace{5mm}
\noindent Score: \makebox[1in]{\dotfill} of a possible \numpoints ~points
\begin{questions}
\question The Overlords make two demonstrations of their powers. What are they?
\begin{parts}
\part [1]
\begin{solution}[1in]
They destroy an incoming missile
\end{solution}
\part [1]
\begin{solution}[1in]
They block out the sun over Cape Town.
\end{solution}
\end{parts}
\question [1] The Overlords communicate through which medium?
\begin{choices}
\choice Written messages
\correctchoice Speech
\choice Video
\choice Musical tones
\end{choices}
\question [1] The Overlords' human liaison works for which organization?
\begin{choices}
\correctchoice The United Nations
\choice The World Health Organization
\choice The US government
\choice The Soviet government
\end{choices}
\question [1] The human opposition to the Overlords focuses on which of the following?
\begin{choices}
\choice \label{choice:cruelty} The cruelty of their rule
\choice \label{choice:concealment}The fact that they choose not to reveal themselves to their subjects
\choice \label{choice:sovereignty}The loss of human sovereignty
\correctchoice \ref{choice:concealment} and ~\ref{choice:sovereignty}, but not ~\ref{choice:cruelty}
\choice \ref{choice:cruelty} and ~\ref{choice:sovereignty}, but not ~\ref{choice:concealment}
\end{choices}
\end{questions}
\end{document}
Когда я его компилирую, parts
в первом вопросе не появляется, но все остальное работает правильно (см. изображение ниже). (Вот почему я включил весь файл: все варианты выбора, метки и т. д. работают нормально, за исключением среды parts
.)
Что здесь не так?
решение1
Вы не указали дополнительный текст для \parts [1]
печати, поэтому метки деталей не печатаются. Вы можете добавить текстовые подсказки для каждой детали (например, «Демонстрация 1») или можете сделать линию нулевой толщины, которая будет работать как текстовая подсказка, чтобы отображать только метку детали. Я добавил пример каждого из них в ваш код.
\documentclass[addpoints]{exam}
\pointsinrightmargin
\begin{document}
\header{English 245}{Quiz on \emph{Childhood's End}, pp. 1--23}{2019/02/26}
\vspace{2mm}
\noindent Name: \makebox[0.5\textwidth]{\dotfill}
\vspace{5mm}
\noindent Score: \makebox[1in]{\dotfill} of a possible \numpoints ~points
\begin{questions}
\question The Overlords make two demonstrations of their powers. What are they?
\begin{parts}
\part [1] Demonstration 1: % Use a text prompt
\begin{solution}[1in]
They destroy an incoming missile
\end{solution}
\part [1] \rule{1em}{0pt} % Use an 0 thickness line
\begin{solution}[1in]
They block out the sun over Cape Town.
\end{solution}
\end{parts}
\question [1] The Overlords communicate through which medium?
\begin{choices}
\choice Written messages
\correctchoice Speech
\choice Video
\choice Musical tones
\end{choices}
\question [1] The Overlords' human liaison works for which organization?
\begin{choices}
\correctchoice The United Nations
\choice The World Health Organization
\choice The US government
\choice The Soviet government
\end{choices}
\question [1] The human opposition to the Overlords focuses on which of the following?
\begin{choices}
\choice \label{choice:cruelty} The cruelty of their rule
\choice \label{choice:concealment}The fact that they choose not to reveal themselves to their subjects
\choice \label{choice:sovereignty}The loss of human sovereignty
\correctchoice \ref{choice:concealment} and ~\ref{choice:sovereignty}, but not ~\ref{choice:cruelty}
\choice \ref{choice:cruelty} and ~\ref{choice:sovereignty}, but not ~\ref{choice:concealment}
\end{choices}
\end{questions}
\end{document}
решение2
Проблема заключается в solution
окружающей среде внутри \part
:
\begin{document}
\header{English 245}{Quiz on \emph{Childhood's End}, pp. 1--23}{2019/02/26}
\vspace{2mm}
\noindent Name: \makebox[0.5\textwidth]{\dotfill}
\vspace{5mm}
\noindent Score: \makebox[1in]{\dotfill} of a possible \numpoints ~points
\begin{questions}
\question The Overlords make two demonstrations of their powers. What are they?
\begin{parts}
\part [1]
%\begin{solution}[1in]
They destroy an incoming missile
%\end{solution}
\part [1]
%\begin{solution}[1in]
They block out the sun over Cape Town.
%\end{solution}
\end{parts}
\question [1] The Overlords communicate through which medium?
\begin{choices}
\choice Written messages
\correctchoice Speech
\choice Video
\choice Musical tones
\end{choices}
\question [1] The Overlords' human liaison works for which organization?
\begin{choices}
\correctchoice The United Nations
\choice The World Health Organization
\choice The US government
\choice The Soviet government
\end{choices}
\question [1] The human opposition to the Overlords focuses on which of the following?
\begin{choices}
\choice \label{choice:cruelty} The cruelty of their rule
\choice \label{choice:concealment}The fact that they choose not to reveal themselves to their subjects
\choice \label{choice:sovereignty}The loss of human sovereignty
\correctchoice \ref{choice:concealment} and ~\ref{choice:sovereignty}, but not ~\ref{choice:cruelty}
\choice \ref{choice:cruelty} and ~\ref{choice:sovereignty}, but not ~\ref{choice:concealment}
\end{choices}
\end{questions}
\end{document}