# Beamer with xltxtra: colliding characters in equation

I'm typesetting beamer with XeLaTeX. In equations, variable characters collide with their superscripts. Also, the parenthesised variable looks somewhat off-set – too far to the right. It looks good when compiled with pdflatex (or just without xltxtra, but that's not an option for other reasons).

Here's an MWE:

\documentclass{beamer}

\usepackage{xltxtra}

\begin{document}

\begin{frame}{Example}
\begin{block}{Equation~1}
$f^\text{cap}(x) = \max(n, f(x))$
\end{block}
\end{frame}

\end{document}


I assume it's font-related, but since I don't set any fonts manually, it's not something you'd expect to happen.

• If you load the arev package to use the Arev font for sans math, the kerning is correct. – Alan Munn Mar 12 '15 at 19:07
• @AlanMunn are you sure arev works with XeLaTeX? I installed it, but I get a lot of Command \nobreakspace unavailable in encoding T1 errors when I put \usepackage{arev} in the preamble. – lenz Mar 13 '15 at 0:57
• No errors for me. TeXLive 2014. I loaded it after loading xltxtra. – Alan Munn Mar 13 '15 at 4:01
• @AlanMunn sure, you're right, the MWE works – I tested arev with my actual document. The error can be reproduced, however, by inserting a nobreakspace somewhere (see the minimally updated MWE). – lenz Mar 13 '15 at 12:13
• Okay, I solved it, using this answer: tex.stackexchange.com/questions/66949/… – lenz Mar 13 '15 at 12:46