\newsavebox gives "already defined" message

Added by Guilherme Vargas 7 days ago

I have a file with several questions to use in AMC, and recently I noticed that whenever I try to use the \newsavebox command, whatever the savebox's name is, it will give me an "already defined" error message.

For example, from the documentation:

Use the command \savebox, outside the onecopy command, to display a longer text with linebreaks.
\newsavebox{\correcbox}
\savebox{\correcbox}{\parbox{5cm}{\color{red}{Here a linebreak\\or\\here...}}}

Call out the boxe's contents:
\AMCOpen{lines=4,lineheight=0.15cm, answer= \usebox{\correcbox}}{the scoring}

This gives me an error stating that the command \correcbox was already defined. Any ideas?

Thanks!


Replies (2)

RE: \newsavebox gives "already defined" message - Added by Frédéric Bréal 7 days ago

Works fine to me.
See my MWE.

AMC 1.7.0

simple.tex (1 kB)

RE: \newsavebox gives "already defined" message - Added by Alexis Bienvenüe 6 days ago

@Guilherme can you post a minimal example of a source file showing your problem?

(1-2/2)