TransWikia.com

How to get trianglelefteq similar to leqslant?

TeX - LaTeX Asked by Andrei Smolensky on December 6, 2020

I find leqslant command producing nicer output then leq. For the ideal/normal subgroup symbol, however, one has trianglelefteq (or unlhd), but no slant version.

The mathabx package changes the trianglelefteq itself, but also makes the triangle narrow, which doesn’t make me happy.

Is there any other solution to this?

3 Answers

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
deftrianglelefteqslant{ThisStyle{mathrel{%
  stackinset{r}{.75pt+.15LMpt}{t}{.1LMpt}{rule{.3pt}{1.1LMex+.2ex}}{SavedStyleleqslant}%
}}}
%usepackage{mathabx}
begin{document}
$x leqslant y$par
$x trianglelefteqslant y$par
$scriptstyle x trianglelefteqslant y$par
$scriptscriptstyle x trianglelefteqslant y$
end{document}

enter image description here

Correct answer by Steven B. Segletes on December 6, 2020

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{mathpalettesl@unlhdrelax}%
}

newcommand{sl@unlhd}[2]{%
  sboxz@{$#1lhd$}%
  sboxtw@{$#1leqslant$}%
  dimen@=httw@
  advancedimen@-htz@
  ifx#1displaystyle
    advancedimen@ .2pt
  else
    ifx#1textstyle
      advancedimen@ .2pt
    fi
  fi
  ooalign{raisebox{dimen@}{$m@th#1lhd$}cr$m@th#1leqslant$cr}%
}
makeatother

begin{document}
$Nslunlhd G_{slunlhd}$

Large
$Nslunlhd G_{slunlhd}$

end{document}

Basically, I superimpose leqslant to lhd (with a small correction in text and display styles).

enter image description here

Answered by egreg on December 6, 2020

I find a method from symbol-a4, page16. It needs stmaryrd Package, and the command is trianglelefteqslant and trianglerighteqslant.

documentclass{article}

usepackage{stmaryrd}
begin{document}
$x trianglelefteqslant y$
end{document}

Answered by hep on December 6, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP