How to put one symbol (number) above another

I'd like to put one symbol over another? There are some similar things in math, like $\binom{a}{b}$, but I don't want the parentheses, or $\frac{a}{b}$ without the division line. The closest I've found is $\overset{a}{b}$ (from mathtools) but the a ends up smaller than the b.

• Use $\overseta}{b$ – user11232 Apr 27 '15 at 0:57

Does it serves for the purpose?

$_{b}^{a}$


Output: Just to give the OP different options, here I show the basic features of the stackengine approach to stacking, with the first column as a \stackon, the second as a \stackunder and the third as a \stackanchor. The first row uses "short" stacks, in which the gap between the top of one element and the bottom of the element above it are fixed, whereas the second row uses "long" stacks, in which the baseline skip between adjacent rows is fixed.

While I don't show it here, the default gaps and baseline skips may be redefined, or simply passed as an optional argument.

\documentclass{article}
\usepackage{stackengine}
\stackMath
\begin{document}
% \def\stacktype{S}% DEFAULT TYPE, constant gap between stacked elements
$x \stackon{g}{b} y \stackon{b}{g} z\quad x \stackunder{g}{b} y \stackunder{b}{g} z\quad x \stackanchor{g}{b} y \stackanchor{b}{g} z$
\def\stacktype{L}% constant baselineskip between stacked elements
$x \stackon{g}{b} y \stackon{b}{g} z\quad x \stackunder{g}{b} y \stackunder{b}{g} z\quad x \stackanchor{g}{b} y \stackanchor{b}{g} z$
\end{document} If you can cope with a bit of plain TeX syntax, you can just do this.

Put $a$ over $b$: $a \atop b$ You can use

${b}^{\#}$

$\overset{\#}{b}$


For overset, you need amsmath package. • A little short. Package amsmath is needed for \overset and # will not work out of the box, use \# instead. – Heiko Oberdiek Jul 25 '17 at 19:26