The underset of my "xdim" command is touching characters in the line underneath. How to correct?
\documentclass[12pt]{minimal}
\usepackage{amsmath}
\newcommand{\xdim}[1]{\underset{\textrm{vec}}{\textrm{dim}}\left(#1\right)}
\begin{document}
$\xdim{f}$ consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna al ali qua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
\end{document}
\sum
switch automatically to using a subscript position rather underneath when used in inline math for exactly this reason.