I am using a sans-serif font for my beamer slides but the regular serif math font for my equations. However, if I use \text{} in math mode, the sans-serif font is used. I would like to enforce that the serif font is used when using \text{}.
Here is a MWE
\documentclass{beamer}
\usefonttheme[onlymath]{serif}
\begin{document}
\begin{frame}
I would like to make $f_\text{LO}$ look like $f_\mathrm{LO}$.
\end{frame}
\end{document}
Update: I found out that I should not redefine \text{} but use \textrm{} instead to use the serif font in math mode. By doing that, I can still add regular text using \text{}.

f_{\mathrm{LO}}, see https://tex.stackexchange.com/a/342272/2388 – Ulrike Fischer Aug 31 '20 at 07:15\mathrm{}is that I manually have to add spaces and it behaves differently for hyphens. However,\textrm{}works fine – brnk Aug 31 '20 at 07:22\text{}with\mathrm{}in my document where I use spaces and hyphens. Thank you anyway! – brnk Aug 31 '20 at 07:27