# How can I recreate MnSymbol's \udotdot command without using MnSymbol?

MnSymbol has a \udotdot command (search for \udotdot in the comprehensive latex symbol list document), but I don't want to import MnSymbol because of all the side-effects (for instance, it creates \vec definitions that clash with other \vec definitions, and its meant to be used with Adobe Minion Pro in particular).

How can I create my own \udotdot symbol, for use with Computer Modern or Concrete Math?

• You can pull a single symbol from another font. See Importing a single symbol from a different font – Werner Feb 12 '15 at 4:02
• @Werner but it will look weird compared to the the Computer Modern beside it, no? – user89 Feb 12 '15 at 4:17
• i don't believe this symbol is in unicode. what is its meaning, please, and can you provide a reference to its use in a publication from an established publisher, preferably in a context that defines its scope of application? i will be happy to propose it for unicode, but solid documentation is required. – barbara beeton Feb 12 '15 at 15:13

The following example uses the normal dot to generate the symbol:

• \mathpalette adds support for the different math styles.
• It is assumed, that the dot is on the base line with a correct character bounding box including symmetrical side bearings. The dot itself has the same width and height.
• The two dots of \udotdot lie on opposite corners of a square, which is centered around the math axis.
• The centers of the dots lie on the upper and lower borders of the equals sign.

Implementation with example:

\documentclass{article}
%\usepackage{MnSymbol}

\makeatletter
\providecommand*{\udotdot}{%
\mathbin{\mathpalette\@udotdot{}}%
}
\providecommand*{\@udotdot}[2]{%
% #1: math style
% #2: unused
% Box 0: dot
\sbox0{$#1.\m@th$}%
% Remove side bearings
\setbox2=\hbox to \ht0{\hss\copy0\hss}
% Side bearing
\dimen2=.5\dimexpr\wd0-\wd2\relax
% Box 2: equal sign
\sbox4{$#1=\m@th$}%
% Box 4: math axis
\sbox6{$#1\vcenter{}$}%
\dimen@=\dimexpr(\ht4-\ht6)*2 + \ht0\relax
\kern\dimen2 % side bearing
\vcenter to \dimen@{%
\hbox to \dimen@{\hfill\copy2}%
\nointerlineskip
\vfill
\hbox to \dimen@{\copy2\hfill}%
}%
\kern\dimen2 % side bearing
}
\makeatother

\begin{document}
$a \udotdot b$
$={\udotdot}\scriptstyle{\udotdot}\scriptscriptstyle{\udotdot}=$
\end{document}


• Thanks very much for this generous answer. In order to be able to make my own operator symbols in the future (i.e. fully understand what you just did), are there a resources you'd recommend I familiarze myself with? – user89 Feb 12 '15 at 4:39
• @user89 Further readings: The TeXbook by Donald E. Knuth or TeX by Topic by Victor Eijkhout. – Heiko Oberdiek Feb 12 '15 at 4:44

You can either import the single MnSymbol symbol, or create one that roughly matches it:

\documentclass{article}
\usepackage{graphicx,amsmath}
\newcommand{\udotdot}{\mathbin{\text{\rotatebox[origin=c]{45}{${\cdot}{\cdot}$}}}}
\begin{document}

$a \cdots e \cdot a \mathbin{\cdot\cdot} e \mathbin{{\cdot}{\cdot}} a \udotdot e$

$a \udotdot e_{a \udotdot e_{a \udotdot e}}$

\end{document}​

• smart....the rotatebox command comes from graphicx? – user89 Feb 12 '15 at 4:42
• @user89: Yes, and amsmath's \text ensure the appropriate size of the eventual \cdot-pair that is rotated. – Werner Feb 12 '15 at 5:11