[Tex/LaTex] Setting math fonts in Beamer

beamerfontsmath-mode

Is it possible to only change the math font in Beamer with XeLaTeX? The only partial solution I've been about to find is to create a new command:

\renewcommand\mathfamilydefault{\rmdefault}

The above command does essentially what I want, but it also strangely inserts characters (lmr) prior to maths. For example,

\mathfamilydefault{${x}_{ij} = -d_{k}/d_{0}$},

yields:

enter image description here

Best Answer

there is no need for using that macro inside your text. It is an internal definition and has the value lmr

\documentclass{beamer}
\renewcommand\mathfamilydefault{\rmdefault}

\begin{document}
\begin{frame}{foo}
${x}_{ij} = -d_{k}/d_{0}$
\end{frame}
\end{document}
Related Question