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.
\renewcommand{\vec}[1]{\mathbm{#1}}

Then I write

\[\vec{a}\]

which yields an error:

! Undefined control sequence.
\vec #1->\mathbm 
                 {#1}
l.564 \[\vec{a}
               \]
? 
share|improve this question
add comment

1 Answer

up vote 6 down vote accepted

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

\renewcommand{\vec}[1]{\mathbf{#1}}%

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
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.