# How to properly stack three symbols (e.g. symbols or text above and below convergence arrows or tildes)?

I would like to define a command with three arguments which stacks three symbols or text on top of each other. The \tmb command below does that but creates a bit too much vertical space between the middle and the bottom symbol. The commands \trialone and \trialtwo try to fix that with \raisebox but fail (see below). Then there is a contender based on \mystack, but if the middle symbol is a \to, then it is not vertically aligned with the division bar of a fraction right next to it, for example. Also, there is too little space around the three stacked symbols (to the left and right); see also below.

\documentclass{scrartcl}

\usepackage{amsmath}
\newcommand{\tmb}[3]{\underset{{\scriptscriptstyle #3}}{\overset{{\scriptscriptstyle #1}}{#2}}}% *t*op, *m*iddle, *b*ottom command
\newcommand{\trialone}[3]{\underset{{\scriptscriptstyle\raisebox{2mm}{#3}}}{\overset{{\scriptscriptstyle #1}}{#2}}}
\newcommand{\trialtwo}[3]{\underset{{\raisebox{2mm}{\tiny #3}}}{\overset{\scriptscriptstyle #1}{#2}}}

\end{document}


• Great, thanks. If one wants to adjust the vertical space between "approx." and the arrow/tilde, one can change the \vspace{}. How can one adjust the space between the arrow/tilde and the "n large"? Ah, got it, one can add a \vspace{} right after the $2#$ part, I believe. May 7 '21 at 15:16
• @MariusHofert Like at the top, \noalign{\vspace{...}} (fill in the value) after \cr. May 7 '21 at 15:24
• Great, many thanks. I could also use [4] to create an optional argument that adds the same amount of \vspace above and below the middle symbol, so one can adjust it manually if required :-) May 7 '21 at 15:30