\vec
but this command works for only single letter vectors but what about multiple character vectors?Math & Science ⇒ Extended Vector Arrow
-
- Posts: 402
- Joined: Fri May 20, 2011 9:41 am
Extended Vector Arrow
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
Extended Vector Arrow
Use this.
Code: Select all
\documentclass[12pt]{article}
\begin{document}
$$\overrightarrow{ABC}$$
$$\overrightarrow{ABCDEFG}$$
\end{document}
greez tommy

- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Extended Vector Arrow
Never ever usetommytex wrote:[…] Use this.[…]Code: Select all
\documentclass[12pt]{article} \begin{document} $$\overrightarrow{ABC}$$ $$\overrightarrow{ABCDEFG}$$ \end{document}
$$ … $$
for unnumbered equations (look here for the reason).Thorsten
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Extended Vector Arrow

i hoope i can give a better answer next time

tommy
-
- Posts: 402
- Joined: Fri May 20, 2011 9:41 am
Extended Vector Arrow
\overrightarrow
is that the arrow touches the top borders of the letters. Are there packages to customize vector arrows ?Extended Vector Arrow
This depends on the font you're using:ghostanime2001 wrote:the problem with\overrightarrow
is that the arrow touches the top borders of the letters.
Code: Select all
\documentclass[margin=.75cm]{standalone}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\begin{document}
$\overrightarrow{AB}$
\end{document}
Code: Select all
\documentclass[margin=.75cm]{standalone}
\usepackage[T1]{fontenc}
\usepackage{libertine}
\usepackage{amsmath}
\usepackage[libertine]{newtxmath}
\begin{document}
$\overrightarrow{AB}$
\end{document}
Code: Select all
\documentclass[margin=.75cm]{standalone}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{MnSymbol}
\begin{document}
$\overrightarrow{AB}$
\end{document}
-
- Posts: 402
- Joined: Fri May 20, 2011 9:41 am
Re: Extended Vector Arrow
Extended Vector Arrow
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 90573 times
-
- f_esvect_vec_vvv.jpg (2.52 KiB) Viewed 90573 times
-
- Posts: 402
- Joined: Fri May 20, 2011 9:41 am
Re: Extended Vector Arrow
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:
Code: Select all
\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.The macro that actually places the arrow over the letters is the following:ghostanime2001 wrote:maybe there's a parameter for height and if that could be changed the height of the arrow could also be changed.
Code: Select all
\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}}}
-.3pt
. Changing this value shifts the arrow vertically, so you can play until you find something you like:Code: Select all
\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}