# How to create subset with sim symbol

I've been trying to typeset as an operator the symbol ⫇ (\subset on top a \sim), but the following solutions have not been helpful

• ⫇ does not seem to be listed in symbols-a4.pdf, so detexify does not find it.
• \limits and \underset puts the tilde (or \sim) too separated from \subset.
• Using \undertilde looks ugly.

Is any other option to obtain this symbol?

\documentclass{article}
\usepackage{graphicx}

\newcommand\subsetsim{\mathrel{%
\ooalign{\raise0.2ex\hbox{$\subset$}\cr\hidewidth\raise-0.8ex\hbox{\scalebox{0.9}{$\sim$}}\hidewidth\cr}}}
\begin{document}
$A \subsetsim B$
\end{document}

A you have noticed the symbol is in Unicode as ⫇ (U+2AC7) so if you are using xetex or luatex and unicode-math it would just work. It's also in the STIX fonts of which there is a beta release now with support for classic TeX: http://www.stixfonts.org/

• But what about other symbols which are not in unicode like \sqsubset over \sim? – Felipe Bañados S Apr 12 '13 at 19:45
• @fbanados you didn't ask about those:-) You always have the option of constructing a symbol as the other answers show, but If a symbol is shown to be used in published documents it could also be put forward for inclusion in Unicode. Having a real symbol has benefits in terms of speed rendering and cutting/pasting to other systems, not least the web. – David Carlisle Apr 12 '13 at 20:08

Here's a straight-forward way using \substack from amsmath:

\documentclass{article}
\usepackage{amsmath}% http://ctan.org/pkg/amsmath
\newcommand\subsetsim{\mathrel{\substack{
\textstyle\subset\$-0.2ex]\textstyle\sim}}} \begin{document} \[ f(x) \subset g(x) \subseteq h(x) \subsetsim i(x) \sim j(x)$
\end{document}

The definition could be updated to accommodate usage in sub-/superscripts as well.

• I think this one looks better than the solution suggested from @mafp, because the tilde does not go so far under the baseline. – Wauzl Mar 24 '14 at 9:09

## Poor man's solution

The following example constructs the symbol ⫇ by putting \sim below \subset. The \sim is set in a smaller font, if the current math style is \displaystyle or \textstyle, then \scriptstyle is used for \sim, if the current math style is \scriptstyle or \scriptscriptstyle then \scriptscriptstyle is used for \sim. Since in the latter case the font is not smaller, this solution works for \displaystyle, \textstyle, and \scriptstyle.

\documentclass{article}

\makeatletter
\newcommand*{\subsetsim}{%
\mathrel{%
\mathchoice
{\@subsetsim\displaystyle\scriptstyle}%
{\@subsetsim\textstyle\scriptstyle}%
{\@subsetsim\scriptstyle\scriptscriptstyle}%
{\@subsetsim\scriptscriptstyle\scriptscriptstyle}%
}%
}
\newcommand*{\@subsetsim}[2]{%
\sbox0{$\m@th#1\subset$}%
\sbox2{$\m@th#2\sim$}%
\sbox4{$\m@th#2$}%
\raisebox{.5\dimexpr\ht2-\ht4\relax}{%
\oalign{\copy0 \cr\hidewidth\copy2\hidewidth}%
}%
}

\begin{document}

$a \subset a \sim a \subsetsim a - a_{b \subsetsim b_{c \subsetsim c}}$

\end{document}

Remarks:

• The minus shows the math axis.
• In the latest case (c ⫇ c) the \sim is a little too large because the expression is set in \scriptscriptstyle, see above.