I defined a command:

\newcommand{\lequiv}{\raisebox{-0.25 \height}{\overset{<}{\sim}}}

But whenever I try to use it (for instance, in gather, I get Missing $ inserted. Why?

  • 6
    Because \raisebox switches to text mode. Just change to \newcommand{\lequiv}{\raisebox{-0.25 \height}{$\overset{<}{\sim}$}} – azetina Apr 11 '17 at 15:25
  • although the question as stated is answered well, the symbol you are trying to get already exists as \lesssim with \usepackage{amssymb}. – barbara beeton Apr 11 '17 at 16:42

The \raisebox command is used to declare the vertical position of text; that is to lower or raise text. Note the text is processed in LR mode With this said,


is incorrectly declared and gives an error because of math declarations that should be in math mode and which are in text mode.

A quick fix is to:


azetina’s answer addresses the error you get and removes it. On the other hand, the output you get is rather poor.



$A\lesssim B\le C\gtrsim D_{x\lesssim y}$


enter image description here

Here's a better definition than your \lequiv that could come handy in case you want something different from \sim.





$A\lequiv B\le C\gequiv D_{x\lequiv y}$


enter image description here

A visual comparison with what you’d get with your definition.

enter image description here

On the other hand, amssymb provides \lesssim and \gtrsim:

  • 2
    why not just use \lesssim from the amssymb package? – barbara beeton Apr 11 '17 at 16:43
  • Should I delete my answer? You can amend yours to reflect the problem and give the improvement. – azetina Apr 11 '17 at 16:51
  • @barbarabeeton Because I didn't remember about it! – egreg Apr 11 '17 at 16:55
  • @azetina no, keep it and add about \lessim – egreg Apr 11 '17 at 16:56
  • @azetina -- note that \lesssim has 3 esses: "less" + "sim". – barbara beeton Apr 11 '17 at 17:15

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.