4

I've played around for a while and searched quite a bit but can't find a solution. my code is the following

\documentclass{article}
\usepackage{hepnicenames}
\usepackage{fontspec}
\usepackage[math-style=ISO]{unicode-math}

\setmathfont{Latin Modern Math}
\setmainfont{Latin Modern Roman}

\begin{document}

\section*{About this template}
\begin{equation}
  \mu + \mathrm{\mu} - γ + \mathrm{γ} + \Pmuon
\end{equation}
\end{document}

Unfortunately, when compiling with luatex the mathrm versions never get printed but are simply missing.

lu

  • Welcome to the site. I can confirm the behavior with my installation. – Steven B. Segletes May 8 at 18:00
9

\mathrm is the wrong command, use \symrm

\documentclass{article}
\usepackage{hepnicenames}
\usepackage{fontspec}
\usepackage[math-style=ISO]{unicode-math}

\setmathfont{Latin Modern Math}
\setmainfont{Latin Modern Roman}

\begin{document}

\section*{About this template}
\begin{equation}
  \mu + \symrm{\mu} - γ + \symrm{γ} + \Pmuon
\end{equation}
\end{document}

enter image description here

  • Thanks for the super quick reply! Any insights into how I'd get the \Pmuon from the hepnicenames to work? – hassec May 8 at 18:15
  • the sty is not adapted to unicode-math. Someone would have to rewrite the internal commands to use \sym-commands too. – Ulrike Fischer May 8 at 18:29
  • Ok I guess I could actually work without that package for now. For my understanding, Could you maybe add an explanation on what the difference is between mathrm and symrm? Looking at an old paper the above method seemed to work ~2 years ago for me. – hassec May 8 at 18:31
  • 1
    \symrm will use math symbols from the math font, \mathrm switches to a text font. – Ulrike Fischer May 8 at 18:35
  • For completeness, \symup works too. – Davislor Jun 5 at 1:01

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.