Priming a vector denoted with the arrow is, as you discovered, not a really good thing to do. You want to prime the letter, not the whole construction.
\documentclass{article}
\newcommand{\pvec}[1]{\vec{#1}\mkern2mu\vphantom{#1}}
\begin{document}
$\vec{p}+\pvec{p}'=\pvec{p}''$
\end{document}
Do you want this?
\documentclass[a4paper,11pt]{report}
\DeclareMathAlphabet {\mathbfit}{OML}{cmm}{b}{it}
\usepackage[T1]{fontenc}
\usepackage[utf8x]{inputenc}
\usepackage{lmodern}
\usepackage{amsmath}
% \newcommand{\vect}[1]{\vec{#1}}
\newcommand{\vect}[1]{\boldsymbol{\vec{#1}}}
\begin{document}
\begin{gather}
\rho = \rho _{0}(\vect{x} , t) + \varepsilon \rho _{1}(\vect{x},t) \\
p = p _{0}(\vect{x} , t) + \varepsilon p _{1}(\vect{x},t) \\
\vect{u}=\vect{u} _{0}(\vect{x},t) + \varepsilon\vect{u} _{1}(\vect{x},t)
\end{gather}
\end{document}
Note that when you say
\newcommand\somecommand[2]{something to do}
you are defining a command with two mandatory arguments so you must write
\somecommand{first argument}{second argument}
If you want one argument to be optional, allowing you to write
\somecommand[first argument]{second argument}
or
\somecommand{second argument only}
you need
\newcommand\somecommand[2][default value for first argument]{something to do}
However, you only seem to be using one argument in your definition which did not try to tell TeX you wanted a vector (no \vec
involved) so it did what you asked and just made the argument bold as requested.
Note that this may well fail to answer your question since I am not at all sure I understand it, but it is too much for a comment!
Best Answer
The
esvect
package provides nice vector arrows in most cases: The command is\vv
(not\vec
) and it provides a centered, non-slanted (better 'upright') arrow, which is shorter than the arrow given by\overrightarrow
.From Bernard's comment:
esvect
defines 8 different arrow (head) types, which can be chosen by\usepackage[a]{esvect}
to\usepackage[h]{esvect}
. Omitting the optional argument will use the (default)d
variant