5

Consider I have a vector x containing different x_i values. I want x to be both blond and have arrow sign on top. But if I use $\vv\textbf{x}}$ the font of x would be different from the fonts of elements,x_i, in the vector.

Question: How can I define a bold vector x that has arrow on top and has the same font as the element x_i

Aydin
  • 153
  • 1
    Welcome to TeX.SX. \mathbf instead of \textbf. Are you using esvect package? And I am sure you don't want blond vectors ;-) –  Sep 26 '15 at 14:28
  • What's wrong with blond vectors? ;) – JPi Sep 26 '15 at 14:31
  • @ChristianHupfer Thank you; but even if I use \vv{\mathbf {x}}, its font would be different from x_i. How can I make them both have the same font? – Aydin Sep 26 '15 at 14:33
  • @AdrianAd: Yes, it won't work with \mathbf due to the vector arrow. Didn't thought about that. –  Sep 26 '15 at 14:38

3 Answers3

8

\mathbf seems to be wrong for vector symbols, at least in conjunction with esvect package style vectors (\vv) command.

By the way: esvect provides eight different styles of arrows to be selected with \usepackage[a]{esvect} up to \usepackage[h]{esvect}. [d] is default.

\documentclass{article}

\usepackage{mathtools}
\usepackage{bm}
\usepackage{esvect}


\begin{document}


$\vv{\textbf{x}} \longrightarrow$ wrong

$\vv{\mathbf{x}} \longrightarrow$ still wrong

$\vv{\bm{x}} \longrightarrow$ correct


\end{document}

enter image description here

4

You can use \boldsymbol{x} defined in the amsmath package.

\documentclass{article}

\usepackage{amsmath}

\begin{document}

$$\overrightarrow{\boldsymbol{x}} \rightarrow x_i$$

\end{document}
Steve
  • 281
  • egreg will scold you for using \boldsymbol, I fear –  Sep 26 '15 at 14:43
  • @ChristianHupfer I see there's discussion here http://tex.stackexchange.com/a/10643/88563 . I'm new, should I delete my answer? – Steve Sep 26 '15 at 14:50
2

You want \usepackage{bm} and \vec{\bm{x}}

egreg
  • 1,121,712