# Writing å, ä, ö in mathmode

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:

\begin{align}
\begin{split}
{R} = \{alla\:tal\:på\:tallinjen\}
\end{split}
\end{align}

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?

• You should use \{\text{alla tal på tallinjen}\} – egreg May 11 '13 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! – Peter Jansson May 11 '13 at 8:55

"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).

\begin{align}
\begin{split}
R = \{ \text{alla tal på tallinjen} \}
\end{split}
\end{align}

By the way, that formula is unnecessarily complicated:

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

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