TeX - LaTeX Asked by rgm on October 22, 2020
I’m trying to write a Latex source file to create my first exam in AMC. However, my Latex file is producing copies with repeated questions and I couldn’t find out how to solve that reading the official manual. I’d be very grateful if anyone could help me. Thanks in advance!
My MWE is:
documentclass[a4paper]{article}
usepackage[utf8x]{inputenc}
usepackage[T1]{fontenc}
usepackage{automultiplechoice}
begin{document}
setdefaultgroupmode{withoutreplacement} %I thought this could solve the problem!?
begin{examcopy}[10]
cleargroup{finalgroup}
element{group01}{
begin{question}{group01q01} Analysis
begin{choices}
correctchoice{Correct choice}
wrongchoice{Wrong choice (1)}
wrongchoice{Wrong choice (2)}
wrongchoice{Wrong choice (3)}
end{choices}
end{question}
}
element{group01}{
begin{question}{group01q02} Algebra
begin{choices}
correctchoice{Correct choice}
wrongchoice{Wrong choice (1)}
wrongchoice{Wrong choice (2)}
wrongchoice{Wrong choice (3)}
end{choices}
end{question}
}
element{group01}{
begin{question}{group01q03} Geometry
begin{choices}
correctchoice{Correct choice}
wrongchoice{Wrong choice (1)}
wrongchoice{Wrong choice (2)}
wrongchoice{Wrong choice (3)}
end{choices}
end{question}
}
shufflegroup{group01}
copygroup[2]{group01}{finalgroup}
element{group02}{
begin{question}{group02q01} Verbs
begin{choices}
correctchoice{Correct choice}
wrongchoice{Wrong choice (1)}
wrongchoice{Wrong choice (2)}
wrongchoice{Wrong choice (3)}
end{choices}
end{question}
}
element{group02}{
begin{question}{group02q02} Pronouns
begin{choices}
correctchoice{Correct choice}
wrongchoice{Wrong choice (1)}
wrongchoice{Wrong choice (2)}
wrongchoice{Wrong choice (3)}
end{choices}
end{question}
}
element{group02}{
begin{question}{group02q03} Adjectives
begin{choices}
correctchoice{Correct choice}
wrongchoice{Wrong choice (1)}
wrongchoice{Wrong choice (2)}
wrongchoice{Wrong choice (3)}
end{choices}
end{question}
}
shufflegroup{group02}
copygroup[2]{group02}{finalgroup}
shufflegroup{finalgroup}
insertgroup{finalgroup}
end{examcopy}
end{document}
My mistake was about the order of the instructions of the document. At the beginning of the document, we write
setdefaultgroupmode{withoutreplacement}
indeed. Then, we describe the "base" groups. Only after all the groups are written, we begin the "examcopy" environment, in which we create the "final group", shuffle groups, transfer questions from the base groups to the final group and insert the final group, that is, the questionnaire.
Answered by rgm on October 22, 2020
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP