3

How do I make an almost normal subgroup symbol? It looks like:

$\underset{\sim}{\triangleleft}$ 

enter image description here

But this has too much of a space between the triangle and the tilda. The result looks skewed in my paper.

  • 3
    The first step is to go through The Comprehensive LATEX Symbol List at tug.ctan.org/info/symbols/comprehensive/symbols-a4.pdf – John Kormylo Aug 11 '16 at 15:03
  • Or, if there's a specific math symbol you want, you can use detexify. I guess, what specifically do you want? – heather Aug 11 '16 at 15:07
  • @heather -- this is a single two-part symbol. no space. it's rather like \lessim, but with a triangle instead of the less than. – barbara beeton Aug 11 '16 at 15:08
  • this symbol doesn't seem to be in unicode. if you can provide a reference to its use in a published source, i'll be happy to submit it for consideration. – barbara beeton Aug 11 '16 at 21:09
4

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}

enter image description here

ORIGINAL SOLUTION

\documentclass{article}
\usepackage{amsmath,stackengine}
\def\newsym{\mathrel{\ensurestackMath{\stackunder[1pt]{\triangleleft}{%
  \scriptscriptstyle\mkern1mu\sim}}}}
\begin{document}
$A \newsym B$
\end{document}

enter image description here

  • that looks much better. do you know if there's a way to bring the whole symbol up slightly? that way I can alight the top corner of the triangle with the height of the A and B. – Lyndsay Aug 11 '16 at 16:06
  • @Lyndsay I'll do better than that. See revision. – Steven B. Segletes Aug 11 '16 at 16:59
  • It should be \mathrel – egreg Aug 11 '16 at 19:42
1

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}

enter image description here

0

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}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.