How do I make an almost normal subgroup symbol? It looks like:
$\underset{\sim}{\triangleleft}$
But this has too much of a space between the triangle and the tilda. The result looks skewed in my paper.
How do I make an almost normal subgroup symbol? It looks like:
$\underset{\sim}{\triangleleft}$
But this has too much of a space between the triangle and the tilda. The result looks skewed in my paper.
The optional argument to \stackunder allows the gap to be specified.
EDITED to accomplish 2 goals, with the added use of the scalerel package: 1) realign the symbol to take up the same vertical footprint as the letter "A" (per OP's request); and 2) make it work across math styles.
\documentclass{article}
\usepackage{amsmath,stackengine,scalerel}
\def\newsym{\mathrel{\scalerel*{\ensurestackMath{\stackunder[1pt]{\triangleleft}{%
\scriptscriptstyle\mkern1mu\sim}}}{A}}}
\begin{document}
$A \newsym B \quad\scriptstyle
A \newsym B \quad\scriptscriptstyle
A \newsym B$
\end{document}
ORIGINAL SOLUTION
\documentclass{article}
\usepackage{amsmath,stackengine}
\def\newsym{\mathrel{\ensurestackMath{\stackunder[1pt]{\triangleleft}{%
\scriptscriptstyle\mkern1mu\sim}}}}
\begin{document}
$A \newsym B$
\end{document}
You may want to use a smaller \sim symbol:
\documentclass{article}
\usepackage{amsmath,amssymb}
\DeclareFontFamily{OMS}{smallcmsy}{\skewchar\font48 }
\DeclareFontShape{OMS}{smallcmsy}{m}{n}{%
<-5.5> s*[.65] cmsy5
<5.5-6.5> s*[.65] cmsy6
<6.5-7.5> s*[.65] cmsy7
<7.5-8.5> s*[.65] cmsy8
<8.5-9.5> s*[.65] cmsy9
<9.5-> s*[.65] cmsy10
}{}
\DeclareFontShape{OMS}{smallcmsy}{b}{n}{%
<-5.5> s*[.65] cmbsy5
<5.5-6.5> s*[.65] cmbsy6
<6.5-7.5> s*[.65] cmbsy7
<7.5-8.5> s*[.65] cmbsy8
<8.5-9.5> s*[.65] cmbsy9
<9.5-> s*[.65] cmbsy10
}{}
\DeclareSymbolFont{smallsymbols}{OMS}{smallcmsy}{m}{n}
\SetSymbolFont{smallsymbols}{bold}{OMS}{smallcmsy}{b}{n}
\DeclareMathSymbol{\smallsim}{\mathrel}{smallsymbols}{"18}
\makeatletter
\newcommand{\ansg}{\mathrel{\lyndsay@ansg}}
\newcommand{\lyndsay@ansg}{\mathpalette\lyndsay@@ansg\relax}
\newcommand{\lyndsay@@ansg}[2]{%
\vbox{
\m@th\offinterlineskip
\halign{\hfil##\hfil\cr
$#1\triangleleft$\cr
\noalign{\kern.5pt}
$#1\smallsim$\cr
\noalign{\kern-.5pt}
}
}%
}
\makeatother
\begin{document}
$A\ansg B_{C\ansg D}$
\end{document}
Adding \raisebox, as suggested here: Shifting a symbol vertically in Math mode, to Steven's original solution:
\documentclass{article}
\usepackage{amsmath,stackengine}
\def\newsym{\mathbin{\ensurestackMath{\stackunder[1pt]{\triangleleft}{%
\scriptscriptstyle\mkern1mu\sim}}}}
\def\newsymraised{\mathrel{\raisebox{2pt}{$\mathbin{\ensurestackMath{\stackunder[1pt]{\triangleleft}{%
\scriptscriptstyle\mkern1mu\sim}}}$}}}
\begin{document}
Steven's original solution:
$A \newsym B$ \\
With raisebox:
$A \mathrel{\raisebox{2pt}{$\newsym$}} B$ \\
Creating a newcommand with raisebox:
$A \newsymraised B$%
\end{document}
\lessim, but with a triangle instead of the less than. – barbara beeton Aug 11 '16 at 15:08