# How do I make \dots more compact? Or are there alternatives?

How would I go about making \dots more compact? I prefer the dots to be closer together to save horizontal space in long equations.

Alternatively, is there another inherently more compact macro than \dots? Would be preferable as regular \dots could still be used in other contexts.

• Have you seen the ellipsis package? Sep 12, 2014 at 12:53
• Do you need this in math-mode, too? \usepackage{ellipsis} \renewcommand{\ellipsisgap}{0.1em} just works in text-mode. And it will redefine your normal \dots-command. Even \let\olddots\dots does not work then. Sep 12, 2014 at 13:18
• This answer does add to the usual options of ellipsis package, two more configurable spaces: \ellipsisbeforegap and \ellipsisaftergap (space before and after the dots, useful in many cases), apart from making it configurable also for math mode. Sep 12, 2014 at 14:17

\documentclass{article}
\newcommand\mydots{\hbox to 1em{.\hss.\hss.}}
\begin{document}

Hello\dots

Hello again\mydots

\end{document}


Or if you prefer to keep it all "clean" LaTeX commands:

\newcommand\mydots{\makebox[1em][c]{.\hfil.\hfil.}}


A further consideration would be whether you care about maths mode or not. The standard \dots command carefully checks whether we are in maths or not and does the right thing. If you want to worry about this, then you would need this:

\newcommand\mydots{\ifmmode\ldots\else\makebox[1em][c]{.\hfil.\hfil.}\fi}


In order to change the spacing of the dots with this solution, you change the overall width of the ellipsis. In the above examples I've made it 1em wide, and the the \hss or the \hfil commands expand as needed to make the dots evenly spaced.

If your ellipsis is ever followed by more text, then there is another consideration: whether you want any built-in space after the ellipsis (as pointed out in the comments). The original \dots command has a small amount of space after it, but my suggested replacement above does not. For example

To fix this you can either add a thin space after it by hand or amend the definition to:

\newcommand\mydots{\ifmmode\ldots\else\makebox[1em][c]{.\hfil.\hfil.}\thinspace\fi}

• you might add some text following the dots. the appearance of the dots in relation to what follows is also important. Sep 12, 2014 at 18:11
• @barbarabeeton thanks, useful consideration. Sep 12, 2014 at 22:09
• This works really well in text mode. As I was specifically looking for a more compact version of \dots in math mode (which I failed to mention in the question) I went with your "clean LaTeX commands"-implementation of \mydots and tweaked it a little. Now, it reads \newcommand\varlist{,\makebox[1em][c]{.\hfil.\hfil.},} . This in the context of say $\Psi_0(\vec{r}_1\varlist\vec{r}_n)$ produces much more desirable output than $\Psi_0(\vec{r}_1,\dots,\vec{r}_n)$. Thanks a lot. Sep 13, 2014 at 10:20

Here it is another option: expanding ellipsis package to work also in math mode, apart from adding two more dimensions (\ellipsisbeforegap and \ellipsisaftergap, if set to zero it has the same behaviour as in ellipsis package).

\documentclass{scrartcl}

\usepackage{mathtools}
\usepackage{ellipsis}

\makeatletter
\renewcommand*{\mathellipsis}{%
\mathinner{%
\kern\ellipsisbeforegap%
{\ldotp}\kern\ellipsisgap%
{\ldotp}\kern\ellipsisgap%
{\ldotp}\kern\ellipsisaftergap%
}%
}
\renewcommand*{\dotsb@}{%
\mathinner{%
\kern\ellipsisbeforegap%
{\cdotp}\kern\ellipsisgap%
{\cdotp}\kern\ellipsisgap%
{\cdotp}\kern\ellipsisaftergap%
}%
}
\renewcommand*{\@cdots}{%
\mathinner{%
\kern\ellipsisbeforegap%
{\cdotp}\kern\ellipsisgap%
{\cdotp}\kern\ellipsisgap%
{\cdotp}\kern\ellipsisaftergap%
}%
}
\renewcommand*{\ellipsis@default}{%
\ellipsis@before
\kern\ellipsisbeforegap
.\kern\ellipsisgap
.\kern\ellipsisgap
.\kern\ellipsisgap
\ellipsis@after\relax}
\renewcommand*{\ellipsis@centered}{%
\ellipsis@before
\kern\ellipsisbeforegap
.\kern\ellipsisgap
.\kern\ellipsisgap
.\kern\ellipsisaftergap
\ellipsis@after\relax}
\AtBeginDocument{%
\DeclareRobustCommand*{\dots}{%
\ifmmode\@xp\mdots@\else\@xp\textellipsis\fi}}
\def\ellipsisgap{.1em}
\def\ellipsisbeforegap{.05em}
\def\ellipsisaftergap{.05em}
\makeatother

\begin{document}

a \dots\ b

a\dots b

$a + \dots + b$

\end{document}


Also, this question of mine might be interesting in case you want to configure the spacing after the dots for diferent glyphs (e.g., !, ?, ,, ;, etc.).

Or with kerning:

% arara: pdflatex

\documentclass{article}
\newcommand*{\myDots}{\ifmmode\mathellipsis\else.\kern-0.13em.\kern-0.13em.\fi} % touching at \kern-0.1725em

\begin{document}
\myDots

\dots

$\myDots$

$\dots$
\end{document}


If you want to have different kerning for the math-version, you can just replace \mathellipsis by something else.

Update: for full control over math- and text-mode, you can use the following command: \newcommand{\myDots}{\ifmmode\mathinner{\ldotp\kern-0.2em\ldotp\kern-0.2em\ldotp}\else.\kern-0.13em.\kern-0.13em.\fi}

A second possibility (just for text-mode) would be the package ellipsis:

% arara: pdflatex

\documentclass{article}
\usepackage{ellipsis}
\renewcommand{\ellipsisgap}{0.01em}

\begin{document}
\dots $\dots$
\end{document}