# Bold or arrow vectors with new command

Im quite new to latex, I would like to make either bold or arrow vectors. I found many solutions to this but i cant see where i am doing it wrong, my code is

\documentclass[a4paper,11pt]{report}
\DeclareMathAlphabet      {\mathbfit}{OML}{cmm}{b}{it}
\usepackage[T1]{fontenc}
\usepackage[utf8x]{inputenc}
\usepackage{lmodern}
\usepackage{amsmath}
\begin{document}

\newcommand{\vect}[1]{\vec{#1}}


...

\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}


...​

this comes out:

when i use the boldsymbol command

\newcommand{\vect}[2]{\boldsymbol{#1}}​


this comes out:

i also used bf symbol:

i am showing in the image below which the vectors are


Thanks in advance for the help

• Welcome to TeX SX! What you're asking for is not very clear to ma? Could you explain a little more, and give a Minimal Working Example? – Bernard Oct 19 '14 at 0:45
• Do you want the Greek letters bold and that isn't working? – dustin Oct 19 '14 at 1:21

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!

• So simple. Problem was the number of arguments, helped very much thank you! – ourania Oct 19 '14 at 1:06