# Typing Specific Inequality Symbol

I'm trying to type the following symbol in TeX, but I can't seem to find it anywhere. Am I supposed to create it myself? If so, how should I do this? Please and thank you.

• What does this symbol mean? – Steradiant Jun 9 at 12:45
• Would ⋛ (\gtreqless) or ⋚ (\lesseqgtr) from univode-math, stix, etc. meet your needs? Or the many other variants such as ⪑ or ⪓? – Davislor Jun 9 at 13:08
• If not, you could overlay \geq and \le with \@ooalign. – Davislor Jun 9 at 13:09
• Or add an underbar to ⪤ \glj. – Davislor Jun 9 at 13:13

You could indeed construct it yourself by printing a \leq symbol on a \geq symbol.

\documentclass{article}
\usepackage{amsmath}
\makeatletter
\newcommand*{\leqgeq}{%
\mathrel{\mathpalette\@leqgeq\relax}%
}
\newcommand*{\@leqgeq}[2]{%
\makebox[0pt][l]{$$#1\leq$$}\mbox{$$#1\geq$$}%
}
\makeatother
\begin{document}
if $$a \leqgeq b$$

$$\displaystyle a \leqgeq b$$
$$\textstyle a \leqgeq b$$
$$\scriptstyle a \leqgeq b$$
$$\scriptscriptstyle a \leqgeq b$$
\end{document}


• How would you generalize this command to let it operate correctly in subscript or superscript positions? – Mico Jun 9 at 13:44
• @Mico Like this? – Vincent Jun 9 at 14:02
• Yes, \mathpalette gets the job done. – Mico Jun 9 at 14:03

An easy application of \mathpalette (for taking into account the current math style) and \ooalign (for superimposing two symbols).

\documentclass{article}
\usepackage{amsmath}

\makeatletter
\newcommand{\win}{% weird inequality
\mathrel{\mathpalette\win@\relax}%
}
\newcommand{\win@}[2]{%
\ooalign{$\m@th#1\leq$\cr$\m@th#1\geq$\cr}%
}
\makeatother

\begin{document}

$a\win b$

$\scriptstyle a\win b$

$\scriptscriptstyle a\win b$

\end{document}


Before you ask a new question, here's how to cope also with < and >.

\documentclass{article}
\usepackage{amsmath}

\makeatletter
\newcommand{\win}{% weird inequality
\mathrel{\mathpalette\win@{<>}}%
}
\newcommand{\wineq}{% weird inequality
\mathrel{\mathpalette\win@{\leq\geq}}%
}
\newcommand{\win@}[2]{\win@@{#1}#2}
\newcommand{\win@@}[3]{%
\ooalign{$\m@th#1#2$\cr$\m@th#1#3$\cr}%
}
\makeatother

\begin{document}

$a\win b\wineq c$

$\scriptstyle a\win b\wineq c$

$\scriptscriptstyle a\win b\wineq c$

\end{document}


\tracinglostchars = 2 % Warn if a glyph is missing from a font
\documentclass{article}
\usepackage{unicode-math}

\pagestyle{empty}

\defaultfontfeatures{Scale=MatchLowercase}
\setmathfont{STIX Two Math}

\newcommand\glej{\mathrel{\underline{\glj}}}

\begin{document}
$a \glej b$
\end{document}


To get just this one symbol from STIX Two Math, use \setmathfont[range=\glj, Scale=MatchLowercase]{STIX Two Math} instead.

If you need to use PDFLaTeX instead, the \glj symbol is in the stix and stix2 packages.

(edited the solution to permit it to work in \scriptstyle and \scriptscriptstyle situations)

Here's a solution which employs the TeX primitives \hss and \cr and the low-level command \ooalign to superimpose the \ge and \le symbols and which employs a \mathchoice directive to permit typesetting the symbol in first- and second-order sub/superscript mode.

\documentclass{article}
\newcommand\funkyneq{\mathrel{\mathchoice
{\ooalign{\hss$\ge$\cr$\le$}}
{\ooalign{\hss$\ge$\cr$\le$}}
{\ooalign{\hss$\scriptstyle\ge$\cr$\scriptstyle\le$}}
{\ooalign{\hss$\scriptscriptstyle\ge$\cr$\scriptscriptstyle\le$}}
}}
\begin{document}
$a\funkyneq b \quad \scriptstyle a\funkyneq b \quad \scriptscriptstyle a\funkyneq b$
\end{document}

• Quite a mouthful! – egreg Jun 9 at 13:52
• @egreg - \win is definitely a more memorable name than \funkyneq`.... – Mico Jun 9 at 14:00