I'm trying to typeset using UTF8 and use the answers package. However, compilation halts on \begin{sol}, with

 Kapitola 1.
   ! Missing \endcsname inserted.
   <to be read again> 
   l.20         \begin{sol}

If I switch to utf8x, the compilation halts even sooner on \Newassociation{sol}{Riešenie}{ans}

If I remove the \usepackage{inputenc} line, document compiles, but of course some of my characters will be displayed incorrectly.

This is the code that is causing all the trouble:






Naucili sme sa ze odpoved je tri.
        Tiez tri.
  • 2
    Welcome to TeX.SX! The second argument to \Newassociation is an environment name, so it can't have accented characters.
    – egreg
    Jul 8, 2015 at 15:13

1 Answer 1


The command \Newassociation receives three arguments that must be letter only:

After that, there should be several declarations of the form


where xxx is an environment in the document, and yyy is an environment which will surround the contents of xxx when it is written to symbolic file handle zzz. The names xxx, yyy and zzz should consist of letters only, not numbers, punctuation or spaces.

Here “letters” should be, more precisely, ASCII letters. The second argument is the name of an environment that contains the solutions and can be redefined if so desired, but its name is unimportant, so long as it is a new one. Actually, numbers, punctuation and spaces are allowed; not accented characters, though.

Use \Newassociation{sol}{solution}{ans} and all will go well.

  • 1
    Why not numbers? I could create without problems environments with the names "A3", "A2" (for large pages) as \csname is used internally. Jul 8, 2015 at 15:39
  • @UlrikeFischer Don't ask me: I reported what's in the manual. But I added the remark.
    – egreg
    Jul 8, 2015 at 15:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.