# Bad spacing around $\in$ symbol before math calligraphhic letter

I'm using a math calligraphic font for some set U, and when I tried to state that X is an element of U $X\in\mathcal{U}$, I obtained a horrible result. Below is the code, with some other examples for comparison.

\documentclass[12pt]{article}
\begin{document}
\thispagestyle{empty}
Let $\mathcal{U}$ be an nonprincipal ultrafilter. If
$X\in\mathcal{U}$, then $X$ is infinite.

\Huge

\begin{tabular}{|l|l|}
$X\in\mathcal{U}$ &    \verb#$X\in\mathcal{U}$#  \\
$X\in U$ &    \verb#$X\in U$#  \\
$X + \mathcal{U}$ &   \verb#$X + \mathcal{U}$# \\
$X + U$ &   \verb#$X + U$#
\end{tabular}
\end{document}


So, there is too much space between X and \in and/or too little before \mathcal{U}. If you compare with the example of math italic U, there is a bit more of space after \in (and looks better).

Putting X or \mathcal{U}$ between braces doesn't seem to help. • The math italic U has sidebearings, whereas the calligraphic U hasn't them. If you deem the result is bad, type $X\in\,\mathcal{U}$ – egreg Jan 26 '16 at 23:15 • @egreg I didn't want to do it “by hand”, but if there is no other solution I'll do. – Pedro Sánchez Terraf Jan 26 '16 at 23:17 • Sorry, but that's a font design decision; unless you choose another calligraphic font or prepare yourself a virtual font that adds sidebearings to the letters you need, there's not much to do. You may want to try eucal or calrsfs – egreg Jan 26 '16 at 23:22 • Experiments have shown that \mathcal characters have sidebearrings, but they differ from regular italics and from each other. – John Kormylo Jan 27 '16 at 16:47 • @egreg eucal has the same “problem” and calrsfs is way too slanted. I found that rsfso works fine for me. Thanks for the suggestion. – Pedro Sánchez Terraf Jan 29 '16 at 3:33 ## 1 Answer Not an answer, but a demonstration of italic and mathcal fonts. \documentclass{standalone} \usepackage{xcolor} \newcounter{mycount} \begin{document} \fboxsep=0pt \parbox{25pt}{\baselineskip=0pt \lineskip=0pt \loop\stepcounter{mycount} \fbox{$\color{red}\Alph{mycount}$}% \fbox{$\color{red}\mathcal{\Alph{mycount}}\$}
\ifnum\value{mycount}<26\relax\repeat}
\end{document}

• I'd use also \setlength{\fboxrule}{.1pt} – Sigur Jan 27 '16 at 17:11
• Useful, I was wondering how to do that. – Pedro Sánchez Terraf Jan 27 '16 at 17:43