[Tex/LaTex] best method to insert an ellipsis in a (Xe)TeX document

punctuation

What is best method to insert an ellipsis in a (Xe)TeX document?

\documentclass{article}
\usepackage{fontspec}
\setmainfont{Times New Roman}

\begin{document}
a...b a ... b %or

a\ldots b a \ldots  b %or

a…b a … b  

$a...b  a ... b$ %or

$a\ldots b  a \ldots  b $ %or

$a…b  a … b  $
\end{document} 

Their results seem to be similar.

enter image description here

Best Answer

Remark -- The answer given below addressed the original version of the posting, which asked if there's an advantage to using \ldots over ... (three consecutive dots). At some later stage (May 2013?), the posting was changed to ask a different question, viz., what the best method is for inserting a text ellipsis in a (Xe)TeX document. The OP also provided a new answer at the time.


You asked:

Is there any advantage in using \ldots instead of ...?

Yes! If you type ... you'll get some rather-closely spaced dots. In contrast, with \ldots the dots are correctly spaced for a typographic ellipsis.

The following MWE illustrates some of the visual differences created by ... and \ldots. The differences are readily apparent in both text mode and math mode.

\documentclass{article}
\begin{document}
yes and no ... yes and no \ldots\ yes and no ...

$\{x_1,x_2,...,x_n\}$ vs.\ $\{x_1,x_2,\ldots,x_n\}$
\end{document}

enter image description here

Naturally, if your language is not English -- for which \ldots was designed initially -- you'll want to make sure that the ellipis created by \ldots conforms to your language's typographic conventions. @egreg's comment suggests that this may well be a concern for the French case. For such situations, you may want to use the commands provided by a specialized package such as ellipsis or csquotes rather than the "standard" \ldots command.

Addendum prompted by a follow-up question by @moose: In LaTeX, there's also the command \dots. This raises the natural question, what is the difference between \ldots and \dots? The simple answer is: There's no difference in LaTeX. (I'm not sure if this applies to Plain TeX as well; I don't have the TeXbook at hand today...) The definitions of these two commands (from latex.ltx) are as follows:

 \DeclareRobustCommand{\dots}{%
    \ifmmode\mathellipsis\else\textellipsis\fi}
 \let\ldots\dots

The \textellipsis instruction, in turn, is defined in the LaTeX kernel as follows:

\DeclareTextCommandDefault{\textellipsis}{%
    .\kern\fontdimen3\font
    .\kern\fontdimen3\font
    .\kern\fontdimen3\font}
Related Question