Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
add comment

2 Answers

up vote 3 down vote accepted

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.

share|improve this answer
add comment

I don't know whether you did this because you like to tinker with (La)TeX and wanted a challege, and maybe my answer is marginal, but for completeness I guess I should mention it. There are packages to do exactly this: italic boldface math fonts to denote vectors the ISO way: bm, isomath or maybemath. The documentation and a peek at the code should give insight into how kerning (and other stuff) has been handled.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.