3

I have a problem with Linux Libertine and the \partial sign. I use following code, but there is no \partial sign (I left all my fonts there, but the problem is the font for range=\mathit):

\documentclass{standalone}

\usepackage{fontspec}
\defaultfontfeatures{Ligatures=TeX}
\setmainfont{Linux Libertine O}
\setsansfont[
BoldFont=LinBiolinumOB,
ItalicFont = LinBiolinumOI,
BoldItalicFont = LinLibertineOBI,
]{Linux Biolinum O}
\usepackage{unicode-math}
\setmathfont{TeXGyrePagellaMath} 
\setmathfont[range=\mathup]{Linux Libertine O}
\setmathfont[range=\mathit]{Linux Libertine O Italic}
\setmathfont[range=\mathbfup]{Linux Libertine O Bold}
\setmathfont[range=\mathbfit]{Linux Libertine O Bold Italic}
\begin{document}
    $x\partial x$
\end{document}

Thanks for your help.

0

1 Answer 1

4

You are using a text font for math. Try not to overwrite the math definitions by loading as follows:

\setmathfont[range=\mathit/{latin,Latin,num}]{Linux Libertine O Italic}

This will load the libertine italic font for just normal letters and numbers. You will need to make similar adjustments to your other font loading commands.

Sample output

\documentclass{article}

\usepackage{fontspec}
\defaultfontfeatures{Ligatures=TeX}
\setmainfont{Linux Libertine O}
\setsansfont[
BoldFont=LinBiolinumOB,
ItalicFont = LinBiolinumOI,
BoldItalicFont = LinLibertineOBI,
]{Linux Biolinum O}
\usepackage{unicode-math}
\setmathfont{TeXGyrePagellaMath} 
\setmathfont[range=\mathup]{Linux Libertine O}
\setmathfont[range=\mathit/{latin,Latin,num}]{Linux Libertine O Italic}
\setmathfont[range=\mathbfup]{Linux Libertine O Bold}
\setmathfont[range=\mathbfit]{Linux Libertine O Bold Italic}
\begin{document}
    $x\partial x$
\end{document}
1
  • If i add greek and Greek to the definition, it will also use the Libertine font for those letters
    – Niklas
    Oct 2, 2014 at 18:23

You must log in to answer this question.

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