Hello!
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.
Math & Science ⇒ Alignment of Vector Arrow
Alignment of Vector Arrow
Last edited by Sahas on Mon Sep 05, 2011 8:07 pm, edited 1 time in total.
NEW: TikZ book now 40% off at Amazon.com for a short time.

- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Alignment of Vector Arrow
In LaTeX I would include the esvect package. It provides some nicer looking vector arrows and in comparison to vanilla LaTeX places the arrow a little bit better.
For details refer to the package manual.
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
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
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Alignment of Vector Arrow
Thank you for answer!
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 =)
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
So, I have found file esvect.sty and change the command \newcommand{\vecteur}:
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
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
Another possibility is to use the fouriernc package, which makes $\psi(\vec r)$ look like this:
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.
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
Thank you for reply!
Arrows from Fourier Font really look excellent (although some letters, for example \psi, are more sophisticated in Latin Modern than in Fourier, for me
Arrows from Fourier Font really look excellent (although some letters, for example \psi, are more sophisticated in Latin Modern than in Fourier, for me
