[Tex/LaTex] a simple way to create a binary relation symbol on top of another

math-moderelation-symbolssymbols

What is a simple way to have \ll on top of \gg with equal size and vertically center aligned and have them work as a binary relation symbol like \lessgtr? The commands \underset and \overset cannot be used because they do not treat the two symbols equally, and they do not vertically center.

Best Answer

You can try substack

\documentclass{article}

\usepackage{amsmath, amssymb}
\begin{document}

\newcommand{\ggll}{\mathrel{\substack{\ll\\[-.05em]\gg}}}

$x\ggll x$

$x\substack{\ll\\\gg}x$

\end{document}

I added amsmath for \lessgtr but it also needed for substack. You may read more about this command in the amsmath documentation or in the mathmode paper. As @tohecz pointed out, one may need some spacing correction by mathrel. Furthermore i added a vertical correction with the optional argument of \\. This makes the symbol a little bit more like belonging together (and might be a thing of personal taste too).

l#1: with corrections; l#2: without