7

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.

4 Answers 4

9

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).

3
  • You can see that the central dot is misaligned in subscripts
    – egreg
    Oct 14, 2018 at 19:55
  • @egreg Oh, I hadn't noticed that. It is aligned correctly when I zoom in on the pdf file. Do you have any idea why it might be off in the screenshot? Oct 14, 2018 at 20:04
  • Adjusting to the raster. I had a similar idea, but didn't think to zoom, so when I saw the misalignment I went for a different strategy.
    – egreg
    Oct 14, 2018 at 20:15
8

This typesets three dots filling the same height as the colon:

\documentclass{article}

\makeatletter
\newcommand{\fcolon}{%
  \mathrel{\mathpalette\fcolon@\relax}%
}
\newcommand{\fcolon@}[2]{%
  \sbox\z@{$\m@th#1:$}%
  \vbox to\ht\z@{%
    \hbox{$\m@th#1.$}%
    \vss
    \hbox{$\m@th#1.$}%
    \vss
    \hbox{$\m@th#1.$}%
  }%
}
\makeatother

\begin{document}

$A:B\fcolon C_{:\fcolon_{:\fcolon}}$

\end{document}

enter image description here

7

enter image description here

If you need subscripts and superscripts to work, needs to be a bit more complicated but...

\documentclass{article}

\begin{document}


 $ x : x \mathrel{:} x $

 $ x : x \mathrel{\lower.04em\hbox{\rlap{$\cdot$}}{:}} x $

\end{document}
3

You could use the tri-colon or vertical ellipsis ⋮ at a font height weight and position to match the colon : something like the a+⋮xyz⋮+b example (I know its not perfect but given time...)

enter image description here

but wrapped per another Unicode answer

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath,amssymb}
\makeatletter
\newcommand\UnicodeMathSymbol[4]{%
  \ifnum#1>"FF
    \expandafter\DeclareUnicodeCharacter\expandafter{\@gobble#1}{#2}%
  \fi
}
\makeatother
\input{unicode-math-table}
\begin{document}
$a+{\lower.2em\hbox{$⋮$}} xyz{\lower.2em\hbox{$⋮$}}+b$
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .