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
I have used the \overrightarrow command directly and not as a newcommand for the last one to come out right. I would like this result but with small arrows (vec) or bold vectors, but those commands seem to mess up the following symbols like "=" which does not appear and "_{0} " that does not come out as index to u etc. Problem seems to be with "newcommand", because when i use "\overrightarrow" in new command same thing happens:
Thanks in advance for the help
Best Answer
Do you want this?
Note that when you say
you are defining a command with two mandatory arguments so you must write
If you want one argument to be optional, allowing you to write
or
you need
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!