[Tex/LaTex] How to set letter above or below the symbol stacking-symbols I have known \overset{K}{\|} to set above. However how to do like this: Best Answer The same vertical size as \sum: \documentclass{article} \usepackage{amsmath} \makeatletter \newcommand{\nnn}{\DOTSB\nnn@\slimits@} \newcommand{\nnn@}{\mathop{\mathpalette\nnn@@\|}} \newcommand{\nnn@@}[2]{% \vphantom{\sum}% \ifx#1\displaystyle\big#2\else#2\fi } \makeatother \begin{document} \[ \nnn_{k=1}^K\quad \sum_{k=1}^K \] \begin{center}% just to show inline math below displaystyle $\nnn_{k=1}^K$\quad$\sum_{k=1}^K$ \end{center} \end{document} Related Solutions[Tex/LaTex] How to make an overset symbol at the same size and height as \bar except with a different symbol This is a clear case for \accentset from the accents package: \documentclass{article} \usepackage{accents} \newcommand{\vect}[1]{\accentset{\rightharpoonup}{#1}} \begin{document} $\vect{x}$ \end{document} [Tex/LaTex] Write above the symbol math “subset” Usually \overset is used for that purpose. \documentclass{article} \usepackage{amsmath} \begin{document} $A\overset{?}{\subset}B$ $A\subset B$ \end{document} The second formula is just for showing that the spacing for a relation symbol is preserved. Related Question[Tex/LaTex] Superimpose letter on integral symbol[Tex/LaTex] Change vertical space in overset[Tex/LaTex] double tilde symbol under letter[Tex/LaTex] How to print “~” in order to put text above it
Best Answer
The same vertical size as
\sum
: