5

This has me flummoxxed. Here's an MWE:

\documentclass{article}
\usepackage{mathpazo}
\begin{document}

$\omega$

$\mathbf{\omega}$

\end{document}

What should print is the mathpazo omega, and then the bold omega on the next line. Instead I see a ! instead of a bold lowercase omega. I've tried using \mathbf{} on all of the other greek letters and none of their bold variants work, instead I get fl and ff ligatures and other symbols even though I know that there is a bold greek lowercase font in mathpazo.

What is going wrong? I am running MacTeX 2015 for what it is worth.

3
  • 1
    \mathbf can be used only for letters and digits, not for greek symbols. I suppose you want \bm from \usepackage{bm}?
    – yo'
    Commented Oct 16, 2015 at 21:17
  • Although \bm works to solve the problem, that puts a crink into my plan to create a new vector macro \renewcommand{\vec}[1]{\ensuremath{\mathbf{#1}}} since I have the angular velocity vector omega everywhere.
    – SteelAngel
    Commented Oct 16, 2015 at 21:22
  • And what's wrong with bold italic for vectors?!
    – yo'
    Commented Oct 16, 2015 at 22:26

1 Answer 1

6

Assuming that you call \vec with the argument consisting of a single symbol, either a Latin or a Greek letter, the following should do.

Note that this has nothing to do with mathpazo: \mathbf just works for Latin letters (and possibly for uppercase Greek, but not for all math fonts).

\documentclass{article}
\usepackage{mathpazo}
\usepackage{bm}

\renewcommand{\vec}[1]{%
  \if#1\relax\bm{#1}\else\mathbf{#1}\fi
}

\begin{document}

$\omega$

$\vec{x}+\vec{\omega}-\vec{\Gamma}$

\end{document}

enter image description here

Don't use \ensuremath. If you have an isolated vector in text, it is math nonetheless, so type it as $\vec{x}$: it's clearer and not more difficult to input.

5
  • Would it be OK to use always \vec instead of \mathbf?
    – Vicent
    Commented Oct 17, 2017 at 12:20
  • @Vicent That's the idea!
    – egreg
    Commented Oct 17, 2017 at 13:00
  • But then, the new \vec command is not necessary, is it?
    – Vicent
    Commented Oct 17, 2017 at 13:53
  • Sorry!!! In my previous comment, I meant: "Would it be OK to use always \bm instead of \mathbf?
    – Vicent
    Commented Oct 17, 2017 at 13:54
  • 1
    @Vicent It depends on what shape you prefer (or need) for your Latin letters. With \bm they would be in bold math italic.
    – egreg
    Commented Oct 17, 2017 at 14:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .