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.

My problem when using math in a beamer presentation: The space between a $f$ and the following questionmark is way too small (the glyphs intersect). When switching the code (MWE) to an article, the problem is gone, yet now the spacing between a math "f" and the following letters is too big. The problem is absent with LuaTeX (using libertineotf) but occurs with XeTeX (same).

MWE:

\documentclass{beamer} % try article in comparison and note the gap between "ef..." and "...gh"

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

\begin{document}

$f$? $efgh$

\end{document}
share|improve this question

1 Answer 1

up vote 6 down vote accepted

Use the professionalfont option if you want to load other math fonts to prevent beamer from changing the math setup. The gap after the f is normal for math fonts. If you want to write words switch to text mode:

\documentclass[professionalfont]{beamer} 

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

\begin{document}

$f$? $efgh  \text{\itshape efgh}$

\end{document}
share|improve this answer
    
Thanks. What exactly is the reason for the special spacing of "f"? It's common to use it for "function" but I don't see how that requires the gap. –  NauC Jul 23 '12 at 13:29

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.