TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Then I write


which yields an error:

! Undefined control sequence.
\vec #1->\mathbm 
l.564 \[\vec{a}
share|improve this question
up vote 6 down vote accepted

If you're interested in printing boldface mathematics, use \mathbf{...} instead:


Alternatively, you need to use

\usepackage{bm}% http://ctan.org/pkg/bm
\renewcommand{\vec}[1]{\bm{#1}}% Bold math

This shows the difference:

Difference between bm and mathbf

share|improve this answer
Thanks~ very useful – dementrock Aug 22 '11 at 19:17

Your Answer


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.