Consider the following MWE:
\documentclass{article}
\usepackage{amsmath,stackengine}
\stackMath
\begin{document}
\renewcommand\useanchorwidth{T}
\begin{equation*}
\left( 0, \ldots, \underbrace{e_j}_\text{$i$-th postion}, \ldots, 0 \right)
\end{equation*}
\end{document}
This produces the following output:
The problem is that I followed Steven B. Segletes' solution in Underbrace changing spacing of operators in order to prevent the underbrace text from messing with the horizontal spacing of the surrounding ldots. Does anyone know what I've done wrong?
And I'd also like the parentheses to ignore the underbrace text with regards to automatic vertical sizing; I'm not sure if I should put that in a separate question because I'm new to the site!
_\text{$i$-th postion}
increases the space arounde_j
so if you only type_\text{i}
for instance, you have less horizontal spacing.