I use a Swedish usepackage and when I write, for instance, å in formulas I get an error message please use \mathaccent ….

Here's what I try to write:

    {R} = \{alla\:tal\:på\:tallinjen\}

At \end{align} I get the error message:

Please use \mathaccents for accents in math mode. \add@accent … spacefactor \spacefactor}\accent #1 #2\egroup \spacefactor …
1.54 \end{align}
I'm changing \accent to \mathaccent here: wish me luck.
(Accents are not the same in formulas as in text.)

I have tried with \aa but that doesn't work. Where is my failure?

  • 9
    You should use \{\text{alla tal på tallinjen}\}
    – egreg
    Commented May 11, 2013 at 8:26
  • Welcome to TeX.sx! Feel free to visit the TeX.SX starter guide that provides useful tips for new users to get the most out of the site. Oh, and välkommen! Commented May 11, 2013 at 8:55

1 Answer 1


"Accents" in math mode can have a precise mathematical meaning. For instance $\dot{a}$ isn't related to the use of the letter ȧ in words, but usually means a derivative with respect to time. Similarly, $\ddot{a}$ is the second derivative and has nothing to do with ä.

Thus TeX disallows text accent commands in math mode: one should know what he/she is writing.

Your case is different: you want text inside a math formula; then use \text, which is provided by amsmath (you already load it).

    R = \{ \text{alla tal på tallinjen} \}

By the way, that formula is unnecessarily complicated:

R = \{ \text{alla tal på tallinjen} \}

not only is simpler, but provides for better vertical spacing.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .