This is a follow-up question to answers sometimes in test, sometimes in answer file.
I went with what the best answer suggested and surrounded each question and answer by \begin{filecontents}{some title} and \end{filecontents}, giving a code similar to this here:
\documentclass[12pt]{article}
\usepackage[margin=2cm]{geometry}
\usepackage{enumitem}
\begin{document}
\begin{center}
\textbf{Mock Exam}
\end{center}
\usepackage{filecontents}
\begin{filecontents}{question-01}
\begin{enumerate}[resume]
\item Here's a question. \par
\begin{enumerate}[label=(\Alph*)]
\item Option A
\item Option B
\item Option C
\item Option D
\item Option E
\end{enumerate}
\end{filecontents}
\begin{filecontents}{question-02}
\pagebreak
\begin{enumerate}[resume]
\item Here's another question.\par
\begin{enumerate}[label=(\Alph*)]
\item Option A
\item Option B
\item Option C
\item Option D
\item Option E
\end{enumerate}
\end{filecontents}
\input{question-01}
\input{question-02}
\end{document}
This works for question numbering (i.e, it assigns the questions the correct numbers), but what will happen once I bring in the solutions? If I add this code in:
\begin{filecontents}{solution-01}
\begin{enumerate}[resume]
\item (A)\par
\vspace{0.2cm}
-Some stuff telling you why the answer is (A)-\par
\end{enumerate}
\end{filecontents}
\begin{filecontents}{solution-02}
\begin{enumerate}[resume]
\item (C)\par
\vspace{0.2cm}
-Some stuff telling you why the answer is (C)-\par
\end{enumerate}
\end{filecontents}
and then insert where the solutions need to go, then I'll get
\documentclass[12pt]{article}
\usepackage[margin=2cm]{geometry}
\usepackage{enumitem}
\begin{document}
\begin{center}
\textbf{Mock Exam}
\end{center}
\usepackage{filecontents}
\begin{filecontents}{question-01}
\begin{enumerate}[resume]
\item Here's a question. \par
\begin{enumerate}[label=(\Alph*)]
\item Option A
\item Option B
\item Option C
\item Option D
\item Option E
\end{enumerate}
\end{filecontents}
\begin{filecontents}{question-02}
\pagebreak
\begin{enumerate}[resume]
\item Here's another question.\par
\begin{enumerate}[label=(\Alph*)]
\item Option A
\item Option B
\item Option C
\item Option D
\item Option E
\end{enumerate}
\end{filecontents}
\begin{filecontents}{solution-01}
\begin{enumerate}[resume]
\item (A)\par
\vspace{0.2cm}
-Some stuff telling you why the answer is (A)-\par
\end{enumerate}
\end{filecontents}
\begin{filecontents}{solution-02}
\begin{enumerate}[resume]
\item (C)\par
\vspace{0.2cm}
-Some stuff telling you why the answer is (C)-\par
\end{enumerate}
\end{filecontents}
\input{question-01}
\input{solution-01}
\input{question-02}
\input{solution-02}
\end{document}
which is unfortunately going to give the following numbering:
1. Question 1
2. Solution 1
3. Question 2
4. Solution 2
I need the numbering to be
1. Question 1
1. Solution 1
2. Question 2
2. Solution 2
Any ideas?
FYI: I do not want to assign these questions and solutions hard values - they may need to be moved around.


exsheetsfor this... – cgnieder Jul 14 '14 at 19:47exsheetsdocument: "On the other hand ExSheets doesn’t – and probably won’t – offer a real possibility for creating multiple choice questions. As a fact it doesn’t provide many (if any) means to specify the type of question or the structure. If these are your needs take a look atexamdesign[Ale01], for example. Or exploit the possibilitiesenumitem[Bez11] gives you."examdesign, at a first glance, isn't meant to display exam solutions. – Clarinetist Jul 14 '14 at 19:53enumitem. It can be used withexsheetswithout problems. The comment means thatexsheetsdoes not define own environments for multiple choice lists like e.g. theexamclass does. OTOHexsheetshas very customizable question headings so it's possible to create a lot of different layouts with it. – cgnieder Jul 14 '14 at 19:58