5

I am currently writing a multiple choice exam: There is a enumerated list for the question number and then a nested list for the choices within each multiple choice question:
1. Question 1
a)
b)
c)
d)
2. Question 2
a)
b)
c)
d) ...
With a long list of questions, it is common that the choices to a particular question become separated between pages. The most straightforward way to fix this problem is to just write \newpage where ever the break occurs. I am wondering if there is a better way? Is it possible to change (or create a new) envirement that always groups the choices so that they never get separated between pages?

4

One option would be to wrap your list inside a minipage (minipages don't admit page breaks):

\documentclass{exam}

\begin{document}

\noindent\begin{minipage}{\linewidth}
\begin{questions}
\question
One of these things is not like the others; one of these things is not
the same. Which one is different?
\begin{choices}
\choice John
\choice Paul
\choice George
\choice Ringo
\choice Socrates
\end{choices}
\end{questions}
\end{minipage}

\end{document}

And, of course, you could define a new environment to alleviate the job:

\documentclass{exam}

\newenvironment{nbchoices}[1]
  {\par\noindent\begin{minipage}{\linewidth}\begin{questions}\question#1\begin{choices}}
  {\end{choices}\end{questions}\end{minipage}\par}

\begin{document}

\begin{nbchoices}{One of these things is not like the others; one of these things is not
the same. Which one is different?}
\choice John
\choice Paul
\choice George
\choice Ringo
\choice Socrates
\end{nbchoices}

\end{document}

Using article and standard enumerate environments, the same idea applies:

\documentclass{article}

\newenvironment{nbchoices}[1]
  {\item#1\par\begin{minipage}{\linewidth}\begin{enumerate}}
  {\end{enumerate}\end{minipage}\par}

\begin{document}

\begin{enumerate}
\begin{nbchoices}{One of these things is not like the others; one of these things is not
the same. Which one is different?}
\item John
\item Paul
\item George
\item Ringo
\item Socrates
\end{nbchoices}
\begin{nbchoices}{One of these things is not like the others; one of these things is not
the same. Which one is different?}
\item John
\item Paul
\item George
\item Ringo
\item Socrates
\end{nbchoices}
\end{enumerate}

\end{document}

No page breaks won't occur in between choices.

  • Ideally I would like to use the article documentclass since exams will consist of more than just multiple choice questions. I am not sure that minipage will work: I want page breaks to occur when the page fills with questions, just not in between choices. – richtera Apr 9 '12 at 20:24
  • @richtera: see my updated answer. – Gonzalo Medina Apr 9 '12 at 20:38
  • I guess there is still one problem...the question can get separated from the choices. For example the question can be on page 4, but all the choices are on page 5. – richtera Apr 9 '12 at 20:52
  • I moved the minipage command and that fixed it. – richtera Apr 9 '12 at 20:55
  • @richtera: yes, that's what was needed. – Gonzalo Medina Apr 9 '12 at 21:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.