So this is going to sound strange, but I'm wondering if there is a clean way to do this.
By the time I have a project done, I will have written two .tex files: one with questions, and another one with solutions. For purposes of peer review, I'd like to know if there's a way for me to use \include so that if each question and solution to each respective question spans only one page, the question and solution will be paired together so that the question is first and the solution is second.
Is there a way (or a better way) to do this beside manually copying/pasting code?
MWE:
Questions:
\documentclass[12pt]{article}
\usepackage[margin=2cm]{geometry}
\usepackage{enumitem}
\begin{document}
\begin{center}
\textbf{Mock Exam}
\end{center}
\begin{enumerate}
\item Here's a question.
\begin{enumerate}[label=(\Alph*)]
\item Option A
\item Option B
\item Option C
\item Option D
\item Option E
\end{enumerate}
\newpage
\item Here's another question.
\begin{enumerate}[label=(\Alph*)]
\item Option A
\item Option B
\item Option C
\item Option D
\item Option E
\end{enumerate}
\end{enumerate}
\end{document}
Solutions:
\documentclass[12pt]{article}
\usepackage[margin=2cm]{geometry}
\begin{document}
\begin{center}
\textbf{SOLUTION}
\end{center}
\begin{enumerate}
\item (A)
\vspace{0.2cm}
-Some stuff telling you why the answer is (A)-
\newpage
\item (C)
\vspace{0.2cm}
-Some stuff telling you why the answer is (C)-
\end{enumerate}
\end{document}
This is the general way I have been creating MC exams and solutions in the past for the company, and it's still very early in the project, so I can change the code so that it works if necessary. It's just that I found it very time-consuming to copy-and-paste the solutions into a new file for peer review.



.texcode, how the questions and solutions are defined. Are they coming one after another one, i.e. question 1, question 2... and solution 1, solution 2... etc.? Are they contained in environments. Please post a MWE what you already have. – Jul 14 '14 at 14:50enumerateenvironment to group the questions and solutions by number. Everything else is just text. – Clarinetist Jul 14 '14 at 14:51enumerateapproach. – Jul 14 '14 at 14:53enumerateand the solutions as well, as far as I understand it, this would be difficult to break into pages to be included pagewise, or am I misled? – Jul 14 '14 at 15:01exsheetsis a better way to do it? – Jul 14 '14 at 15:10answerspackage so that you can keep the questions and the answers in the same source file, but compile them to either one or two pdfs as you wish - see http://tex.stackexchange.com/questions/186530/package-answers-is-it-possible-to-append-all-solutions-to-one-output-file/186565#186565. For a simple partial solution, see http://tex.stackexchange.com/questions/97904/toggle-visibility-of-solutions-in-latex-output-for-exams/97912#97912. – Ethan Bolker Jul 14 '14 at 15:12