Why does \textbf fail to bold Greek letters in LaTeX?

  • Topic: LaTeX 
  • Thread starter Thread starter member 428835
  • Start date Start date
  • Tags Tags
    Latex
Join the discussion
Registration is free. Start your own thread to ask a follow-up.
4 replies · 9K views
member 428835
hi pf!

can someone help me bold in latex. for some reason if i use \textbf{pi} if get ##\textbf {pi}## but if i use \textbf {\pi} i do not get a bold ##\pi## but only an error. i have also tried \bfseries and no luck.

please help! thanks!
 
Physics news on Phys.org
\pi only works in math node, e.g. $\pi$. \textbf only works in text mode (as you might guess from the name).

But "standard" LaTeX doesn't have bold lower case Greek letters anyway, so you have to do something like

Code:
\usepackage{bm}
...
$\bm{\pi}$
or if you are using the AMS math package,
Code:
\usepackage{amsbsy}
...
$\boldsymbol{\pi}$
 
  • Like
Likes   Reactions: member 428835
AlephZero said:
But "standard" LaTeX doesn't have bold lower case Greek letters anyway
That's actually incorrect. All math symbols can be set in bold in LaTeX, but in very contrived way. You have to activate \boldmath, but then all math will be typeset in bold! The way around that is something like
Code:
\mbox{\boldmath $\pi$}
such that the \boldmath will only affect equations inside the mbox. If you want just one bold symbol in an equation, you have to use the awful construct
Code:
$2 \alpha \mbox{\boldmath $\beta$}$
LaTeX being so well thought out from a typographical point of view, I don't know why they messed up with bold.

Anyway, the conclusion is that it is better to use the additional packages you suggested.
 
DrClaude said:
That's actually incorrect.

After a bit of research, I agree with you. There are plenty of statements on (usually reputable) websites that \boldmath is "part of plain TeX". But it's not in the index of Knuth's TeXBook, and those statements seem to be wrong.

It is defined in the "base" TeX code of LaTeX. It's not quite obvious how it's defined but it looks like it redefines all the math font names to bold versions. That may not work with all math fonts, or with newer versions of TeX that handle fonts in a completely different way (e.g. direct access to Unicode and/or the internals of Open Type fonts).

And as you say, \boldmath is not nice to use, if you want to mix bold and non-bold characters in the same math formula.

LaTeX being so well thought out from a typographical point of view
It was very well thought out, and forward looking, when it was first released. But that was 36 years ago. With hindsight, too many implementation-specific details were hard-wired into it - like the fact that it was designed to run on 16-bit computer hardware, not 64-bit.
 
Last edited: