I use a tilde below a letter as a symbol for a vector. Redefining the \vec-command delivers a good output, but subscripts are a pain. I'm using the following code:
\documentclass[10pt,a4paper]{article}
\usepackage{amsmath}
\begin{document}
\renewcommand{\vec}[1]{{\underset{\sim}{#1}}}
$\vec v = \vec{e}_x + 2 \vec{e}_y + 3\vec{e}_z $
\end{document}
This produces the following output:
The space between the symbol and the tilde is too big and the subscript for the unit vectors is too low.
I'd like this better:
I already tried multiple variations, e.g. {\vec{e}}_x
, but the problem persists.
Any ideas?