Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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

\usepackage[math-style=upright]{unicode-math}
\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?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

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

\documentclass{article}
\usepackage{unicode-math}
\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}
\begin{document}
log $\log \mathrm{log}\mathbf{log}a+b\sum\int\alpha$
\end{document}

enter image description here

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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