[Tex/LaTex] How to make vector arrows

rstudiovector

I would like to make a vector over my beta symbol.
What I use for the moment is:

$A\overrightarrow{\beta}$

I have also tried the following:

$A\vv{\beta}$
$A\vec{\beta}$

Note that all of these works if I add another symbol next to \beta.
I have been googeling but these are all the solutions I found.

Edit: So to clarify.
I use R Markdown in R-studio, which uses latex (maybe this is the problem).
From the code $A\vec{\beta}=\vec{b}$ I get the output shown on this picture.

Picture of my output

However, I want it to be:

The output I want

The "solutions" I have stated above works if I add another symbol next to the beta, like this:

$A\vec{\beta A}=\vec{b}$ 

I get this output:

enter image description here

However, I do not want that extra A at the end.

Edit 2: SOLVED:

The problem seem to be that this issue only appears when you hover your mouse over the equation. When you actually compile the entire thing it seems to work fine.
Since I had a lot of data in my rmd file I did not want to compile it but tried it in a new empty rmd file and it works just fine.

Best Answer

\documentclass{article}
\usepackage{esvect}
\begin{document}
    $a\overrightarrow{\beta}b$
    $a\vec{\beta}b$
    $a\vv{\beta}b$
\end{document}

enter image description here

Related Question