[Tex/LaTex] Must be equal and other stacked math symbols


Several times already I wanted to express something like

A = B


X ------> oo

in a math environment. How do I achieve this?

On a related note: What is the correct term for this? Googling for ! and = unsurprisingly doesn't yield too many useful results.

Best Answer

In the code below, I create a new command, \mbeq (short for "must be equal"...), which is a "math relational" operator (same type as the "ordinary" equal sign). Using the \overset command in the definition of the \mbeq operator automatically makes the new command "inherit" the type of the second argument of the \overset command; hence, it's not necessarily to assign the type "mathrel" explicitly.

 % "mbeq": must be equal
$ a\mbeq b$, $x\xrightarrow{n\to 0}\infty$

enter image description here

Finally, I'm not aware of a commonly used term for the "must be equal" symbol (exclamation mark set over equality symbol). I searched detexify, and no predefined symbol came up.

Related Question