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!
\boldsymbol
is still inside \mathnormal
, thus the setting of \mathnormal
is overwritten by \boldsymbol
. A way to solve this is to redefine \boldsymbol
inside \coef
:
\documentclass[12pt,a4paper]{letter}
\usepackage[latin1]{inputenc}
\usepackage{amsmath,amsfonts,amssymb}
\newcommand{\x}{\boldsymbol{x}}
\newcommand{\coef}[2]{%
\begingroup
\renewcommand*{\boldsymbol}[1]{##1}%
#1_{#2}%
\endgroup
}
\begin{document}
The vector $\x$ and its coeficients $\coef{\x}{i}$.
\end{document}
Best Answer
You can access boldface math symbols with the bm package. As usual, it is always beneficiary to go through the manual for some subtle features.