My problem appears to be related to this earlier post:
Parentheses differ (XeLaTeX, fontspec, newtxmath, libertine)
but mine seems even simpler. My problem is that when I compile a simple beamer presentation and use the fontspec or mathspec packages, the parentheses are spaced poorly. As an MWE, when I compile the following with XeLaTeX:
\documentclass{beamer}
%\usepackage{fontspec}
\begin{document}
\frame{
Hello! $f(x)=x^2$
}
\end{document}
I get just what I would want:

However, when I uncomment the fontspec bit,
\documentclass{beamer}
\usepackage{fontspec}
\begin{document}
\frame{
Hello! $f(x)=x^2$
}
\end{document}
I see the following:

Does anyone know what can be causing this? I don't see mention of parentheses in the documentation.

beamer+fontspec, not withfontspec. In factbeamersets all the text (including math) in sans serif and this causes the problem. I guess I've seen similar threads in this site, but at the moment I can't find one... – karlkoeller Sep 11 '13 at 19:50fontencwhen compiling with xetex, but adding the line\usepackage[T1]{fontenc}seems to solve the problem, until you get a better answer... – karlkoeller Sep 11 '13 at 20:01