Forums » Using AMC (english) »
selecting a certain question from group
Added by KYR GI over 6 years ago
Dear all,
I am using \insertgroup[3]{questions-simple}
to insert 3 question from group "question-simple".
How can I select 3 certain ones from the group ie 1,5 and 10th question. I am using numbers for its question (ie \begin{question}{1})
thank you
KYR.
Replies (6)
RE: selecting a certain question from group - Added by Frédéric Bréal over 6 years ago
With AMC 1.3.0 or higher.
The documentation
Groups of questions can be manipulated more precisely thanks to the following commands: \insertgroup[n]{mygroup} (using optional parameter n) only inserts the n first elements from the group. \insertgroupfrom[n]{groupname}{i} The command does the same as \insertgroup[n]{groupname}, starting from element at index i (the first element has index 0). \cleargroup{mygroup} clears all group content. \copygroup{groupA}{groupB} copies all the elements from group groupA to the end of group groupB. With an optional argument n, only the n first elements will be copied: \copygroup[n]{groupA}{groupB}
RE: selecting a certain question from group - Added by KYR GI over 6 years ago
many thanks for your prompt reply.
just one more question. How can I squeeze as much as possible tick answers in a line?
I am using multicols but it can go up to 6.
I have no text per answer just the tick boxes,that the student must select.
thank you again,
KYR. GI.
RE: selecting a certain question from group - Added by KYR GI over 6 years ago
just to add to the above, without shuffling the answers, so that the answers are in the same order as in the source.tex
RE: selecting a certain question from group - Added by Frédéric Bréal over 6 years ago
just to add to the above, without shuffling the answers, so that the answers are in the same order as in the source.tex
Add the option : [o]
\begin{choices}[o] \correctchoice{} \wrongchoice{} \wrongchoice{} \wrongchoice{} \wrongchoice{} \wrongchoice{} \end{choices}
I am using multicols but it can go up to 6.
I don't understand why ? What is the paper size ?
I think this code could work,choose your unit.
\begin{multicols}{6} \begin{choices}[o] \correctchoice{}\hspace*{-3cm} \wrongchoice{}\hspace*{-3em} \wrongchoice{}\hspace*{-3pt}} \wrongchoice{}\hspace*{-3mm} \wrongchoice{}\hspace*{-3ex} \wrongchoice{} \end{choices} \end{multicols}
RE: selecting a certain question from group - Added by KYR GI over 6 years ago
thank you for your prompt reply.
the [0] worked fine.
I am using two columns for the whole test and 6-10 columns for the choices of each question.
What I am trying to do is to match a 2x 8 byte word (ie
ff ae ab s3 4a ae ae ae \newline
ae ae ae ae ae ae ae ae \newline
to the answer choices. (student must find certain hex numbers).
I tried to use a table inside the choices, but with partial success. ie
\begin{tabular}{p{5mm} p{5mm} p{5mm} p{5mm} p{5mm} p{5mm} p{5mm} p{5mm}}
\wrongchoice{} &\wrongchoice{} &\wrongchoice{} &\wrongchoice{} &\wrongchoice{}&\wrongchoice{}&\correctchoice{} &\correctchoice{} \\
the catalog is print ok, but the student subject has no boxes at all. it is just empty.
RE: selecting a certain question from group - Added by KYR GI over 6 years ago
it seems I managed to do what I had in mind.
I used the \AMCBoxOnly{ordered=true} command as follows.
\AMCBoxOnly{ordered=true}{
\wrongchoice[A]{}\correctchoice[A]{}\wrongchoice[C]{}\wrongchoice[D]{}\wrongchoice[A]{}\correctchoice[A]{}\wrongchoice[C]{}\wrongchoice[D]{}
\newline
The answers are printed in order and in one line.
It can be useful to other people trying the same.
KYR.
(1-6/6)