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

4
  • 1
    Welcome to TeX.SX. \mathbf instead of \textbf. Are you using esvect package? And I am sure you don't want blond vectors ;-)
    – user31729
    Commented Sep 26, 2015 at 14:28
  • What's wrong with blond vectors? ;)
    – JPi
    Commented Sep 26, 2015 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
    Commented Sep 26, 2015 at 14:33
  • @AdrianAd: Yes, it won't work with \mathbf due to the vector arrow. Didn't thought about that.
    – user31729
    Commented Sep 26, 2015 at 14:38

3 Answers 3

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

1
  • @Mico: Package esvect
    – user31729
    Commented Sep 26, 2015 at 14:38
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}
2
  • egreg will scold you for using \boldsymbol, I fear
    – user31729
    Commented Sep 26, 2015 at 14:43
  • @ChristianHupfer I see there's discussion here tex.stackexchange.com/a/10643/88563 . I'm new, should I delete my answer?
    – Steve
    Commented Sep 26, 2015 at 14:50
2

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .