6

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 symbol doesn't exist, is there an easy (and at least somewhat elegant) way to force a \succ and \prec on top of each other?

IdleCustard
  • 1,194
AndrewC
  • 163
  • 3
    Have you checked symbols-a4.pdf? \prec (≺) and \succ (≻) are likely the commands you are looking for. – andselisk Jul 12 '19 at 15:42
  • @andselisk I was hoping find a symbol where the \prec and \succ were on top of each other (like the \lessgtr for "less or greater than"). And how did you get the symbols to appear in the comment?! (Though perhaps that's for another question!) Thanks! – AndrewC Jul 12 '19 at 15:47
  • 1
    @AlanMunn I couldn't get it to come up on detexify, Not sure if that's because it doesn't exist, it's too similar to the \lessgtr symbol, or I'm bad at drawing (or all three!) – AndrewC Jul 12 '19 at 15:50
  • Well detexify is only one source. The symbol guide that @andselisk links to is pretty much a definitive guide. – Alan Munn Jul 12 '19 at 15:54
  • 2
    You can take a look at the final index in the ComprehensiveLaTeX Symbols list. Other than that, if it doesn't exist (as I think), you can easily make one from \succ and \prec with the \stackinset command from stackengine. – Bernard Jul 12 '19 at 15:55
  • 1
    @AndrewC Oh, I see what you mean: an alternative of ≶ for "succeeds or precedes". I don't think I've ever encountered such symbol, interesting question! As for the symbols in comments, I simply used Unicode. – andselisk Jul 12 '19 at 15:55
  • @AlanMunn I've looked through that too and couldn't find anything, which gives me a rather sinking feeling it isn't out there. – AndrewC Jul 12 '19 at 15:55
  • 1
    @Bernard I think the stackinset will have to do! Mind posting it as an answer so I can accept it? Thanks!! – AndrewC Jul 12 '19 at 15:56
  • 1
    Like @andselisk I also misread the request initially. (The title is inadvertently ambiguous.) – Alan Munn Jul 12 '19 at 15:57
  • 1
    @andselisk Exactly! Sorry it was so poorly phrased to begin with!! And thanks for the Unicode tip! Will definitely look into that more!! – AndrewC Jul 12 '19 at 15:57
  • @AlanMunn Yeah, rereading it (and thinking about the massive number of questions that you guys must see on mundane and obvious topics) makes me realize how poorly phrased and ambiguous the title (and the whole initial post) is! Sorry about the confusion and wasting your time!! Thanks for the help!! – AndrewC Jul 12 '19 at 15:58
  • 2
    To the best of my knowledge, this doesn't (yet) exist in Unicode. If you can provide a reference to a published instance of the symbol, in context, it can be submitted for consideration. – barbara beeton Jul 13 '19 at 01:46

3 Answers3

10

With just primitive commands:

\documentclass{article}
\usepackage{amsmath,amssymb}

\makeatletter \newcommand{\succprec}{\mathrel{\mathpalette\succ@prec{\succ\prec}}} \newcommand{\precsucc}{\mathrel{\mathpalette\succ@prec{\prec\succ}}}

\newcommand{\succ@prec}[2]{\succ@@prec#1#2} \newcommand{\succ@@prec}[3]{% \vcenter{\m@th\offinterlineskip \sbox\z@{$#1#3$}% \hbox{$#1#2$}\kern-0.4\ht\z@\box\z@ }% } \makeatother

\begin{document}

$A\succprec B\precsucc C_{\succprec\precsucc}$

$\succ\succprec>\gtrless$

\end{document}

enter image description here

Addition for unicode-math

When unicode-math is used, it's not possible to negate the symbols by just prepending \not.

\documentclass{article}
\usepackage{amsmath}
\usepackage{unicode-math}

\makeatletter \NewDocumentCommand{\succprec}{}{\mathrel{\mathpalette\succ@prec{\succ\prec}}} \NewDocumentCommand{\precsucc}{}{\mathrel{\mathpalette\succ@prec{\prec\succ}}} \NewDocumentCommand{\nsuccprec}{}{\mathrel{\notaccent{\succprec}}} \NewDocumentCommand{\nprecsucc}{}{\mathrel{\notaccent{\precsucc}}}

\newcommand{\succ@prec}[2]{\succ@@prec#1#2} \newcommand{\succ@@prec}[3]{% \vcenter{\m@th\offinterlineskip \sbox\z@{$#1#3$}% \hbox{$#1#2$}\kern-0.4\ht\z@\box\z@ }% } \makeatother

\begin{document}

$A\succprec B\precsucc C_{\succprec\precsucc}$

$\succ\succprec>\gtrless$

$\not\succprec\not\precsucc_{\not\succprec}$

\end{document}

enter image description here

One can also use \nprecsucc or \nsuccprec directly.

egreg
  • 1,121,712
  • Do you have any suggestions about how to negate this symbol? If I use \not\succprec in lualatex the process hangs and I have to terminate it (works find in pdflatex).. – Peter Gerdes Mar 29 '24 at 02:37
  • @PeterGerdes With unicode-math it's a bit difficult to get negations… Added. – egreg Mar 29 '24 at 11:13
8

Something like this?

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

\begin{document}

\[ a\succprec b\]%

\end{document}

enter image description here

Bernard
  • 271,350
  • The most unfair thing is that I have but one "accept answer." If it's ok, I'm going with @egreg's since the stackengine package seems to be giving my editor fits. But thank you so much for the help!! – AndrewC Jul 12 '19 at 16:44
-1

You asked...

How do you create a "succeeds or precedes" symbol?

There is usually no reason to write anything like, x y.

If (xy) and (xy), then x = y.

That is, if (x proceeds or is equal to y) and (y proceeds or is equal to x), then we can simply write that x and y are equal.

Usually, for any two objects x and y, we have xy or xy.

The statement, [(xy) or (xy)] is always true.

For example, we have that (1 is less than 10) or (10 is less than 1).

However, some symbols related to what you asked about are shown below:

≰     ≱     ≲     ≳ 
≴     ≵     ≶     ≷ 
≸     ≹     ≺     ≻ 
≼     ≽     ≾     ≿
⊀     ⊁     ⊰     ⊱
⋚     ⋛     ⋜     ⋝ 
⋞     ⋟     ⋠     ⋡
INPUT OUTPUT
\prec
\preceq
\succ
\succeq
\nsucc
IdleCustard
  • 1,194
  • 1
    This is surely well meant but... how does this answer the question? – campa Nov 08 '23 at 21:27
  • 1
    (xy) and (xy) can both be false. Just think of the order given by "set E is included in set F" for example. The symbol requested in the OP therefore indicates that two elements are comparable. – projetmbc Nov 08 '23 at 21:35