Is there a way to set the math font like all the \set...font commands from the fontspec package. For example, if I wanted to use LibertinusSerif-Regular.otf as my main font and LibertinusMath-Regular.otf as my math font, is there any way of doing something like:


where I can simply set the math font just like any other font ? I tried referring to this post but the accepted answer seems to be using lualatex while I am using xelatex . They have used the \setmathfont command which for me produces an undefined control sequence error. Any help is appreciated.

1 Answer 1


setmathfont is defined in unicode-math package, use:

\setmainfont[Ligatures=TeX]{Libertinus Serif}
\setmathfont{Libertinus Math}

There is also Tex Gyre Pagella and Tex Gyre Pagella Math fonts.

You must log in to answer this question.

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