答案1
你可以定义自己的版本,使用负数字距调整:
\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}
在 egreg 评论之后:
使用上面的版本,其中\cdotp
(a \mathpunct
),每个点后的空格为\thinmuskip
(默认为3mu
),因此\cdotp\mkern-2mu\cdotp
与相同,{{\cdot}\mkern3mu\mkern-2mu{\cdot}}
与相同{{\cdot}\mkern1mu{\cdot}}
。\cdot
为a \mathbin
,因此{\cdot}
会消除其周围的间距。
它们之间的一个区别是,对于前者,如果你改变\thinmuskip
,间距也会相应改变。对于后者,间距是固定的:
\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}
附言:不要曾经使用\thinmuskip=0mu
。
答案2
对于 cdots 的“压缩”变体,上面有更好的答案,这个答案只是为了说明 latex dots 比显而易见的要多,因此无需任何操作 dotsi(积分的点)即可生成更紧密的整体长度
\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}