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.

Well, the title of the question pretty much says everything. To be more precise: I'd like to know (1) what font would be visually suitable to use with Linux Libertine and/or Linux Biolinum as the main text font (I haven't decided which of the two I'll use) and (2) how to enable it (as a math font) in XeTeX.

share|improve this question
add comment

4 Answers 4

up vote 18 down vote accepted

A good guide on what factors to consider when mixing fonts is Thierry Bouche's Diversity in math fonts article in TUGboat, Volume 19 (1998), No. 2.

The most important aspect is to use the same font for text and math letters (as well as letter-like symbols as \partial or \infty). This has drawbacks as some letters will suffer from spacing problems, but compared to the other option (using totally different math letters), it's really a lesser evil. Of course, if this is not acceptable to you, then you should first choose the math font and then use the same font for text, but that limits your font choices dramatically.

Once you've assigned the text font to the math letters, the remaining choices you face is for the geometric symbols, the delimiters and the big operators (\sum, \int, \bigcup etc.). The main consideration is color (how bold the symbols are) and the shape of the symbols (mainly the shape of sum or integral symbols, especially if you use them often). Compared to Libertine, XITS and Asana are a bit too bold (especially true for the sum symbol), Latin Modern is a bit too light (especially +, \otimes, etc.), and Cambria has a very huge \sum symbol, huge \otimes and \oplus as well as very bold \bigcup. Thus, which font will look better will depend on what type of math you're typing, and none will be perfect.

Here's a sample to show the results of this font mixing with Libertine. Notice the spacing problems around the f in f(r_k) and \Sigma_c f(r) due to the fact that's it's a text font we're using for math. I've not set all letter-like symbols to come from Libertine (only \infty), so there's still room for improvement. (Note also the missing parenthesis in one of the formulas with Latin Modern Math.)

libertine with different math fonts




\setmainfont{Linux Libertine O}

% use Libertine for the letters
\setmathfont[range=\mathit/{latin,Latin,num,Greek,greek}]{Linux Libertine O Italic}
\setmathfont[range=\mathup/{latin,Latin,num,Greek,greek}]{Linux Libertine O}
\setmathfont[range=\mathbfup/{latin,Latin,num,Greek,greek}]{Linux Libertine O Bold}
%\setmathfont[range={"2202}]{Linux Libertine O}% "02202 = \partial % doesn't work
\setmathfont[range={"221E}]{Linux Libertine O}% "0221E = \infty
% etc. (list should be completed depending on needs)

When computing the sums $\sum_{k=0}^{+\infty}{f(r_k)}$ of $f$ the integral representation of $K_0(x)$ may be used.
  \eta(r)\frac{\partial f}{\partial r} + 2\Sigma_cf(r)
    = \sum_{k=0}^{+\infty}{K_0\mathopen{}\left(\frac{\lvert r - r_k \rvert}{L}\right)} 
    = \int_{0}^{\infty}{e^{-\left(z+\frac{r^2}{4L^2\pi}\right)} \frac{dz}{2z}}.
We then use
  \bigcup_{\lambda \in \Lambda}{U_\lambda} \cap  \bigsqcup_{\delta > 0}{G_\delta} = \bigcap_{i \in I}{\mathbf{A}_i}
  \quad \text{so that} \quad 
  u \otimes w \oplus v = 0.



\section{Libertine + Latin Modern}
\setmathfont{Latin Modern Math}\setlibertinemath

\section{Libertine + Cambria}
\setmathfont{Cambria Math}\setlibertinemath

\section{Libertine + XITS}
\setmathfont{XITS Math}\setlibertinemath

\section{Libertine + Asana}
\setmathfont{Asana Math}\setlibertinemath

share|improve this answer
add comment

In the MWE below, a pangram is first in text italics (with Linux Libertine) and then in four different math alphabets -- Asana Math, Cambria Math (not entirely free, but quite cheap), XITS Math, and Latin Modern Math. The exercise is repeated with Linux Biolinum and the same four math alphabets, this time in sans-serif mode.

I'd say that the overall closest, though by no means perfect, fit is between Linux Libertine and Asana Math. Should you, however, wish to give considerable weight to the shape of the letters f, p, and q, XITS Math may be your best choice. Or, should you care much about compatibility of the shapes of the letter w (but not care much about the letters f and g), Cambria Math may be best for you. In any case, Latin Modern is not visually compatible with Linux Libertine.

% !TEX program = xelatex
   \setmainfont{Linux Libertine O}
   \setsansfont{Linux Biolinum O}
   \setmathfont[version=asana]{Asana Math}
   \setmathfont[version=cambria]{Cambria Math}
   \setmathfont[version=xits]{XITS Math}
   \setmathfont[version=lm]{Latin Modern Math}
\newcommand{\qbf}{The\ quick\ brown\ fox\ jumps\ over\ the\ lazy\ dog.}

\emph{\qbf} --- Linux Libertine O, italics\newline
\mathversion{asana} $\qbf$ --- Asana Math\newline
\mathversion{cambria} $\qbf$ --- Cambria Math\newline
\mathversion{xits} $\qbf$ --- XITS Math\newline
\mathversion{lm} $\qbf$ --- Latin Modern Math

\textsf{\qbf} --- \textsf{Linux Biolinum O}\newline
\mathversion{asana} $\mathsf{\qbf}$ --- Asana Math-sf\newline
\mathversion{cambria} $\mathsf{\qbf}$ --- Cambria Math-sf\newline
\mathversion{xits} $\mathsf{\qbf}$ --- XITS Math-sf\newline
\mathversion{lm} $\mathsf{\qbf}$ --- Latin Modern Math-sf

enter image description here

Incidentally, the weird "tz" character in the first line (text italics, Linux Libertine) seems to be a product of an unfortunate interaction between Linux Libertine and XeLaTeX. This problem does not occur if one uses either a font other than Linux Libertine or if the MWE is run under LuaLaTeX.

Addendum To learn more about the various math symbols that the various math fonts provide, please refer to Will Robertson's write-up, Every symbol defined by unicode-math. You'll find out quickly that just about all Unicode math fonts provide all of the "standard" math symbols. However, the math font packages tend to differ importantly in the sets of specialized symbols, e.g., arrows, that they provide. Obviously, the font with the most math symbols (AFAICT, XITS Math at present) need not be the one that's best for you, simply because you may have no need for most of the symbols that the most feature-laden package provides.

Finally, then, suppose that you end up deciding to use the XITS Math font because it comes with all the special symbols you need (and the other math font packages do not). In that case, you should probably be willing to use the XITS text font, rather than Linux Libertine O, because XITS harmonizes very well (by design!) with the XITS Math font.

share|improve this answer
Well, thanks, but this is not exactly what I was asking about: what about all these funny symbols used in maths: relations, operators, quantifiers, ...? –  mbork Mar 7 '12 at 23:14
@mbork: I've add a paragraph with information on what symbols are available in which package. –  Mico Mar 8 '12 at 12:00
add comment

you should wait until the Lucida Math OpenType font will be published by TUG. I suppose it will be at least at the end of this year.

share|improve this answer
Should be much earlier than that :) it is basically done and just awaiting a bit more of testing. –  Khaled Hosny Mar 8 '12 at 13:36
Well, thanks - but bad news is that I need some font for tomorrow...;) OTOH: Khaled: maybe you want one more tester?;) –  mbork Mar 8 '12 at 15:03
And one more question: will it fit (visually) Libertine? –  mbork Mar 8 '12 at 15:05
Yes, it will ... more or less –  Herbert Mar 8 '12 at 16:16
Lucida OpenType fonts have been released today. They are available at very reasonable prices from the TUG store: tug.org/store/lucida –  Ulrik Vieth Mar 16 '12 at 19:47
show 1 more comment

Perhaps consider using the XITS fonts. I also think mathspec is what you're looking for.

share|improve this answer
add comment

Your Answer


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.