[Tex/LaTex] how to create book with multiple exam question papers in chapters

booksdocument-classesexam

I want to bundle together multiple exam question papers in the form of a bound book to be handed out as practice problems. The exam question papers are mainly objective MCQs. Each chapter will have initial description (text, figures, and diagrams) followed by a series of multiple choice questions.
I use the exam class to generate MCQ exams as shown in the code below.
How to combine this with book templates or or other class to accomplish what I wish to do?

%\documentclass{article}
\documentclass{exam}
\usepackage{graphicx}
\usepackage[export]{adjustbox}

\begin{document}
\begin{questions}

\question
 [A]
question 1 \\
\begin{oneparchoices}
 \choice  option 1
 \choice  option 2
 \choice  option 3
 \choice  option 4
\end{oneparchoices}


\question
 [B]
question 2 \\
\begin{oneparchoices}
 \choice  option 1
 \choice  option 2
 \choice  option 3
 \choice  option 4
\end{oneparchoices}

\question
 [A]
question 3 \\
\begin{oneparchoices}
 \choice  option 1
 \choice  option 2
 \choice  option 3
 \choice  option 4
\end{oneparchoices}

\question
 [D]
question 4 \\
\begin{oneparchoices}
 \choice  option 1
 \choice  option 2
 \choice  option 3
 \choice  option 4
\end{oneparchoices}


\end{questions}

\end{document}

Best Answer

I assume that OP only wants to include some multiple choice questions typed like in exam class, i.e., a questions environment similar to enumerate but with \question[points] command instead of \item; and a multiple choice environment (oneparchoices) which is similar to an inline enumerate with \choice instead of \item.

Both environments can be build with enumitem package. It provides configurable lists and also configurable inline lists. Therefore with some help from enumitem documentation, and from \newlist vs. \newenvironment for defining an individual list style and Creating a list style with enumitem, next can be done

\documentclass{article}
\usepackage{enumitem}
\usepackage{xparse}

%Idea from https://tex.stackexchange.com/a/236668/1952
\DeclareDocumentCommand\question{o}{%
    \item\IfNoValueTF{#1}{}{(#1 points)}}

\newenvironment{questions}[1][]{\enumerate[,#1]}{\endenumerate}

\newlist{oneparchoices}{enumerate*}{1}
\setlist[oneparchoices,1]{label=\Alph*., itemjoin={{\quad}}}

\newcommand{\choice}{\item}

\begin{document}

Some questions to start with
\begin{questions}[start=4] %<--- start option fixes number for first question
\question[A] question 1 \\
\begin{oneparchoices}
 \choice  option 1
 \choice  option 2
 \choice  option 3
 \choice  option 4
\end{oneparchoices}

\question[B] question 2  \\
\begin{oneparchoices}
 \choice  option 1
 \choice  option 2
 \choice  option 3
 \choice  option 4
\end{oneparchoices}

\question question \label{q}\ref{q} without points
\end{questions}
and, now, two more
\begin{questions}[resume] %<--- resume option follows counting from last time 

\question[A] question 1 \\
\begin{oneparchoices}
 \choice  option 1
 \choice  option 2
 \choice  option 3
 \choice  option 4
\end{oneparchoices}

\question[B] question 2  \\
\begin{oneparchoices}
 \choice  option 1
 \choice  option 2
 \choice  option 3
 \choice  option 4
\end{oneparchoices}
\end{questions}
\end{document}

enter image description here

Related Question