# How to change document class mid-document, and change it back when done?

I'm trying to write a series of notes. My document class is Report. But I need to insert a bunch of questions(examples) that are parts of the notes. I'm aware that there is an "exam" package for making MCQ questions. I was wondering, can MCQ questions be put in a page without changing the document class?

If not: is there a way to temporarily change the document class to exam, type in the questions and the answers and then change the document class back to report, preferably without a pagebreak, for example using a minipage?

Please suggest better strategies for inserting a MCQ questionaire inside a report. Thank you for your time.

• @MarcvanDongen Thank you, I didn't know that this question has been asked before. My search yeilded no results, primarily because I was trying to use the exam package. But that page didn't yield a result of sufficient quality either. I would very much like to use a package to make MCQs. Nov 8 '16 at 13:32
• what you COULD do is use pdfpages to include another document with another document class Nov 8 '16 at 13:48
• You could just use the exam document class because it is built on the article document class. I use exam class to make course handouts that include extensive notes, tables, and images, mixed with occasional questions. Nov 8 '16 at 20:21
• @EladDen Yeah. That way you can ensure real consistency in typesetting. Just kidding:)
– user10274
Nov 9 '16 at 15:53
• @MikeTaylor Do you want to make that into an answer? Apr 14 '17 at 7:06

You could use the exam document class because it is built on the article document class. I use exam class to make course handouts that include extensive notes, tables, and images, mixed with occasional questions. Here is a basic example.

\documentclass[12pt]{exam}

\usepackage{lipsum} % For MWE only.

\usepackage{geometry}
\geometry{letterpaper, left=1.5in, bottom=1in}

\usepackage[parfill]{parskip}

% Use small cap letters for enumerated
% lists to distinguish them from questions.
\usepackage{enumitem}
\setlist{leftmargin=*}
\setlist[1]{labelindent=\parindent}
\setlist[enumerate]{label=\textsc{\alph*}.}

\usepackage[sc]{titlesec}

%% Commands for Exam class
\renewcommand{\solutiontitle}{\noindent}
\unframedsolutions
\SolutionEmphasis{\bfseries}

% Shifts margins left. Question numbers appear in margin.
% This allows "fullwidth" to left align with text that is
% outside of the questions environment.
\renewcommand{\questionshook}{%
\setlength{\leftmargin}{-\leftskip}%
}

\footer{}{}{}

\renewcommand{\choiceshook}{%
\setlength{\leftmargin}{0.25in}%
\setlength{\parsep}{3pt}%
}

% Next two macros keep constant space between question
% whether answers are printed or not. First is for
% answers that do not require line breaks.
\parbox[t][#1]{0.92\textwidth}{%
\begin{solution}#2\end{solution}}
\vspace{\stretch{1}}
}

% This allows line breaks.
{\begin{minipage}[t][#1]{0.92\textwidth}%
\begin{solution}}
{\end{solution} \end{minipage}
\vspace{\stretch{1}}}

% An answer space I commonly use.
\newlength{\basespace}
\setlength{\basespace}{5\baselineskip}

\begin{document}

\subsection*{Title of exercise}

This is the format I use for my laboratory handouts, using the exam class. I use this space to introduce the overall purpose of the exercise.

\subsubsection*{First section}

I break the overall exercise into related sections. Sometimes a list is handy. The bullets are left-aligned with the text. I use
small cap letters to distinguish lists from questions.

\begin{enumerate}
\item This is the first item.
\item This is another item.
\item This is the final item.
\end{enumerate}

\begin{questions}

\question
Identify at least one structure in the following diagram.

The AnswerBox macro is good for answers that only need a single sentence in the key. It does not accept paragraph returns.
}

\question
What is the meaning of life?

The AnswerPage environment is a minipage so it accepts paragraph returns.\bigskip

Like this one.

\subsubsection*{Another section}

Here is the next section. Each section can be as long as necessary, and can include figures and tables. Updated to answer the OP's query about multiple choice questions.

\question
What is the speed of an unladen swallow?

\begin{choices}
\choice 11 meters per second.
\correctchoice 42.