TransWikia.com

How to create a "succeeds or precedes" symbol?

TeX - LaTeX Asked by AndrewC on May 3, 2021

Might be an obvious (or impossible) request, but does anyone know if there’s an equivalent of the “less than or greater than” symbol but for “succeeds or precedes?” Thanks!

I’ve tried using detexify (which would just come back with the lessgtr symbol) and looking through as many of the math symbol pdf guides as I can find. I might just be missing it, but I’ve tried searching a few different ways. Alternatively, if the sumbol doesn’t exist, is there an easy (and at least somewhat elegant) way to force a succ and prec on top of each other?

2 Answers

With just primitive commands:

documentclass{article}
usepackage{amsmath,amssymb}

makeatletter
newcommand{succprec}{mathrel{mathpalettesucc@prec{succprec}}}
newcommand{precsucc}{mathrel{mathpalettesucc@prec{precsucc}}}

newcommand{succ@prec}[2]{succ@@prec#1#2}
newcommand{succ@@prec}[3]{%
  vcenter{m@thoffinterlineskip
    sboxz@{$#1#3$}%
    hbox{$#1#2$}kern-0.4htz@boxz@
  }%
}
makeatother

begin{document}

$Asuccprec Bprecsucc C_{succprecprecsucc}$

$succsuccprec>gtrless$

end{document}

enter image description here

Correct answer by egreg on May 3, 2021

Something like this?

documentclass{article}
usepackage{amsmath, amssymb}
usepackage{stackengine}
newcommand{succprec}{mathrel{vcenter{hbox{$stackMathstackinset{l}{-0.28em}{c}{0.9ex}{prec}{succ}$}}}}

begin{document}

[ asuccprec b]%

end{document}

enter image description here

Answered by Bernard on May 3, 2021

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