4

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.

  • 2
    Use $\overset{\displaystyle a}{b}$ – user11232 Apr 27 '15 at 0:57
4

Does it serves for the purpose?

$_{b}^{a}$

Output: enter image description here

6

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}

enter image description here

3

If you can cope with a bit of plain TeX syntax, you can just do this.

Put $a$ over $b$: $a \atop b$

enter image description here

2

You can use

${b}^{\#}$

$\overset{\#}{b}$

For overset, you need amsmath package.

enter image description here

  • 4
    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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.