[Tex/LaTex] Alignment using “\lesssim” command

vertical alignment

I'm sure someone has asked this before, but can't find where!

I use the code:

$ a < b \lesssim c$

Unfortunately, it appears as:

Undersirable alignment

I want the "approximately less than sign" to be a bit lower. How can I do this?

Best Answer

You can lower the symbol by the excess height with respect to <. But you shouldn't.

\documentclass{article}
\usepackage{amsmath,amssymb}

\let\originallesssim\lesssim
\let\originalgtrsim\gtrsim

\DeclareRobustCommand{\lesssim}{%
  \mathrel{\mathpalette\lowersim\originallesssim}%
}
\DeclareRobustCommand{\gtrsim}{%
  \mathrel{\mathpalette\lowersim\originalgtrsim}%
}

\makeatletter
\newcommand{\lowersim}[2]{%
  \sbox\z@{$#1<$}%
  \raisebox{-\dimexpr\height-\ht\z@}{$\m@th#1#2$}%
}
\makeatother

\begin{document}

$A<B\lesssim C\gtrsim D$

$\scriptstyle A<B\lesssim C\gtrsim D$

\end{document}

enter image description here

Related Question