I am trying to redefine a binary math operator, more specifically, I would like to replace \geq
by \geqslant
. As far as I understand from a couple of pages on the site, you need to use \mathbin
for correct spacing. However, in a special case where the text in a line gets too long the spacing still behaves differently.
What is the difference between the redefined operator with \mathbin
and the original binary operator? How do you fix this problem?
Here is the MWE:
\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}
\let\geq\relax
\newcommand\geq{\mathbin{ \geqslant }}
\begin{document}
Normally, the new command works: $a\geq b$ vs. $a\geqslant b$ and $X_{a\geq b}$ vs. $X_{a\geqslant b}$.\\
But $a\geqslant b$ if the text in the line is way too long, it gets all messed up $ABC_{mnopqr}$.\\
But $a{\geq} b$ if the text in the line is way too long, it gets all messed up $ABC_{mnopqr}$.\\
\end{document}
Best Answer
You would need
\mathrel
, because you want a relation symbol, whereas\mathbin
is for symbols like+
that obey different rules.However,
\geqslant
is already defined as a relation symbol, soworks and is much easier. The
\DOTSB
is for getting the automatic placement of dots right. You can also useif you feel confident with using low level commands.
Note that in
$a{\geq}b$
the symbol loses its type and becomes an ordinary one (so no spacing around it).