0

How to print several exams in the same document using exsheets?

I need to print several exams using

\includequestions[random=1]{easy}
\includequestions[random=1]{medium}
\includequestions[random=1]{hard}
jub0bs
  • 58,916
  • You don't say much about what exactly you want to do, but I think this should be relevant: http://tex.stackexchange.com/questions/139531/how-can-i-automate-the-workflow-for-producing-multiple-versions-of-a-document and http://tex.stackexchange.com/questions/1492/passing-parameters-to-a-document – jub0bs Jan 22 '14 at 21:02
  • 1
    It would also be useful to add details about what goes wrong when you try to do what you want to do - what errors do you get? – verdammelt Jan 22 '14 at 21:30

1 Answers1

1

The question is quite unclear to me. A basic example of what I think you want would look like this:

\documentclass{article}
\usepackage{exsheets}

% declare a class `difficulties':
\DeclareQuestionClass{difficulty}{difficulties}

% the external file that holds the exercises
\usepackage{filecontents}
\begin{filecontents*}{my-exercises.tex}
\begin{question}[difficulty=easy]
  First easy question.  
\end{question}
\begin{question}[difficulty=easy]
  Second easy question.  
\end{question}
\begin{question}[difficulty=easy]
  Third easy question.  
\end{question}
\begin{question}[difficulty=medium]
  First medium question.  
\end{question}
\begin{question}[difficulty=medium]
  Second medium question.  
\end{question}
\begin{question}[difficulty=medium]
  Third medium question.  
\end{question}
\begin{question}[difficulty=hard]
  First hard question.  
\end{question}
\begin{question}[difficulty=hard]
  Second hard question.  
\end{question}
\begin{question}[difficulty=hard]
  Third hard question.  
\end{question}
\end{filecontents*}

\begin{document}

\SetupExSheets{use-difficulties={easy}}
\includequestions[random=1]{my-exercises}

\SetupExSheets{use-difficulties={medium}}
\includequestions[random=1]{my-exercises}

\SetupExSheets{use-difficulties={hard}}
\includequestions[random=1]{my-exercises}

\end{document}

enter image description here

cgnieder
  • 66,645