I am writing a document in XeLaTeX using Libertine and Neo Euler as fonts:

\setmainfont{Linux Libertine G}
\setsansfont[Scale=MatchLowercase]{Liberation Sans}
\setmathfont[Scale=MatchLowercase]{Neo Euler}

Now when I use operators like \log or \cos, XeLaTeX typesets them with Neo Euler instead of Libertine (because of the option math-style=upright, required for Neo Euler). How can I keep Libertine, or set an other font (for example Liberation Sans, my sans serif font), as the font for operator names?


This seems to work (I don't have Linux Libertine G, though):

\setmainfont{Linux Libertine O}
\setsansfont[Scale=MatchLowercase]{Liberation Sans}
\setmathfont[Scale=MatchLowercase]{Neo Euler}
\setmathfont[Scale=MatchLowercase,range=\mathit]{Neo Euler}
\setmathfont[range=\mathup]{Linux Libertine O}
\setmathfont[range=\mathbfup]{Linux Libertine O Bold}
log $\log \mathrm{log}\mathbf{log}a+b\sum\int\alpha$

enter image description here

  • Where is that alpha coming from? Libertine? – sujeet Apr 25 '14 at 6:01
  • 1
    @sujeet It's from Neo Euler – egreg Apr 25 '14 at 8:57
  • I think you will want to set partial=upright, nabla=upright – sujeet Apr 25 '14 at 15:01
  • @sujeet If one uses \partial, surely, because otherwise no symbol appears; I can see no difference with \nabla. – egreg Apr 25 '14 at 15:05

As described in Changing the operator font with unicode-math loaded you can use text font specifically for operators:

\setmainfont{Palatino  Linotype}
\setmathfont{Neo Euler}

\setmathfontface\mathOpFont{Palatino Linotype}

I think, this is the most straightforward way, though this interface was introduced years later after the OP's question.

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.