Consider this MWE
\documentclass[french]{article}
\usepackage{babel}
\usepackage{hyphenat}
\begin{document}
\section{without relax}
Cambridge : University (A)
\nohyphens{Cambridge} : University (B)
\texttt{Cambridge} : University (C)
\verb|Cambridge| : University (D)
\section{with relax}
Cambridge\relax : University (E)
\nohyphens{Cambridge}\relax : University (F)
\texttt{Cambridge}\relax : University (G)
\verb|Cambridge|\relax : University (H)
\end{document}
If we run it with pdfLaTeX or LuaLaTeX, all the colon are well aligned.
But if we run it with XeLaTeX, it seems that there some spurious spaces (section 1), which can be cancelled with relax
. Why did we get this behavior? If we don't load babel or polyglossia, the output is also ok.
Any idea?
Cambridge:
.french
uses XeTeX interchars to remove it. I've traced the code and I don't understand why\ifdim\lastskip >1sp
returns false when executed at the colon in those 2 cases.{\language\l@french Cambridge} : University
works, but{\language\l@english Cambridge} : University
doesn't. A bug in XeTeX?