The question arose eversince I learnt about \textbf{} and I couldn't quite spot any differences against \bf.
Asked
Active
Viewed 75 times
1 Answers
5
\bf has not been defined by default since LaTeX2e was introduced in 1993. Some classes may define it for compatibility with old documents but that can not be assumed.
\documentclass{minimal}
\begin{document}
this \textbf{that}
\end{document}
But
\documentclass{minimal}
\begin{document}
this {\bf that}
\end{document}
produces the error
! Undefined control sequence.
l.5 this {\bf
that}
?
Even when it is defined, the behaviour is not the same as \textbf as it ignores the current font settings:
Note that that is not italic here, but \textbf gives bold italic in an italic context.
\documentclass{article}
\begin{document}
\itshape
this {\bf that} \textbf{the other}
\end{document}
David Carlisle
- 757,742


\bfis more akin to\bfseriesthan\textbf. But there are good reasons to stick with the latter constructs, as many will point out. – Steven B. Segletes Oct 02 '21 at 13:44\bfis not defined by default in latex and has not been since 1993, so unless you are using a very old format it is best to stick to the standard commands. – David Carlisle Oct 02 '21 at 13:51\bf. – The Amplitwist Oct 02 '21 at 13:51