How to get \trianglelefteq similar to \leqslant?
I'm not so sure this is better looking (but I dislike \leqslant
as well).
Probably you'll think to a better name than \slunlhd
. ;-)
\documentclass{article}
\usepackage{amssymb}
\makeatletter
\newcommand{\slunlhd}{%
\mathrel{\mathpalette\sl@unlhd\relax}%
}
\newcommand{\sl@unlhd}[2]{%
\sbox\z@{$#1\lhd$}%
\sbox\tw@{$#1\leqslant$}%
\dimen@=\ht\tw@
\advance\dimen@-\ht\z@
\ifx#1\displaystyle
\advance\dimen@ .2pt
\else
\ifx#1\textstyle
\advance\dimen@ .2pt
\fi
\fi
\ooalign{\raisebox{\dimen@}{$\m@th#1\lhd$}\cr$\m@th#1\leqslant$\cr}%
}
\makeatother
\begin{document}
$N\slunlhd G_{\slunlhd}$
\Large
$N\slunlhd G_{\slunlhd}$
\end{document}
Basically, I superimpose \leqslant
to \lhd
(with a small correction in text and display styles).
Here I stack a \rule
atop the \leqslant
in order to make \trianglelefteqslant
, without the mathabx
package. By using the scalerel
package's features, it can be made to work across math styles.
\documentclass{article}
\usepackage{amssymb}
\usepackage{stackengine,scalerel}
\stackMath
\def\trianglelefteqslant{\ThisStyle{\mathrel{%
\stackinset{r}{.75pt+.15\LMpt}{t}{.1\LMpt}{\rule{.3pt}{1.1\LMex+.2ex}}{\SavedStyle\leqslant}%
}}}
%\usepackage{mathabx}
\begin{document}
$x \leqslant y$\par
$x \trianglelefteqslant y$\par
$\scriptstyle x \trianglelefteqslant y$\par
$\scriptscriptstyle x \trianglelefteqslant y$
\end{document}