[Tex/LaTex] Faster way of writing \mathbf

boldmath-mode

Is there a quicker way of doing boldface in math mode instead of typing out \mathbf{} each time? (It gets cumbersome when you denote simple vectors with boldface…)

Best Answer

There's a really cheesy way of saving keystrokes that is no longer than Todd's answer but just as comprehensive as Yiannis's:

\documentclass{article}

\def\*#1{\mathbf{#1}}

\def\ab{ab}
\begin{document}
 $\*v, \*w, \*\ab, \*\Gamma$.
\end{document}

Explanation: a control sequence whose name is a non-letter doesn't require either spaces or braces after it (unless of course you want it to act on multiple tokens, like plain ab; a macro such as my \ab will work just fine, though).