3

General input normal group use $\unlhd$ or $\trianglelefteq$,

enter image description here

I want to get the two symbols in LaTeX:

enter image description here

(I see it at P.Grillet. "Abstract Algebra". 2nd ed, GTM242)

It's like another symbol $\leqq$ and $\lneqq$, and I hope know that how to get I hope them seem like adding a vertical line to $\leqq$ or $\lneqq$, so that the size is relatively close to $\leqq$ or $\lneqq$.

I want to know how to get these two symbols in a simple way.

poorich
  • 613

1 Answers1

5

Like this ( if you want to modify vertical position of symbols just change parameter for \lower inside \triaeq and \triaNeq commands ).

\documentclass{article}
\usepackage{amssymb}


\setbox0=\hbox{\vbox{\offinterlineskip\hbox{$\vartriangleleft$}\vskip0.2ex\hbox{$=$}}}

\setbox1=\hbox{\vbox {\offinterlineskip\hbox{$\vartriangleleft$}\vskip0.2ex\hbox{$\neq$}}}

\def\triaeq{\lower 0.3\ht0\copy0}
\def\triaNeq{\lower 0.3\ht1\copy1}

\begin{document}

text text text \\
text $\triaeq$ text $\triaNeq$ text

\end{document}

Update

\documentclass[margin=5mm]{standalone}
\usepackage{amssymb}
\usepackage{MnSymbol}

\newbox{\boxA}
\newbox{\boxB}


\setbox\boxA\hbox{\vbox{\offinterlineskip\hbox{$\vartriangleleft$}\vskip0.15ex\hbox{$=$}}}

\setbox\boxB\hbox{\vbox {\offinterlineskip\hbox{$\vartriangleleft$}\vskip-0.3ex\hbox{$\nequal$}}}

\def\triaeq{\lower0.3\ht\boxA\copy\boxA}
\def\triaNeq{\lower0.3\ht\boxB\copy\boxB}

\begin{document}

-- $\leqq$ \qquad  $\lneqq$ \qquad $\triaeq$ \qquad $\triaNeq$ --

\end{document}

enter image description here

Salim Bou
  • 17,021
  • 2
  • 31
  • 76
  • Is it safe to use boxes 0 and 1 like that on a global scope? I would expect them to get overwritten by some random package. – wrtlprnft Mar 24 '16 at 08:12
  • I think it is very close to my needs and it looks easy to understand. Thanks – poorich Mar 24 '16 at 11:57
  • I find a better way that the code is '\renewcommand\unlhd{\mathrel{\ooalign{$\leqq$\cr\raise.5ex\hbox{$\lhd$}\cr}}}' – poorich Apr 01 '16 at 17:44