0
\documentclass[a4paper,12pt]{article}

\usepackage{fontspec}
\setmainfont{Latin Modern Sans}

\begin{document}
$\mathrm{Bluefox}$ Bluefox
\end{document}

Produces two "Bluefox"s that look identical and are in Latin Modern Sans. I basically want to redefine \mathrm, but doing so doesn't seem to work. I've also tried importing a font with \newfontfamily (Latin Modern Roman) and using that in math mode but it only works outside of math mode.

1

1 Answer 1

0

You can set \mathrm to another font like this:

\documentclass[a4paper,12pt]{article}

\usepackage{fontspec}
\setmainfont{Latin Modern Sans}
\setmathrm{Latin Modern Roman}
\begin{document}
$\mathrm{Bluefox}$ Bluefox
\end{document}

enter image description here

You must log in to answer this question.

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