This is the code I used with pdflatex

% Math letters from Latin Modern Sans
% Math operators
% Math symbols
% Large symbols

and in the code I could select it using


Now I am looking for something similar with luatex. A Math version of Latin Modern Sans is not defined

\setmathfont{Latin Modern Sans Math}    % does not compile

The only known workaround is this, but

\setmainfont{Latin Modern Sans} 
\setmainfont{Latin Modern Roman}
\setsansfont{Latin Modern Sans}
\setmonofont{Latin Modern Mono}

it does not allow to select the math font in the code. How can I implement the code from above for lualatex und fontspec and unicode-math?

1 Answer 1


First, be aware that unicode-math has both \symsfup and \symsfit alphabets (for sans-serif math symbols) as well as \mathsfup and \mathsfit (for sans-serif words in math mode). You might not need a sans math version, if this covers your needs.

Assuming you do: you asked about Latin Modern Sans in the title, but you are in fact using Computer Modern Bright in your code sample, not Latin Modern Sans or Computer Modern Sans. In this MWE, I will use New Computer Modern Sans, which (unlike Latin Modern Sans) supports Greek.

If you want to use sans-serif math letters (but the default math symbols) all the time, you can use


% Define bfup and bfit fonts here, if needed.


\[ v = \symup{e}^{\theta_t} + \symup{c} \]


New Computer Modern Book sample

If you still want New Computer Modern Bright with unicode-math, you must use CMUBright-Roman and CMUBright-Oblique, which support Greek.

This will not, however, give you a \mathversion{sans} that you can switch to. You can do that with the version= option of \setmathfont, but only to switch between a serif and sans-serif math font, e.g.:





\[ v = \symup{e}^{\theta_t} + \symup{c} \]
\[ v = \symup{e}^{\theta_t} + \symup{c} \]


Kepler fonts sample

As of 2022, you unfortunately cannot combine range= and version= in the same document. You can either kitbash a math font with letters from a different text font, or define another math version, but not both.

Finally, you can keep using the same NFSS math-mode commands in LuaLaTeX. Loading fontspec will not change math mode, other than \mathrm, \mathsf, and so on.

You must log in to answer this question.

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