I’m trying to use the Unicode ellipsis character (U+2026 ‘…’) in my source files. To this end, I’m looking for an ellipsis macro which I can use with newunicodechar.
The trouble is, I’ve noticed, that the spacefactor is not set correctly around ellipses. This makes solutions like those suggested at Ellipsis with a period/fullstop not work too well.
To illustrate (magnify the results):
\documentclass{article}
\newcommand*{\egap}{\kern\fontdimen3\font} % Taken from the LaTeX definition
\begin{document}
dots: \\
I.\egap.\egap. I \quad(bad) \\
I.\egap.\egap.\@ I \quad(good) \\
I.\egap.\egap.\egap. I \quad(good) \\
I.\egap.\egap.\egap.\@ I \quad(bad)
\end{document}
The ellipsis package fixes some issues with uneven spacing, but does not correctly set the space factor. To illustrate:
\documentclass{article}
\usepackage[xspace]{ellipsis}
\newcommand*{\egap}{\kern\fontdimen3\font} % For comparison
\begin{document}
[ellipsis]: \\
I.\egap.\egap.\@ I \quad(good, for comparison) \\
I\textellipsis I \quad(bad) \\
I\textellipsis\@ I \quad(terrible) \\
I\textellipsis. I \quad(good) \\
I\textellipsis.\@ I \quad(bad)
\end{document}
How can I get the spacing correct?
\@ifnextcharinvocations will also work, but loops are better & more configurable. – J. C. Salomon Jul 04 '12 at 01:50