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

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.

-
Search for ellipsis and you will find a lot of discussion about this topic. Eg: tex.stackexchange.com/questions/29840/consistent-typography or tex.stackexchange.com/questions/30218/… –  Marco Daniel Sep 21 '12 at 6:09
@Reza: In the addendum you're provided to your original question, you purport to show that ... and \ldots produce rather similar output (but with the dots apparently raised noticeably above the baseline). Which document class and which specialized packages did you load to create this output? Please consider posting a MWE (minimum working example) that generates the output you show. –  Mico Sep 21 '12 at 22:03
@Mico I added a MWE to the question –  PHPst May 1 '13 at 6:20
Please note that (at least in german typography) there is a difference between a…b and a … b. In the first case the ellipsis shows that there is a part of a word missing and the latter case shows that one or more words, i.e. a part of the sentence (is), are missing … –  Tobi May 1 '13 at 7:39
Oh sure :-) But it won’t harm to hav this information as a comment :- –  Tobi May 1 '13 at 20:13

## 3 Answers

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}


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}

-
The correctess of the spacing between the dots depends on the typographic tradition; for instance in France they should be spaced much less than what \ldots provides. –  egreg Sep 21 '12 at 8:03
@egreg I guess the point is that with ... you get 'whatever', whereas with appropriate set up \ldots will give the correct spacing. –  Joseph Wright Sep 21 '12 at 11:44
@Mico could you please also explain the difference to \dots? –  moose Sep 23 '12 at 16:42
@moose: A good question. Please see the new addendum. –  Mico Sep 23 '12 at 17:05
@moose -- if you use the amsmath package, you could indeed always use \dots and let the package decide which ellipsis form is most appropriate in a given situation. Please read the package's user guide to learn more about this. –  Mico Oct 20 '12 at 2:39

I suggest using \ldots in combination with the package ellipsis, because that gives you better control over spacing than .... Using \ldots alone (without ellipsis) is better than ... because it gives you more flexibility. For example, you may redefine the spacing by redefining \ldots. On the other hand, ellipsis makes it easy to fine tune spacing, and takes care of several other spacing issues, for example ellipsis in combination with another full stop.

In case you want to fine tune ellipsis, the distance between the dots is change simply by the command:

\renewcommand{\ellipsisgap}{0.1em} %  or another value


Also, by adding the option [xspace], i.e.

\usepackage[xspace]{ellipsis}


terminating the \ldots command by \ is not necessary (but even xspace makes errors, as documented in the manual). If you use ellipsis, remember to load it after hyperref.

The package csquotes has the commands

\textelp{}
\textelp{<text>}
\textelp*{<text>}


that fill similar functions as ellipsis, and a lot of possibilities to automatically handle exception from the rules. For the same reasons, this is a better solution than ....

I recommend using \ldots with ellipsis (or substitutes), which gives better control over spacing, more flexibility and automatic typographical consistency in more situations.

-
How does this answer the question? –  Marc van Dongen Sep 21 '12 at 13:24
@Sveinnung Your answer doesn't address the advantage issue. –  Marc van Dongen Sep 21 '12 at 17:10
Thanks. You actually explained an advantage, unfortunately I can just accept one answer :( Thanks again –  PHPst Sep 22 '12 at 2:51
@Sveinung Much better. –  Marc van Dongen Sep 22 '12 at 5:20

You can achieve advantages of both (readability and good appearance) using Unicode Character 'HORIZONTAL ELLIPSIS' (U+2026)

If you have installed AutoHotKey use following script to convert ... to … automatically:

::...::…


In Windows, it can be inserted with Alt+0133.

In MacOS, it can be inserted with ⌥ Opt+; (on an English language keyboard).

In Linux, it can be inserted with AltGr+.

-
This is definitely the nicest answer; it feels much saner than using some seemingly random thing, such as the stretchability of inter-word spacing, as the spacing between the dots. –  morbusg May 1 '13 at 6:23
With a german Mac keyboard use opt+. (dot) to get the ellipsis –  Tobi May 1 '13 at 7:37