Math & Science ⇒ Alignment of Vector Arrow
Alignment of Vector Arrow
I am newbie in LaTeX and use Lyx.
A prepare a book and use KOMA-Script as document class. The font is default (as I guess, it is Latin Modern Roman).
In the math mode all letters are italic - it is no problem.
But, the symbol "vector arrow" over the letter (\vec command) is also italic, and it looks bad because sometimes, when I write for example $\psi(\vec r)$, the arrow overlaps right bracket. When I switch the font to Times Roman the arrow is on the good place but I do not like this font.
I am looking for problem decision and have found only this topic http://www.latex-community.org/forum/vi ... =46&t=4389, there the next command is proposed: $\vec{\mskip\thinmuskip 1}$, but it is bad because of extra space before letter.
Please, give me some advices how to fix a problem.
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Alignment of Vector Arrow
Code: Select all
\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage[b]{esvect}
\begin{document}
\[
\Psi(\vv{r})
\]
\end{document}
Disclaimer:
Since I'm not a LyX user, the above suggestions only represent an idea. I can't neither help with LyX in general nor with including packages into LyX nor with doing additional settings.
Best regards and welcome to the board
Thorsten
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Alignment of Vector Arrow
I have tried esvect package and vectors from it look really better than standard. But unfortunately the arrow is too long, it looks like \overrightarrow command (may be I am too fastidious?

And I did not find in manual how to change arrow length.
I will try to see into the code, may be I can change it for my needs =)
Re: Alignment of Vector Arrow
the line $\m@th\mkern2mu\relax#4#1\mkern-1.5mu is replaced by this one:
$\m@th\mkern3mu\relax#4#1\mkern-5.5mu
I do not know what it means but now arrow looks almost as I wanted

Alignment of Vector Arrow
Notice that the vector arrow is short (unlike for esvect), is not italicized (unlike for the default Computer Modern), and does not touch the parentheses (unlike for the Times-ish txfonts). I just think that the Fourier fonts are much better designed than most math fonts for LaTeX, which is why I switched to using fouriernc.
Re: Alignment of Vector Arrow
Arrows from Fourier Font really look excellent (although some letters, for example \psi, are more sophisticated in Latin Modern than in Fourier, for me
