Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
add comment

4 Answers

up vote 12 down vote accepted

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

share|improve this answer
2  
You might want to add \mathrel{\substack{...}} for the proper spacing. –  tohecz Jan 4 '13 at 11:02
    
Thank you, bloodworks and tohecz. –  sawa Jan 4 '13 at 11:03
    
@tohecz indeed i want;) –  bloodworks Jan 4 '13 at 11:11
    
Just wanted to add that I used this solution to create a nice inline i.i.d. distributed symbol. I haven't found a question about it, so I thought I'd add it for future seekers.. –  Kiwile Dec 15 '13 at 16:30
add comment

I doubt that you really want such an ugly symbol, but here are two proposals:

\documentclass{article}
\usepackage{amssymb}
\newcommand{\llgg}{\mathrel{\mathpalette\llggi\relax}}
\newcommand{\llggi}[2]{\vcenter{\offinterlineskip\hbox{$#1\ll$}\hbox{$#1\gg$}}}

\newcommand{\sllgg}{\mathrel{\mathpalette\sllggi\relax}}
\newcommand{\sllggi}[2]{\vcenter{\offinterlineskip\hbox{$\mkern2mu#1\ll$}\hbox{$#1\gg\mkern2mu$}}}

\begin{document}
$a\llgg b \lessgtr c_{\llgg}$

$a\sllgg b \lessgtr c_{\sllgg}$
\end{document}

enter image description here

One might add some vertical space in the first version, but I'd prefer the second one, in which I add instead a little horizontal shift.

share|improve this answer
add comment

I would suggest putting two \lessgtr in a roll, with a good space inbetween so that the lines join each other nicely:

enter image description here

\documentclass{article}

\usepackage{amsmath, amssymb}
\newcommand\llgg{\lessgtr\mkern-5.7mu\lessgtr}

\begin{document}
$a\llgg b$

$f_{a\llgg b}$

$g_{h_{a\llgg b}}$
\end{document}
share|improve this answer
add comment

I use stackrel or stackbin commands.

\documentclass{article}

\usepackage{amsmath, amssymb,stackrel}

\begin{document}

$$ A\stackbin[\text{and}]{}{+} B \stackrel[x]{!}{=} C$$

$$ A\stackbin{\ll}{\gg} B $$

\end{document}

You can find useful the following post

Cheers.

share|improve this answer
2  
Have you tried to compile the code? It doesn't really look like one complicated relational symbol. The upper part is smaller. –  tohecz Jan 4 '13 at 12:10
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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