8

When using the libertine package with newtxmath, the spacing after an italic "f" looks too small if a math character follows. Is there solution for this, apart from fixing all such occurrences manually?

\documentclass{article}

\usepackage{amsthm}

\usepackage{libertine}
\usepackage[libertine]{newtxmath}

\newtheorem{theorem}{Theorem}

\begin{document}

\begin{theorem}
The spacing of $G$ and the preceding of is off.
Similarly for ``of $\mathsf{i}$''.
\end{theorem}

\end{document}
cebewee
  • 357

1 Answers1

4

You can fix it with the mathtools package, but you need to use \(...\) and not $...$ (which is good anyway). The necessity for the italic correction is self-evident when Libertine is used, it's less so with other fonts.

Compare the two versions: the second one looks right.

\documentclass{article}
\usepackage{mathtools}
\usepackage{amsthm}

\usepackage{libertine}
\usepackage[libertine]{newtxmath}

\newtheorem{theorem}{Theorem}
\mathtoolsset{mathic=true}

\begin{document}

\begin{theorem}
The spacing of $G$ and the preceding of is off.
Similarly for ``of $\mathsf{i}$''.
\end{theorem}

\begin{theorem}
The spacing of \(G\) and the preceding of is off.
Similarly for ``of \(\mathsf{i}\)''.
\end{theorem}

\end{document}

Note: never use minimal, which is just for testing packages, not output.

enter image description here

egreg
  • 1,121,712
  • Thanks! I never use minimal in my documents. I just got the impression here on stackexchange that it is the preferred document class for MWEs. – cebewee Oct 06 '15 at 06:32
  • 1
    Where can I find something about $ vs \(? This is notoriously hard to search for, I just found http://texblog.net/latex-archive/maths/inline-math-mode/. – cebewee Oct 06 '15 at 07:06
  • 1
    Ah, this is discussed in http://tex.stackexchange.com/questions/510/are-and-preferable-to-dollar-signs-for-math-mode – cebewee Oct 06 '15 at 07:12