15

$\vec{0}$ and $\overrightarrow{0}$ generate the following:

pdf output

pdf output

The first arrow is decentered (it assumes an italic font), the second one is clearly too large. How to get an upright version of \vec?

0

2 Answers 2

18

The esvect package provides nice vector arrows in most cases: The command is \vv (not \vec) and it provides a centered, non-slanted (better 'upright') arrow, which is shorter than the arrow given by \overrightarrow.

\documentclass{article}
\usepackage{mathtools}
\usepackage{esvect}


\begin{document}
\begin{tabular}{ll}
esvect:   & $\vv{0}$ \\
amsmath:  & $\overrightarrow{0}$ \\
standard: & $\vec{0}$ 
\end{tabular}

\end{document}

enter image description here

From Bernard's comment: esvect defines 8 different arrow (head) types, which can be chosen by \usepackage[a]{esvect} to \usepackage[h]{esvect}. Omitting the optional argument will use the (default) d variant

6
  • 1
    And here I was expecting one of your amazing macros! Nah, just kidding. Easiest answer = best answer.
    – 1010011010
    Sep 6, 2015 at 10:22
  • @1010011010: My amazing macros? ;-) Thanks anyway!
    – user31729
    Sep 6, 2015 at 10:25
  • @Christian Hupfer: You might add esvect defines $8$ different arrow tips.
    – Bernard
    Sep 6, 2015 at 11:20
  • @Bernard: Good suggestion! I'll do immediately.
    – user31729
    Sep 6, 2015 at 11:24
  • i think \overrightarrow isn't the right answer in any event. what is really needed is an arrow with an "upright" (e.g. "not italic") arrowhead. something to think about. Sep 6, 2015 at 13:02
3

May be for this particular case have \0 defined

\newcommand\0{\kern-1.2pt\vec{\kern1.2pt 0}}

In that case whatever definition you choose, you can change it at the end if there's a more practical way.

2
  • \0 looks strange, but seems to work (+1)
    – user31729
    Sep 6, 2015 at 16:15
  • Apart from proposing this particular definition to remove the displacement of the arrow, what I meant is that if one defines \0 and then uses it along the document, at the end he can choose wether he prefers \vv{0} or any other definition.
    – Manuel
    Sep 6, 2015 at 16:49

You must log in to answer this question.

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