7

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?

  • 9
    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
14

"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:

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

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

| improve this answer | |

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.