Knuth incorporated many of the typographical rules for mathematics in the TeX engine. However some rules were left out. One such case is the use of elisions in equations. Sometimes \cdots
are used and in other case \ldots
.
In general, after examining a number of maths papers, I inferred the following "rules":
One could think of an \xdots
type of command (similar to \xspace
that could switch between the right type of ellipsis and allow the right space before and after it. A rough macro to do this is show in the MWE below:
\documentclass{article}
\usepackage{amsmath}
\makeatletter
\def\xdots{%
\newif\if@found
\@foundfalse
\def\ifPlus{\@ifnextchar+{\cdots}{\ifDot}}
\def\ifDot{\@ifnextchar.{\ldots\@foundtrue}{\ifSemicolon}}
\def\ifSemicolon{\@ifnextchar;{\cdots\@foundtrue}{\ifLeftBracket}}
\def\ifLeftBracket{\@ifnextchar){\ldots\,\@foundtrue}{\ifOpenBracket}}
\def\ifOpenBracket{\@ifnextchar({\dots\@foundtrue}{\ifNotFound}}
\def\ifNotFound{\if@found\relax\else\ldots\fi}
\ifPlus
}
\makeatother
\begin{document}
\begin{eqnarray*}
e^{xf(z)}-1
&=(z,z^2\!/2!,z^3\!/3!,\ldots\,)\,F\,(x,x^2,x^3,\xdots)^{\rm T}\\
\noalign{\smallskip}
e^{xg(z)}-1
&=(z,z^2\!/2!,z^3\!/3!,\ldots\,)\,G\,(x,x^2,x^3,\xdots)^{\rm T}
\end{eqnarray*}
\end{document}
amsmath
has what I consider a partial solution with \dots
and offers various commands for different cases.
Unfortunately this is not a trivial problem, as one needs to consider both the symbol before the ellipsis as well as the one that follows it. I am looking for suggestions, solutions and or strategies. I am also looking for "rules" that I might have missed in the above description.
Best Answer
On items 3 and 4 you show, the proper usage would be \cdots since they are implied products (and operations become center) that'w why you have an "exception" on item 4 (since sums aren't implied, but shown explicitly)
Here's the quick ruleset
A) Any comma-delimited listing (be in parentheses or not) becomes \ldot. Examples: Vectors, yor item 2
B) Any operator becomes \cdot. Examples: sums, products (even implied), your item 1
Item 5 as you show is \cdots, but not because it being fractions, but because it being operator (+). If you were listing a vector coordinates where each entry is a fraction, you would use \ldots according to rule A
Item 6 is special: I recommend using \cdots (there's no comman) and it is compatible with matrices where you may use \vdots for vertical elisions or \ddots for diagonal, both of them being centered.
Item 7: Yes, subscripts and superscripts follow the same rules as if they were considered as expression by themselves