When I was working on a note for linear algebra, I noticed that I used \textbf{v} a lot, so I put
\newcommand{\vecv}{\textbf{v}}
at the top of the document.
But I noticed that when using it in paragraph, \vecv does not produce the correct spacing
But using \textbf{v} works just fine
Now why is that?


\vecv{}instead or{\vecv}– Mane32 Feb 11 '24 at 04:46\vecvis supposed to represent a math-y object, the macro definition\newcommand{\vecv}{\textbf{v}}is wrong. Better would be\newcommand{\vecv}{\ensuremath{\mathbf{v}}}, where\ensuremathis a macro provided by the amsmath package. – Mico Feb 11 '24 at 05:44$... $, this gives the doc a better structure) – daleif Feb 11 '24 at 09:36\ensuremathis actually from latex – David Carlisle Feb 11 '24 at 09:36$\vecv$so again there is no problem to solve. Rather than define lots of such commands I would define\vecto be\mathbfand use\vec{v}so it is usable with all letters and again has no problem with spaces. – David Carlisle Feb 11 '24 at 11:49