4

I'm trying to typeset the following

$Q_å=l_å \cdot m$

But LaTeX won't typeset these special or accented letters in my document! Is there a simple way to achieve this?

1
  • please provide a MWE; it seems to be related to the missing input encoding definition
    – Micha
    Apr 23, 2013 at 18:46

3 Answers 3

3

Names for accents change in math mode, so you should use \mathring a as follows:

Sample output

\documentclass{article}

\begin{document}

$Q_{\mathring a}=l_{\mathring a} \cdot m$

\end{document}

See the comprehensive list of symbols Table 164 for the other accent commands. Changing input encoding usually does not help for this situation.

ADDITION If your text italics and math italics agree, which is the case by default but may well change if a font package is loaded, then you can implement @daelif's suggestion as follows:

Sample output 2

\documentclass{article}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{mathtools}

\begin{document}

$Q_{\textnormal{\itshape å}}=l_{\textnormal{\itshape å}} \cdot m$

\end{document}

I have used \textnormal to negate any formatting from the surrounding text, inputenc to enable input of å directly, fontenc to ensure a font with a good glyph, and mathtools to ensure the size of the subscript is appropriate.

3
  • why not get the real å? (\usepackage[T1]{fontenc} might be needed) Q_{\textit{\aa}}, then it will be a correctly placed accent and not a composed symbol
    – daleif
    Apr 23, 2013 at 19:04
  • Ahh, great!And thankyou very much for such a fast answer! /Johan
    – Johan
    Apr 23, 2013 at 19:52
  • @daleif That will work nicely provided the text font italic matches math italic, which might not be the case if a font package has been loaded. Apr 24, 2013 at 10:02
1

If you're planning on using these accents in math-mode you should use the \accents package. For this specific example, you would use:

$Q_{\accentset{\circ}{a}}=l_{\accentset{\circ}{a}} \cdot m$

which would output:

accents output

The accents package is very useful and is well documented (see: CTAN - Accents Package)

0

You can use this:

\documentclass[varwidth]{standalone}
\usepackage{amsmath}
\begin{document}
    \begin{equation*}
        Q_å=l_å \cdot m
    \end{equation*}
    \begin{equation*}
        Q_{\mathring{a}}=l_{\mathring{a}} \cdot m
    \end{equation*}
\end{document}

Result:

enter image description here

You must log in to answer this question.

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