Undefined control sequence \AMC@ovalbox@R when using shape=oval (Bug #358)


Added by Adin Ramirez almost 9 years ago. Updated about 6 years ago.


Status:WontFix Start date:05/11/2015
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:-
Target version:-

Description

In the test version, the use of shape=oval on the \AMCboxDimensions throws an undefined control sequence \AMC@ovalbox@R


History

Updated by Adin Ramirez almost 9 years ago

Ok, after checking the code, it seems that the issue is with the creation of the boxes.

In line 1582 (AMC 1.2.2015.042501 r:71663983de2d+) the boxes are created at the beginning of the document. So, when you use them on the definition of \AMC@shapeprepare@oval it doesn't have the boxes defined yet.

Not sure if that is the same way it was implemented before, but when one moves the box creation before the beginning of the document (I just moved them outside to be defined with the macros) it works.

Will keep an eye to see if something else breaks.

By the way, when these bugs are fixed on the development version, do you push them instantly? Or one needs to wait?

Updated by Alexis Bienvenüe almost 9 years ago

Can you get it working calling \AMCboxDimensions at some particular place (after \begin{document} or so)?

Please feel free to make a merge request on the bitbucket repository if you can fix this bug ;)

By the way, when these bugs are fixed on the development version, do you push them instantly? Or one needs to wait?

Building new packages from mercurial repository to PPA is manual : one needs to wait for me to push it. Tell me if you want to be involved in the process.

Updated by Adin Ramirez almost 9 years ago

The \AMCboxDimensions doesn't work.

Sure, I can push my fix. Is there any documentation on the development version, to follow some common best practices?

Updated by Alexis Bienvenüe almost 9 years ago

Can you attach a minimal working example that shows the bug? My test files work as expected…

Updated by Adin Ramirez almost 9 years ago

This is the code I tested:

\documentclass{article}

\usepackage[]{automultiplechoice}
\usepackage{tikz}% <- also, on the test environment one has to input this by hand or you get a tikz error
\AMCboxDimensions{shape=oval}
\begin{document}

\onecopy{1}{

\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}
}   
\end{document}

The error:

! Undefined control sequence.
<argument> \AMC@ovalbox@R 

l.5 \AMCboxDimensions{shape=oval}

Also, the version is as stated above (AMC 1.2.2015.042501 r:71663983de2d+). And, I did a pull request earlier (https://bitbucket.org/adinriv/auto-multiple-choice), but not sure if it was the correct way. Please, let me know if it works.

Updated by Alexis Bienvenüe almost 9 years ago

One work-around is to call \AMCboxDimensions{shape=oval} (or \AMCboxStyle{shape=oval}) after \begin{document}.
Thanks for your pull-request. I added a comment to explain my current hesitation for it.

Updated by Adin Ramirez almost 9 years ago

Yes, I saw it. The problem is that you cannot use it in other packages or styles (that define things before \begin{document}.

That is how I found that it wasn't working. Because, I wrote a small wrapper that defines the styles, and I need to configure everything in the style for its use.

So, when you try to define it in the options preamble (like many other packages) it breaks. I really can't see why it needs to be declared inside the document. One should be able to define it anywhere. In that sense, probably not a bug, but a feature request?

Updated by Alexis Bienvenüe about 7 years ago

  • Status changed from New to WontFix

Updated by Christophe Stephan about 6 years ago

Just use
\AtBeginDocument{\AMCboxStyle{shape=oval}}
in your package/style files and it works ok.

Also available in: Atom PDF