[Tex/LaTex] Italic/slanted math font and kerning

italic-correctionkerningmath-modesubscripts

I'd like to write a macro for typesetting slanted letters in bold for highlighting vectors. I've used this implemenation:

\newcommand\vect[1]{\text{\bfseries\sffamily\slshape#1\/}}

But I've run into problems with kerning — when I want subscripted vector (like \vect{F}_g), the italic correction (\/) causes there's to wide space but when I omit \/, the space between vector and | is too narrow.

It's the same when I tried it with \mathit macro. So I wonder whether there is any possibility how to handle this in general (not to have \/ written after each vector without subscript.

Best Answer

Your default sans serif font family should have a boldface slanted variant (this is the case with Latin Modern)

\usepackage{lmodern}
\DeclareMathAlphabet{\vect}{OT1}{\sfdefault}{bx}{sl}

Now $\vect{F}_{g}$ will not suffer from the problem.

It's not necessary to use Latin Modern fonts throughout; if you use the standard Computer Modern fonts, the declaration

\DeclareMathAlphabet{\vect}{OT1}{lmss}{bx}{sl}

will do.