# How to get a “approximately follows distribution” symbol?

I want to create an "approximately follows distribution" symbol. It should be a \sim with one dot above and one below.

I have tried using \underset and \overset, but I cannot get the dots to be the same distance above and below \sim.

Thanks,

Jack

• Could you overlay a colon on \sim with some manual adjustment to get it at the right height? – dbmag9 Mar 23 '18 at 10:09
• Ah maybe. How do you do that? – Jack Mar 23 '18 at 10:09
• – dbmag9 Mar 23 '18 at 10:11
• there's also ⩫ (U+2A6B), but that might not be what you need – remco Mar 23 '18 at 10:19

\documentclass{article}

\makeatletter
\newcommand\approxsim{\mathpalette\@approxsim\relax}
\newcommand\@approxsim[2]{%
\mathrel{%
\ooalign{%
$\m@th#1\sim$\cr
\hidewidth$\m@th#1:$\hidewidth\cr
}%
}%
}
\makeatother

\begin{document}

$a \approxsim b_{a \approxsim b_{a \approxsim b}}$

\end{document}


This is maybe a bit nicer.

\documentclass{article}

\makeatletter
\newcommand\approxsim{\mathchoice
{\@approxsim {\displaystyle}      {1ex} }
{\@approxsim {\textstyle}         {1ex} }
{\@approxsim {\scriptstyle}       {.7ex}}
{\@approxsim {\scriptscriptstyle} {.5ex}}}
\newcommand\@approxsim[2]{%
\mathrel{%
\ooalign{%
$\m@th#1\sim$\cr
\hidewidth$\m@th#1.$\hidewidth\cr
\hidewidth\raise #2 \hbox{$\m@th#1.$}\hidewidth\cr
}%
}%
}
\makeatother

\begin{document}

$a \approxsim b_{a \approxsim b_{a \approxsim b}}$

\end{document}


• Thank you very much for this, although is there any way to get the top dot a little higher? – Jack Mar 23 '18 at 10:17
• In the first version you could raise the colon a bit by using \mathop:. – campa Mar 23 '18 at 10:24

# Symbol

The Unicode code point is probably U+2A6B (tilde operator with rising dots).

# LuaTeX/XeTeX

If LuaTeX or XeTeX is used, the symbol is available in Asana Math and XITS math. Package unicode-math used the command sequence \rsimdots. Also, the character can be used directly or as ^-escape: ^^^^2a6b.

\documentclass{article}
\usepackage{fontspec}
\begin{document}
\def\test#1{\fontspec{#1}^^^^2a6b&#1\\}
\begin{tabular}{ll}
\test{Asana Math}
\test{XITS Math}
\end{tabular}
\end{document}


# pdfTeX

A "poor man's" symbol constructed from \sim and two \cdots. The colon is not vertically centered, thus the position of the dots are not well defined.

See the code comments for the fine tuning:

• The distance from the dots can be configured in the setting of \dimen@.
• The rotation angle is given to \rotatebox. If rotation is not wanted, this line can be removed.

Full example:

\documentclass{article}
\usepackage{graphicx}

\makeatletter
\newcommand*{\rsimdots}{%
\mathrel{%
\mathpalette\@rsimdots{}% Adopt to math style size via \mathpalette
}%
}
\newcommand*{\@rsimdots}[2]{%
% #1: math style
% #2: unused
\sbox0{$#1\sim\m@th$}%
\sbox2{$#1\vcenter{}$}% \ht2 is height of the math axis
\dimen@=.75\ht2\relax % distance dot to math axis
\sbox2{$#1\cdot\m@th$}% single vertically centered dot
\sbox2{% two dots above and below the math axis
\rlap{\raisebox{\dimen@}{\copy2}}%
\raisebox{-\dimen@}{\copy2}%
}%
% Rotate the two dots.
\sbox2{$#1\rotatebox[origin=c]{-45}{\copy2}$}%
% Combine symbol
\rlap{\hbox to \wd0{\hss\copy2\hss}}%
\copy0 %
}
\makeatother

\begin{document}
$A\rsimdots B, \scriptstyle A\rsimdots B, \scriptscriptstyle A\rsimdots B$
\end{document}