0

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. – Somenath Sinha Nov 8 '16 at 13:32
  • 2
    what you COULD do is use pdfpages to include another document with another document class – Elad Den 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. – Michael S Taylor 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
  • 1
    @MikeTaylor Do you want to make that into an answer? – Johannes_B Apr 14 '17 at 7:06
2

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}

\printanswers

\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}%
}

\pagestyle{headandfoot}
\firstpageheader{Title of Class}{}{\ifprintanswers\textbf{KEY}\else Name: \enspace \makebox[2.5in]{\hrulefill}\fi}
\runningheader{}{}{\footnotesize{pg. \thepage}}
\footer{}{}{}
\runningheadrule

\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.
\newcommand*\AnswerBox[2]{%
    \parbox[t][#1]{0.92\textwidth}{%
    \begin{solution}#2\end{solution}}
    \vspace{\stretch{1}}
}

% This allows line breaks.
\newenvironment{AnswerPage}[1]
    {\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}

Time to answer some questions.

\begin{questions}

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

\AnswerBox{2\baselineskip}{%
    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?

\begin{AnswerPage}{1\basespace}
    The AnswerPage environment is a minipage so it accepts paragraph returns.\bigskip

    Like this one.
\end{AnswerPage}

\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.
    \choice Swallows are never unladen.
\end{choices}

\end{questions}

\end{document}

enter image description here

  • @Johannes_B Glad to help. I updated the answer to include a multiple choice question per the original OP query. – Michael S Taylor Apr 19 '17 at 14:55

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.