[Tex/LaTex] Vertical dots with same height as colon

math-modesymbols

How can I construct three vertical dots similar to \vdots but which span the same height as a colon :? \vdots is usually intended for use in matrices or a set of equations to indicate that there are many elements. I am intending its use within an in-line equation for purposes of operator ordering.

Best Answer

If you want a version of \vdots that is exactly as tall as a colon you could try to overlay a \cdot on top of a :. The code below, which is based on this excellent answer, does exactly this.

I'm actually defining several different versions of \threedots with different spacing properties:

  • \threedotsord has the same spacing as ordinary letters;
  • \threedotsopen and \threedotsclose have the same spacing as opening and closing parentheses respectively;
  • \threedotsbin has the same spacing as a binary operator (like +, -, \times,…);
  • \threedotsrel has the same spacing as a relation symbol (like =, <, \sim, \rightorrow, …).

Which version you need will depend on how you intend to use the symbol. Since you're talking about operator ordering, you will probably want to use \threedotsopen and \threedotsclose. For convenience, I defined a macro \oporder that puts a pair of triple dots with the correct spacing around its argument.

\documentclass{article}

\makeatletter %% <- make @ usable in macro names
\newcommand*\superimpose[2]{%
  \ooalign{$\m@th#1\@firstoftwo#2$\cr
           \hidewidth$\m@th#1\@secondoftwo#2$\hidewidth}%
}
\makeatother %% <- revert @

%% You may want to rename these...
\newcommand*\threedotsord{\mathpalette\superimpose{{\mathop:}{\cdot}}} %% <- normal
\newcommand*\threedotsopen{\mathopen{\threedotsord}}   %% <- spacing like (
\newcommand*\threedotsclose{\mathclose{\threedotsord}} %% <- spacing like )
\newcommand*\threedotsbin{\mathbin{\threedotsord}}     %% <- spacing like +, -, ...
\newcommand*\threedotsrel{\mathrel{\threedotsord}}     %% <- spacing like =, <, ...

\newcommand*\oporder[1]{\threedotsopen#1\threedotsclose} %% <- wraps argument in these

\begin{document}

Using the \verb|\mathopen| and \verb|\mathclose| versions is probably what you want:
\[
    1 + \oporder{ x(t_1) x(t_2) x(t_3) } + \delta
\]

The spacing is nearly always the same as for ordinary atoms though:
\[
    1 + \threedotsord x(t_1) x(t_2) x(t_3) \threedotsord + \delta
\]

Using \verb|\mathbin| or \verb|\mathrel| would be wrong in this context:
\[
    1 + \threedotsbin x(t_1) x(t_2) x(t_3) \threedotsbin + \delta
\]
\[
    1 + \threedotsrel x(t_1) x(t_2) x(t_3) \threedotsrel + \delta
\]

This also works in superscripts and subscripts
\[
    X_{\oporder{xyz}^{\oporder{abc}}}
\]

\end{document}

output

Note that \mathop vertically centres its argument with respect to the math axis whenever it is applied to a single character, as remarked e.g. here. You could also centre the \cdot with respect to the :, but this is more work (if you want to do it automatically, without guessing the amount to lower it by).