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.
4 Answers
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}
- 20,157
-
How would you generalize this command to let it operate correctly in subscript or superscript positions? – Mico Jun 09 '20 at 13:44
-
-
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}
- 1,121,712
(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}
- 506,678
\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.
- 44,045






\gtreqless) or ⋚ (\lesseqgtr) fromunivode-math,stix, etc. meet your needs? Or the many other variants such as ⪑ or ⪓? – Davislor Jun 09 '20 at 13:08\geqand\lewith\@ooalign. – Davislor Jun 09 '20 at 13:09\glj. – Davislor Jun 09 '20 at 13:13