2021-09-27 Ellipses in math - ldots versus cdots

It’s been a while since a TeX-related post here, but I still use TeX and friends once in a while, and this time I’d like to share something apparently not everyone knows about.

LaTeX has a \dots macro, setting the ellipsis (three consecutive dots) which is just an alias for \ldots. It also has \cdots, which is similar, but the dots are centered vertically (at the level of things like a plus sign). And you should generally use \cdots between operators like + or \times (so that the dots are vertically aligned with them) and \ldots between punctuation like commas (so that the dots are vertically aligned with them).

Also, when you use the amsmath package, you can just use \dots all (or most) of the time. It uses a clever trick of looking (more or less) at the next character after the ellipsis to determine if they should be \ldots or \cdots. One exception is when you have stuff like $1+2+\cdots$, where the “next character” is not a math operator, so LaTeX needs a small hint that centered dots are needed here.

And that’s it. There is more to know, as usual, but the advice above should cover at least 95% cases.

CategoryEnglish, CategoryBlog, CategoryTeX, CategoryLaTeX