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.

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.

share|improve this question
    
You could manually add a thinspace \, to add the additional space. And it seems that the brackets already do auto adjust their height as you have it. –  Peter Grill Sep 12 '11 at 12:45
    
Does this question on italic correction for linux libertine font help? –  Peter Grill Sep 12 '11 at 15:33
    
This happens with other fonts as well, so the issue is not specific to Linux Libertine. –  Emerson Sep 13 '11 at 15:29
add comment

2 Answers

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}
share|improve this answer
    
This is a nice workaround, but I'm more interested in fixing this globally. –  Emerson Sep 13 '11 at 15:30
add comment

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.

share|improve this answer
    
Welcome to TeX.SX. –  Papiro Jul 16 '13 at 23:13
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.