1

I'd like to have the Danish letter ø in my text. It's very simple when I mean plain text: {\o}. How can I achieve the same result in the math mode? If I add {\o} to my formulas, this character isn't printed.

I believe that my question isn't a dupplicate of any of these: 1 or 2, because I don't want to be able to write ø in the math mode. On the contrary, I'd like to use the command {\o} as I do in the text mode (it is more convenient for me since I'm not used to the Danish keyboard).

  • 1
    Exactly what do you need ø for in math? If it is as an index, use R_{\textup{sø}} or similar. ø (and \o)is generally not allowed in math mode. – daleif Jul 11 '16 at 11:30
  • @daleif, as an index. Thank you, it works:) – user2738748 Jul 11 '16 at 12:17
  • I've added it as an answer – daleif Jul 11 '16 at 12:26
5

Generally non-ascii letters are not allowed in math mode, there are various methods to allow them, but generally non-english letters are only used in two cases within math

  1. As a part of an index. Here it is recommended to use _{\textup{sø}} or _{\textnormal{sø}} as this switches back to the (upright) text font where non-english letters are allowed

  2. The other is textual comments in a displayed formula. Here \text{....} is recommended.

    \[ f(x)>0 \qquad \text{for all $x>0$} \]
    

    as this also switch to the context correct font.

Note that it is not recommended to use \text for 1. as textual indices should be upright and \text{text} will be italic in an italic context.

Note this shortcut (due to @egreg)

\newcommand\tsub[1]{_{\textup{#1}}}

Then use $R\tsub{sø}$ a bit faster to write, and also easier to change if you later on want to change \textup into \textnormal

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.