Is it possible to use the (stealth) type arrow in the \vec command?

In the tikz environment I use something like (\draw[>=stealth,->] (A) -- (B);) to change the arrow. I want to use this same typo of arrow outside the tikz environment, for example when I use the vector command \vec{v}. Is it possible?


Using the esvect package you may just get to what you need !

Try options [d] or [b] when loading the package. Use command \vv{arg} to obtain the arrowed symbols.

|improve this answer|||||
  • Or even [e] is close. – Bernard Oct 5 '17 at 1:13
  • I did not put it because it looked a bit shrinked, but you're right – BambOo Oct 5 '17 at 1:40

I'm afraid not. But you can use the esvect package, which has nice arrows tips (8 kinds in all). Furthermore these arrows are extensible, and called with the command \vv. If your vector, say e_r, has an index, use \vv*{e}{r}.

|improve this answer|||||

You can try manually like this:

\def\tikzmark#1{\begin{tikzpicture}[remember picture]\node(#1){};\end{tikzpicture}}

\renewcommand\vec[1]{\ifdefined\xsh\relax\else\pgfmathsetmacro\xs{\f@size/3}\def\xsh{\xs pt}\fi\ifdefined\ysh\relax\else\pgfmathsetmacro\ys{\f@size/1.3}\xdef\ysh{\ys pt}\fi\tikzmark{VecStart}#1\tikzmark{VecStop}\begin{tikzpicture}[remember picture,overlay]\draw[->,>=stealth]($(VecStart)+(\xsh,\ysh)$)--($(VecStop)+(-\xsh,\ysh)$);\end{tikzpicture}\let\xsh=\undefined\let\ysh=\undefined}




It is not very easy in usage. You have to define \xsh and \ysh every time before use if you want to control the placing of the arrow.

It is just an idea not really worked as it could and I just adding for plurality.


enter image description here

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.