2

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.

enter image description here

  • 1
    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
3

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}

| improve this answer | |
  • 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
4

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}

enter image description here

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}

enter image description here

| improve this answer | |
1
\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}

STIX Two Font Sample

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.

| improve this answer | |
1

(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.

enter image description here

\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}
| improve this answer | |
  • 1
    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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.