2

I would like to use mcexam to draw n questions from a bank of m > n questions.

I append an MWE showing a bank of three questions, from which I want to draw two; I indicate with comments the option I would like.

\documentclass{article}

\usepackage[output=exam
  ,numberofversions=1
  ,version=1
  ,seed=1
  ,randomizequestions=true
  ,randomizeanswers=true
  ,writeRfile=false
  %,numberofquestions=2
  ]{mcexam}

\begin{document}

\begin{mcquestions}

\question Which of the below makes a balanced diet?
\begin{mcanswerslist}[ordinal]
  \answer egg and bacon;
  \answer egg, sausage and bacon;
  \answer egg and Spam;
  \answer egg, bacon and Spam;
  \answer[correct] lobster Thermidor aux crevettes with a Mornay sauce, served in a Provençale manner with shallots and aubergines, garnished with truffle paté, brandy and a fried egg on top and Spam
\end{mcanswerslist}

\question Is this going to be on the exam?
\begin{mcanswerslist}[ordinal]
  \answer Russell's antinomy
  \answer Gödel's numbering
  \answer Borges' library
  \answer Smullyan's What Is The Name Of This Book
  \answer[correct] all of the above
\end{mcanswerslist}

\question Have you ever danced with the devil in the pale moonlight?
\begin{mcanswerslist}[ordinal]
  \answer Cesar Romero
  \answer[correct] Jack Nicholson
  \answer Heath Ledger
  \answer Joaquin Phoenix
  \answer Mark Hamill
\end{mcanswerslist}

\end{mcquestions}

\end{document}

Is there an approach now that's cleaner than that at How do I generate in LaTeX a list of random questions avoiding repetitions? (e.g. in LuaLaTeX)?

0 Answers0