3

Running the following MWE

\documentclass{article}
\begin{document}
Test $\mathrm{VARfi}$
\end{document}

using XeLaTeX or LuaLaTeX, I observed that Test was rendered in OpenType Latin Modern Roman while VAR was rendered in TFM-based Computer Modern Roman. Is it possible to change \mathrm to use OpenType Latin Modern Roman?

5

Add

\usepackage{fontspec}

to your preamble.

  • 1
    Hmm… No. I’ll admit that this is a trick question: The kerning between V and A and the fi ligature will both disappear, and therefore the result is not the full OpenType Latin Modern Roman. – Ruixi Zhang Oct 22 at 4:00
  • 1
    Welcome back cfr! I didn't see you around for a while or am I wrong? – Dr. Manuel Kuehner Oct 22 at 4:28
  • @RuixiZhang - In addition to loading the fontspec package, one also needs to execute \setmainfont{Latin Modern Roman} to get your desired outcome, viz., kerning between V and A and the fi ligature. – Mico Oct 22 at 4:45
  • 2
    @RuixiZhang if you want ligatures you need to force base mode with luatex: tex.stackexchange.com/a/277395/2388 – Ulrike Fischer Oct 22 at 7:41
  • @RuixiZhang Well, it depends what you mean by 'full'. I guess you mean 'with the kerning and ligature features of traditional maths fonts', but that should be in your question. Probably the question is a duplicate of one of the earlier ones in that case, though there doesn't seem to be a solution for XeLaTeX (?). – cfr Oct 22 at 14:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.