\vec
but this command works for only single letter vectors but what about multiple character vectors?LaTeX forum ⇒ Math & Science ⇒ Extended Vector Arrow
-
- Posts: 402
- Joined: Fri May 20, 2011 9:41 am
Extended Vector Arrow
How do you put an arrow above a vector as in vector AB or vector ABC? I have used
Extended Vector Arrow
hi (:
Use this.
or the package esvect
greez tommy
Use this.
\documentclass[12pt]{article} \begin{document} $$\overrightarrow{ABC}$$ $$\overrightarrow{ABCDEFG}$$ \end{document}
or the package esvect
greez tommy
- localghost
- Site Moderator
- Posts: 9201
- Joined: Fri Feb 02, 2007 12:06 pm
Extended Vector Arrow
tommytex wrote:[…] Use this.\documentclass[12pt]{article} \begin{document} $$\overrightarrow{ABC}$$ $$\overrightarrow{ABCDEFG}$$ \end{document}
[…]
Never ever use
$$ … $$
for unnumbered equations (look here for the reason).Thorsten
LaTeX Community Moderator
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
Re: Extended Vector Arrow
sorrry thorsten
i hoope i can give a better answer next time
tommy
i hoope i can give a better answer next time
tommy
-
- Posts: 402
- Joined: Fri May 20, 2011 9:41 am
Extended Vector Arrow
the problem with
\overrightarrow
is that the arrow touches the top borders of the letters. Are there packages to customize vector arrows ?
Last edited by cgnieder on Tue Apr 09, 2013 9:44 pm, edited 1 time in total.
Extended Vector Arrow
ghostanime2001 wrote:the problem with\overrightarrow
is that the arrow touches the top borders of the letters.
This depends on the font you're using:
\documentclass[margin=.75cm]{standalone} \usepackage[T1]{fontenc} \usepackage{amsmath} \begin{document} $\overrightarrow{AB}$ \end{document}
\documentclass[margin=.75cm]{standalone} \usepackage[T1]{fontenc} \usepackage{libertine} \usepackage{amsmath} \usepackage[libertine]{newtxmath} \begin{document} $\overrightarrow{AB}$ \end{document}
\documentclass[margin=.75cm]{standalone} \usepackage[T1]{fontenc} \usepackage{amsmath} \usepackage{MnSymbol} \begin{document} $\overrightarrow{AB}$ \end{document}
Regards
site moderator & package author
-
- Posts: 402
- Joined: Fri May 20, 2011 9:41 am
Re: Extended Vector Arrow
can the arrow be moved just a little bit upward ?
Extended Vector Arrow
actually i looked it up and found some nice usage of "esvect" where it works indeed.... using a command called \vv
unfortunately, the page is in german but i think you can get its meaning anyway
see http://www.latex-pfeile.de/ you will have to scroll down a bit
unfortunately, the page is in german but i think you can get its meaning anyway
see http://www.latex-pfeile.de/ you will have to scroll down a bit
- Attachments
-
- a_esvect_vec_vvv.jpg (2.51 KiB) Viewed 79274 times
-
- f_esvect_vec_vvv.jpg (2.52 KiB) Viewed 79274 times
-
- Posts: 402
- Joined: Fri May 20, 2011 9:41 am
Re: Extended Vector Arrow
that's what I wanted to use but if only it can be moved up a little, what is the full command for \vv ? like I know it has to be made up from other commands, so maybe there's a parameter for height and if that could be changed the height of the arrow could also be changed.
Extended Vector Arrow
ghostanime2001 wrote:what is the full command for\vv
?
That actually doesn't tell you much, except that it has a starred variant:
\def\vv{\@ifstar{\vvstar}{\vecteur}}
\vvstar
calls itself \vecteur
which in turn calls ... The code of esvect.sty
is only 32 lines long, you could look it up yourself.ghostanime2001 wrote:maybe there's a parameter for height and if that could be changed the height of the arrow could also be changed.
The macro that actually places the arrow over the letters is the following:
\def\overvect@#1#2#3{\vbox{\ialign{##\crcr% \noalign{\kern-.7pt\nointerlineskip}#1#2\crcr% \noalign{\kern-.3pt\nointerlineskip}$\m@th\hfil#2#3\hfil$\crcr}}}
It actually moves the arrow closer to the letters by
-.3pt
. Changing this value shifts the arrow vertically, so you can play until you find something you like:\documentclass[margin=5pt]{standalone} \usepackage{esvect} \begin{document} % original: $\vv{AB}$ % changed definition: \makeatletter \def\overvect@#1#2#3{\vbox{\ialign{##\crcr% \noalign{\kern-.7pt\nointerlineskip}#1#2\crcr% \noalign{\kern3pt\nointerlineskip}$\m@th\hfil#2#3\hfil$\crcr}}} \makeatother $\vv{AB}$ \end{document}
Regards
site moderator & package author
Who is online
Users browsing this forum: No registered users and 6 guests