[Tex/LaTex] Bold math: Automatic choice between \mathbf and \boldsymbol for Latin and Greek symbols

boldfontsmath-modesymbols

This is a follow-up to this question.

Suppose you want to denote vectors by upright bold letters; then \mathbf{u} works fine, except that if it's a Greek letter you have to use \boldsymbol{\omega} instead.

Question: Is it possible to define a generic vector command in LaTeX which automatically chooses between \mathbf and \boldsymbol, so that one can write just \vect{u} and \vect{\omega} without having to treat the Greek symbols specially by hand?

(Just to be clear: \newcommand{\vect}[1]{\boldsymbol{#1}} is no good in this situation, since \boldsymbol{u} gives bold italic instead of roman.)

Best Answer

You can use both commands together and define something like

\usepackage{bm}
\newcommand{\vect}[1]{\boldsymbol{\mathbf{#1}}}

which should work for most cases.

Related Question