10

The standard LaTeX vector looks fine over the lowercase arguments, but too short over the uppercase and multi-letter arguments:

\documentclass{article}
\begin{document}
    \begin{math}
    \\
    \vec{v}\\
    \vec{V}\\
    \vec{AC}\\
    \vec{ABCD}
    \end{math}
\end{document}

enter image description here

Is there any way to make it longer, depending on the argument used?

I'd love it to stretch from above the vertex of A to above the serif of C in the last example (but nothing as drastic as \overrightarrow{A_1C_2}.

ajeh
  • 2,572

2 Answers2

10

The esvect package has very nice vector arrows, with 8 different arrow tips:

\documentclass{article}
\usepackage{array}%
\usepackage{esvect}

\begin{document}

\[ \begin{array}{ll}
        \vec{v}&  \vv{v}  \\
    \vec{V} &  \vv{V}\\
    \vec{AC} &   \vv{AB}\\
    \vec{ABCD} &  \vv{ABCD}
    \end{array} \]
\end{document}

enter image description here

Au101
  • 10,278
Bernard
  • 271,350
  • But aren't those arrows just a bit too excessive? Overbearing? – ajeh Sep 27 '16 at 16:37
  • 2
    I don't think so, but if you finf it's a little too long on the left side, say, you can write a macro such as, say: \newcommand\myvv[1]{\mkern1.5mu\vv{\mkern-1.5mu#1}}. – Bernard Sep 27 '16 at 17:06
1

I really like the esvect package. If you read the documentation (https://www.ctan.org/pkg/esvect), it tells you that you can select the type of arrow that you want. The default option is

\usepackage[d]{esvect}

Although you don't need to add the "d". If you select option "h", then the arrow looks a little more like the one used in \vec.

G. Khanna
  • 508