The box option undefines \AMCbeforeQuestion (Bug #359)


Added by Adin Ramirez about 10 years ago. Updated over 4 years ago.


Status:Closed Start date:05/14/2015
Priority:Normal Due date:
Assignee:- % Done:

100%

Category:LaTeX
Target version:-

Description

I was checking that the use of box option in the package removes the space between the text (in the elements) and the questions, or between questions.

I think, that the definition of box redefines \AMCbeforeQuestion and removes the space it inserts.

For example, consider this:

\documentclass{article}

\usepackage[box]{automultiplechoice}    
%\def\AMCbeforeQuestion{\vspace{\AMCformVSpace}\par}

\begin{document}

\element{test}{
  This text shows that the space is strange withing the elements.

  \insertgroup{q}
}

\element{q}{
\begin{question}{q1}
  question
  \begin{choices}
    \correctchoice{answer}
    \wrongchoice{answer}
    \wrongchoice{answer}
    \wrongchoice{answer}
  \end{choices}
\end{question}
}

\element{q}{
\begin{question}{prez}
  Among the following persons, which one has ever been a President of the French Republic?

  \AMCOpen{lines=5}{\wrongchoice[W]{w}\scoring{0}\wrongchoice[P]{p}\scoring{2}\correctchoice[C]{c}\scoring{4}}
\end{question}
}

\onecopy{1}{
  \insertgroup{test}
}
\end{document}

If you uncomment the redefinition of \AMCbeforeQuestion you get the same spacing between the text in element test and the question. However, if you try it with the box option you get a shorter vertical space (which looks odd) between the text and the question. Moreover, notice that that doesn't happen you have no box option.

So, I infer from that that the box option is the one redefining the space somehow. I couldn't find where exactly in the code that option is redefined. But my intuition tell me that it has to do with the option that is associated with box.


History

Updated by Alexis Bienvenüe over 4 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF