# Is there a difference between \ldots and \textellipsis?

I was just reading about text formatting here, and the following is stated about ellipses:

Therefore, you cannot enter ‘ellipsis’ by just typing three dots, as the spacing would be wrong. Instead, there is a special command for these dots. It is called `\ldots`:

`Not like this ... but like this:\\ New York, Tokyo, Budapest, \ldots`

Alternatively, you can use the `\textellipsis` command which allows the spacing between the dots to vary.

The page provides no further information about how one might actually vary the spacing between dots using `\textellipsis`, and I can't see any difference between the outputs produced by `\ldots` and `\textellipsis`. So, my question is: what is the difference between the two commands?

In particular, I would like to know:

1. Do the two commands ordinarily produce the same output?
2. I've heard of a package called `ellipsis`; is it only by using this package that one might alter the spacing of `\textellipsis`?
• To begin with, `\textellipsis` is specific for text, while `\ldots` can be used also in math mode. Actually, in the default setup, `\ldots` is equal to `\dots`, which in turn is equivalent to `\textellipsis` in text, and to `\mathellipsis` in math. All these are high-level commands intended to be redefined when needed, e.g., when a different font/encoding is used, or by packages like amsmath. – GuM Aug 4 '15 at 10:03

The difference between `\textellipsis` and `\ldots` is, that the latter can also be used in math mode. It is defined as (from `latex.ltx`):

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

Therefore, the commands produce the same output in text mode.

Package `ellipsis` makes the space configurable via the macro `\ellipsisgap`, which can be redefined. An example is given in the documentation. It also provides other features (checking for following punctuation characters, `\midwordellipsis`, ...).

Alternatively, you can redefine `\textellipsis`, which is defined by the LaTeX kernel (`latex.ltx`):

``````\DeclareTextCommandDefault{\textellipsis}{%
.\kern\fontdimen3\font
.\kern\fontdimen3\font
.\kern\fontdimen3\font}
``````

Just replace `\kern\fontdimen3\font` by the space you want or add a scaling factor in front of `\kern`.

There are font encodings as `LY1`, which contain the character as full glyph. for example, `ly1enc.def` defines `\textellipsis` as:

``````\DeclareTextSymbol{\textellipsis}{LY1}      {133}
``````

Then the spacing is part of the glyph and cannot be changed without redefining `\textellipsis` to not using the glyph.

• @justin The plain TeX definition for `\ldots` is the same as LaTeX's `\mathellipsis`. LaTeX's definition is different for the text mode, `\textellipsis` is using the text mode period; plain TeX does not have a text mode version, it uses the math mode glyphs instead. – Heiko Oberdiek Aug 4 '15 at 22:35

`\textellipisis` is defined via

``````\DeclareTextCommandDefault{\textellipsis}{%
.\kern\fontdimen3\font
.\kern\fontdimen3\font
.\kern\fontdimen3\font}
``````

So by default places three `.` from the current font but that is only a default, it is an encoding specific command and if the encoding supplies a character eg U+2026 in unicode encodings, then that may be used insted.

`\ldots` is

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

so it is `\textellipsis` in text mode, but also works in math.

• @GustavoMezzetti sorry didn't see your comment till after:-) – David Carlisle Aug 4 '15 at 10:23