## Error with babel and AMC

I just get a weird error while using open questions and babel with spanish language.

See the example attached. The error I got is:

@! Extra \endcsname.
\language@active@arg~ ...@~@\string #1@\endcsname
\fi
l.28 }


I'm ignoring this, since I wasn't doing a \csname.
! Extra \endcsname.
\language@active@arg~ ...@~@\string #1@\endcsname
\fi
l.28 }@


And in the resulting document I obtained an "@" at the end of each line of the open question.

### Replies (2)

#### RE: Error with babel and AMC - Added by Alexis Bienvenüealmost 8 years ago

It seems that the character ~ is made active by spanish babel, and this disturbs AMC.
You can replace ~ with \hspace*{0pt} in lines 1304, 1306 and maybe 1321 (these are lines in my version of AMC, perhaps different for your version) from automultiplechoice.sty (inside definition of \AMCopen@lines).
Or you can copy /usr/share/texmf/tex/latex/AMC/automultiplechoice.sty to your project directory, and make the correction on this file.

#### RE: Error with babel and AMC - Added by Adin Ramirezalmost 8 years ago

Thanks, that did the trick.

Instead of changing the source one can patch it using etoolbox package (so you don't break it when you update the AMC).

In case someone is interested on the solution:

\patchcmd{\AMCopen@lines}{~}
{\hspace*{0pt}}
{}{}


and include \usepackage{etoolbox}

(1-2/2)