Use the eulervm font only for a few letters in math mode

eulervmfontsmath-mode

I would like to use the font type provided eulervm, but including this packages in the LaTeX document forces this font type to all letters. As an MWE, consider the following:

\documentclass{article}
\usepackage{xcolor}
\usepackage{amsmath}
\usepackage{eulervm}
\begin{document}
$E=m\times \color{red}c^2$
\end{document}

Here I would like to achieve that only c will have the font type of eulervm. Could you please help me how to reach this goal?

Best Answer

The package declares

\DeclareSymbolFont{letters}       {U}{zeur}{m}{n}

so instead of loading the package just declare that font as a math alphabet

enter image description here



\documentclass{article}
\usepackage{xcolor}

\DeclareMathAlphabet\matheuvm{U}{zeur}{m}{n}
\usepackage{amsmath}

\begin{document}
$E=m\times \color{red}\matheuvm{c}^2$
\end{document}