Control the dots separation in math and text
In math mode three different varieties of dots are used:
\dotsb@
, defined as\mathinner{\cdotp\cdotp\cdotp}
for centered dots;
\@cdots
, defined in the same way, but it's a different macro, for dots between integral signs;\@ldots
, that expands to the kernel's\mathellipsis
, that is\mathinner{\ldotp\ldotp\ldotp}
If you want to change the spacing, you have to redefine all three macros.
For instance, you might want to add some negative kerning:
\renewcommand{\dotsb@}{%
\mathinner{\cdotp\mkern-1mu\cdotp\mkern-1mu\cdotp}%
}
Why is there a kern also after the final period in \textellipsis
? It's the American usage.
Related videos on Youtube
Manuel
Updated on August 01, 2022Comments
-
Manuel over 1 year
I know how to control the spacing of the
\textellipsis
command. But I can't figure it out how to do so globally in all the versions ofmathtools
'\*dots
.My idea is to use a global symbol
…
to use\dots
(in math mode) or\textellipsis
(in text mode).How can I change the default spacing in ALL dots commands?
I want smaller separation between them (but the same in all of them). Here's a minimal working example.
\documentclass{scrartcl} \usepackage[utf8]{inputenc} \usepackage{mathtools} \usepackage{newunicodechar} \newunicodechar{…}{\dots} \DeclareTextCommandDefault{\textellipsis}{% .\kern.35\fontdimen3\font .\kern.35\fontdimen3\font .\kern.35\fontdimen3\font} \begin{document} …a...a{\textellipsis}a…a$…=…=a\times…\times a$ \end{document}
By the way, shouldn't the definition of
\textellipsis
look more like this?\DeclareTextCommandDefault{\textellipsis}{% .\kern.35\fontdimen3\font .\kern.35\fontdimen3\font .}%\kern.35\fontdimen3\font}
Update
After posting here I started to see
ellipsis
package everywhere (until now I “never hear of it” but now it's everywhere :P). Which redefines the\textellipsis
in a more convenient way (and takes in account something similar to my last definition of\textellipsis
). But, still, doesn't solve the problem with math\dots
. -
Manuel over 9 yearsGreat. By the way, instead of
\cdotp\mkern-1mu
I think{\cdotp}\kern.35\fontdimen3\font
would be better to be “coherent”. American usage, well if I don't want that, then there is no problem with redefining all those commands\dotsb@
,\@cdots
,\@ldots
, and\textellipsis
without the last kern? Or is there something I should be aware of? -
egreg over 9 years@Manuel You're right, the last kern is not needed. However,
\mathinner
adds a thin space on both sides in display and text style.