# Error with math accent in mathmode

I have a problem with the formula:

F_q=\frac{Q_1 \cdot Q_2}{\epsilon \cdot 4\pi \cdot r^2}\\
\epsilon = \epsilon_0 + \epsilon_{\text{r}} \\
\epsilon_0 : Elektrische Feldkkonstante\\
\epsilon_r : Dielektrizitätszahl


The first \epsilon_r prints fine, but the second does not. I get the following error:

! Please use \mathaccent for accents in math mode. \accent \epsilon_{\text{r}} : Dielektrizitä

I already tried following without success:

\epsilon_{r}
\epsilon_{\text{r}}


I hope that someone can help me.

• Unrelated: I assume you're using \text{r} to get an upright r in the subscript. That is the wrong macro to use, use \mathrm or similar instead. Her's why: \textit{text $A_{\text{r}}$ text} that r is now italic because \text follows the surrounding text, not what you wanted. Dec 2, 2019 at 10:02

\text{r} should be \mathrm{r} as it is (I assume part of the math notation and should not pick up the current text font) but conversely Dielektrizitätszahl should be

\text{Dielektrizitätszahl} or perhaps better \textrm{Dielektrizitätszahl}

it is needed for the ä (which generates the error) but even without the accent error you probably want a text font for a word, not math italic.

• as an alternative for \text for that long word, wouldn't \textnormal be better? \text might still be italic inside a theorem. Dec 2, 2019 at 10:04
• @daleif yes, or \textrm perhaps. Dec 2, 2019 at 10:05
• I think I learned the hardway one day why \textnormal was better (consider a situation where some of the text is sans serif, \textrm will switch to serif). Dec 2, 2019 at 10:39
• @daleif yes but arguably it's like \mathrm the choice of math font shouldn't reflect the document default, you need \text... here for technical reasons on the accent handling but otherwise if you are using \mathrm for r why not \textrm for thsi? Dec 2, 2019 at 10:53

Thanks for your replies. The solutions with:

\textrm{...}
\textnormal{...}


work all, but they change the font and remove the italic style of the text in the math mode. Someone helped me with a small command:

\newcommand{\aumlaut}{\text{\textit{\"a}}}


I also created more commands for the ö and ü, in case I would need them later.