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.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
up vote 7 down vote accepted

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.

share|improve this answer
As I said in another comment, the \mathrel here is redundant, because \overset usually guesses right. But +1 for suggesting a new command for it. – egreg Oct 21 '11 at 23:42
Thanks, @egreg. I'll update my answer accordingly. – Mico Oct 22 '11 at 1:13


\[ \overset{!}{=}\qquad x\xrightarrow{n\to 0}\infty \]


enter image description here

share|improve this answer
Rather than \stackrel I'd recommend \overset – egreg Oct 21 '11 at 22:42
@egreg: right. I've edited my answer, thanks. – Gonzalo Medina Oct 21 '11 at 22:52
@egreg: In this \case, there is no difference between the visual output of \stackrel and \overset. I guess the only motivation behind it is that it has an \underset counterpart which makes it more generic in terms of usage. – Werner Oct 21 '11 at 22:58
@Werner That's a happy case. Try with \stackrel{!}{x} and you'll see the difference. Besides, \overset tries to guess the nature of the main symbol (relation or operation), so using the correct spacing; conversely, \stackrel always creates a relation. – egreg Oct 21 '11 at 23:05

Your Answer


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.