Is there something like cdots that uses less space?
You can define your own version, with negative kerning:
\documentclass{article}
\DeclareRobustCommand
\Compactcdots{\mathinner{\cdotp\mkern-2mu\cdotp\mkern-2mu\cdotp}}
\begin{document}
\pagenumbering{gobble}
\(s_1s_2 \cdots s_L\)
\(s_1s_2 \Compactcdots s_L\)
\end{document}
After egreg's comment:
Using the version above, with \cdotp
(a \mathpunct
), the space after each dot is \thinmuskip
(which defaults to 3mu
), so \cdotp\mkern-2mu\cdotp
is the same as {{\cdot}\mkern3mu\mkern-2mu{\cdot}}
which is the same as {{\cdot}\mkern1mu{\cdot}}
. \cdot
is a \mathbin
, so {\cdot}
kills the spacing around it.
One difference between these is that with the former, if you change \thinmuskip
, the spacing changes accordingly. With the second, the spacing is fixed:
\documentclass{article}
\DeclareRobustCommand
\Compactcdots{\mathinner{\cdotp\mkern-2mu\cdotp\mkern-2mu\cdotp}}
\DeclareRobustCommand
\Fixedcdots{\mathinner{{\cdot}\mkern1mu{\cdot}\mkern1mu{\cdot}}}
\begin{document}
\begin{tabular}{*3{p{1.5cm}}}
\(s_1s_2 \cdots s_L\) & \(s_1s_2 \Compactcdots s_L\) & \(s_1s_2 \Fixedcdots s_L\) \\
\end{tabular}
\thinmuskip=0mu
\begin{tabular}{*3{p{1.5cm}}}
\(s_1s_2 \cdots s_L\) & \(s_1s_2 \Compactcdots s_L\) & \(s_1s_2 \Fixedcdots s_L\) \\
\end{tabular}
\end{document}
P.S. Don't ever use \thinmuskip=0mu
.
There are better answers above for "compacting" variations on cdots, This answer is just to illustrate there is more to latex dots than may be obvious so without any manipulation dotsi (dots for integrals) generates a tighter overall length
\documentclass{article}
\usepackage{amsmath,amssymb}
\DeclareRobustCommand % Copied for comparison with answer by Phelype Oleinik
\Compactcdots{\mathinner{\cdotp\mkern-2mu\cdotp\mkern-2mu\cdotp}}
\begin{document}
To indicate the omission of values in a repeated operation, a centred ellipsis is
used between two operation symbols (Midline horizontal ellipsis, or in LaTeX terms
three dots, centered). Due to it's ambiguity some authors [1] have recommended avoiding
its use in mathematics altogether.\\
\\
$s_1s_2\cdots s_L$ cdots\\
$s_1s_2\Compactcdots s_L$ Compactcdots\\
$s_1s_2\dotsb s_L$ dotsb\\
$s_1s_2\dotsi s_L$ dotsi\\
$s_1s_2\dotsm s_L$ dotsm\\
[1] https://en.wikipedia.org/wiki/Ellipsis (cite ref-26) Roland Backhouse,\\
Program Construction: Calculating Implementations from Specifications.\\ Wiley (2003), page 138
\end{document}