# Superscript directly above character

In math mode, I want to typeset a beta character over an equals sign.

I've tried $=^{\beta}$, but that produces a superscript to the right.

I want the beta to be exactly above the equals sign. How do I do this?

• Do search for \stackrel or \overset or, for that matter, the stackengine package. Dec 8, 2014 at 12:22
• @StevenB.Segletes please post that as an answer, as the accepted answer is simply incorrect. Dec 8, 2014 at 14:03
• Please note that Steven's answer is correct, while the other one isn't. Check the fact that in the \mathop answer the = sign is in a different vertical position and that spaces around it in a formula are wrong. Dec 8, 2014 at 16:29

As suggested in my comment, the \overset macro of the amsmath package is designed to accomplish this task.

\documentclass{article}
\usepackage{amsmath}
\begin{document}
$A \overset{\beta}{=} B$
\end{document}


Using \stackrel, this is the syntax:

\documentclass{article}
\begin{document}
$A \stackrel{\beta}{=} B$
\end{document}


And, finally, with stackengine,

\documentclass{article}
\usepackage{stackengine}
\stackMath
\begin{document}
$A \mathrel{\stackon[1pt]{=}{\scriptstyle\beta}} B$
\end{document}


For something this straightforward, stackengine is overkill, but it can be useful if there are multiple things to be stacked, if the vertical stacking gaps need tweaking, or if special horizontal alignments must be applied.

Try:

$\mathop = \limits^\beta$


• This loses the relation spacing that = should have see $a \mathop = \limits^\beta b$ Dec 8, 2014 at 12:48
• This is incorrect. Dec 8, 2014 at 14:33