6

Consider this example:

\documentclass{article}
\usepackage{unicode-math}

\setmainfont{Linux Libertine O}
\setmathfont{XITS Math}
\setmathfont[range=\mathit/{latin,Latin,greek,Greek,num}]{Linux Libertine O Italic}

\begin{document}
\textit{f}(\textit{q})
$f(q_i,p_i,t)
\left[ \int df \right]$
\end{document}

This uses Linux Libertine for many math characters, but the brackets are still taken from XITS Math and therefore the spacing is bad (the 'f' collides with the bracket).

How can I use the brackets from Linux Libertine in math mode? Additionally, is it possible to get the brackets that adjust to their content (like '\right]') from Linux Libertine as well?

Edit: To clarify, the example shows that the spacing is correct in textmode, but fails in mathmode. I wonder why this is the case and how it may be fixed.

Emerson
  • 3,530

2 Answers2

1

I am using the following additional definition:

\setmathfont[range=\lbrace] {Linux Libertine O}
\setmathfont[range=\rbrace] {Linux Libertine O}
\setmathfont[range=\lparen] {Linux Libertine O}
\setmathfont[range=\rparen] {Linux Libertine O}

This does not work well with italics, however.

Werner
  • 603,163
1

Not sure if there is an automatic way to fix this, but adding a manual thinspace (\,) seems to work (run with XeLaTeX):

\documentclass{article}
\usepackage{unicode-math}

\setmainfont{Linux Libertine O}
\setmathfont{XITS Math}
\setmathfont[range=\mathit/{latin,Latin,greek,Greek,num}]{Linux Libertine O Italic}

\begin{document}
\textit{f}(\textit{q})
$f\,(q_i,p_i,t)
\left[ \int df \,\right]$
\end{document}
Peter Grill
  • 223,288