5

I'm looking for a variation on the \subseteq relation, but with an underlying squiggle instead of a line. In other words, I'm looking for the symbol to substitute for the square in the last printed line of following example.

\documentclass{amsart}
\usepackage{amssymb}
\begin{document}
\begin{align*}
\prec + \sim &= \precsim\\
< + \sim &= \lesssim\\
\subset + \sim &= \square
\end{align*}
\end{document}

A variation on the subset symbol with an underlying squiggle

I couldn't find any matching symbol using detexify.

Evan Aad
  • 11,066
  • 1
    stix has \subsetapprox but with 2 squiggles. – CarLaTeX Oct 26 '18 at 10:15
  • @CarLaTeX: This would work, except I get a LaTeX Error: Too many symbol fonts declared. when I try to use the package stix in my actual document (not the sample one listed in my post above). – Evan Aad Oct 26 '18 at 10:26
  • @CarLaTeX: Upon further inspection, it appears there are three packages in my preamble that clash with stix, namely mathrsfs, stmaryrd, and unicode-math (I should note that I use the lualatex format with the scrbook document class). The first two packages produce the error message listed in my previous comment, whereas the third package produces the error message Command '\mathbfit' already defined. Is there a way to resolve these errors, so I can use stix's \subsetapprox command? – Evan Aad Oct 26 '18 at 10:40

3 Answers3

6

If stix package gives you some incompatibilities, you can define your own symbol, without any additional package:

\documentclass{amsart}
\usepackage{amssymb}

\newcommand{\subsetsim}{\mathrel{\ooalign{\raise.4ex\hbox{$\subset$}\cr$\raise-.9ex\hbox{$\sim$}$}}}

\begin{document}
\begin{align*}
\prec + \sim &= \precsim\\
< + \sim &= \lesssim\\
\subset + \sim &= \subsetsim
\end{align*}
\[ \precsim \lesssim \subsetsim \]
\end{document}

enter image description here

CarLaTeX
  • 62,716
4

You can do that with the accents package:

\documentclass[border=2pt]{standalone}

\usepackage{amssymb, accents} %
\newcommand{\subsetsim}{\mathrel{\underaccent{\mkern6mu\sim}{{\subset}}}}
\newcommand{\supsetsim}{\mathrel{\underaccent{\backsim\mkern2mu}{{\supset}}}}%{\stackMath\mathrel{\stackinset{c}{0ex}{c}{-1ex}{\sim}{\subset}}}

\begin{document}

 $ E \subsetsim F \iff F \supsetsim E$

\end{document} 

enter image description here

Bernard
  • 271,350
3

The places the “subset” part at the same height as in \subseteq. Other choices are possible.

\documentclass{article}
\usepackage{amsmath,amssymb}

\makeatletter
\DeclareRobustCommand{\subsetsim}{\supsub@setsim\subset}
\DeclareRobustCommand{\supsetsim}{\supsub@setsim\supset}

\newcommand{\supsub@setsim}[1]{%
  \mathrel{\mathpalette\supsub@setsim@{#1}}%
}

\newcommand{\supsub@setsim@}[2]{%
  \begingroup
  \sbox\z@{$\m@th#1\subseteq$}%
  \raisebox{\dimexpr\ht\z@-\height}{%
    \vbox{\offinterlineskip
      \ialign{%
        ##\cr
        $\m@th#1#2$\cr
        \noalign{\vskip0.6pt}
        \hidewidth$\m@th#1\sim$\hidewidth\cr
      }%
    }%
  }%
  \endgroup
}
\makeatother

\begin{document}

$A\subseteq B \subseteq C$

$A\subseteq B \subsetsim C \precsim D$

$\scriptstyle A\subseteq B \subsetsim C$

\end{document}

enter image description here

egreg
  • 1,121,712