# Font mismatch with Linux Libertine and siunitx package

Following example:

\documentclass{scrbook}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{microtype}
\usepackage{siunitx}

\usepackage{fontspec}
\setmainfont{Linux Libertine O}
\usepackage[libertine]{newtxmath}
\setkomafont{sectioning}{\normalcolor\bfseries}

\begin{document}
\chapter{Test}
Anhand einer Kalibrationsgerade des Photolinkers in DMSO konnte der Extintionskoeffizient des Photolinkers $\epsilon_{PL}$ im
Konzentrationsbereich $c_{PL-02}$: \SI{0.02}{\micro\mole\per\liter} -
\SI{0.1}{\micro\mole\per\liter} bestimmt werden. Mittels des  Extintionskoeffizienten
$\epsilon_{PL}=15766$ des Phototolinker und dem Lambert-Beer Gesetz wurde die
folgende Gleichung zur Bestimmung des DS, hergeleitet.
\end{document}


Now the number in the math environment (which looks really big) does not match the one in the siunitx environment. Why is this and is there a better way to have a font match between this two? I should mention I use lualatex.

-
Yes it does! Thanks! I should mention that I get also a lot of checksum mismatch in font <bla>.vf ignored messages. Is now the package newtxmath in charge for the math mode? –  Reza Feb 8 '13 at 6:48
add comment

## 2 Answers

This has nothing to do with siunitx: it's the font used for numbers in math mode that's wrong.

You can solve the issue with this block of font settings:

\usepackage[libertine]{newtxmath}
\usepackage[no-math]{fontspec}
\setmainfont{Linux Libertine O}

%%% Uncomment the following line, if something is still wrong
% \DeclareSymbolFont{operators}{OT1}{LinuxLibertineO-LF}{m}{n}


The commented line might be needed, depending on the installed version of newtxmath.sty, which has undergone several changes in the last months.

The messages about checksum mismatches with LuaLaTeX are innocuous, albeit annoying.

-
add comment

with current TeXLive there is no problem. However, all font stuff depending to the old LaTeX loading mechanism should be done before you load the OpenType fonts:

[...]
\usepackage[libertine]{newtxmath}
\usepackage[no-math]{fontspec}
\usepackage{libertine}
[...]

-
add comment