\bf or \textbf 

> All the books I read (quite limited though :->) use \textbf for
> bolding, but I also see people use \bf. So can somebody shed some
> light on this topic? like where \bf is defined?, are they
> interchangeable?, etc.

\bf was borrowed from plain TeX and is now obsolete in LaTeX2e and should not be used.

is very long, in which case {bfseries stuff} is better because TeX won't fill up your memory looking for the } of the argument.

Peter

\bf or \textbf 

\textbf (or \bfseries) is the right way to select bold in LaTeX2e (see fntguide.dvi for more information on fonts). As for the differences, try

\textbf{\textit{test}}

vs.

\bf{\it{test}}

Stefan Ulrich

\bf or \textbf 

> \bf was borrowed from plain TeX and is now obsolete in
> LaTeX2e and should not be used.

The reasons behind this are to do with the NFSS (New Font[1] Selection Scheme) which gets round problems that \bf had. \bfseries and \textbf{} work more smoothly - they actually switch you to the bold version of the current fount, which is what the average user usually wants. \bf doesn't. I can't remember exactly what it does (and Lamport's 1st edition LaTeX book appears to not provide the details), but I do recall it being a pain in the bum.

> The recommended syntax is \textbf{stuff} unless the stuff
> is very long, in which case {\bfseries stuff} is better
> because TeX won't fill up your memory looking for the }
> of the argument.

More or less. {bfseries …} also works a bit more quickly and therefore has two reasons to be preferred by class and package writers who don't have to ensure that their class and package files are easily comprehensible (and in the case of the LaTeX team itself, seem to delight in writing the most incomprehensible code possible - or maybe I'm just stupid. Or maybe both).

In Lamport's 1st edition LaTeX book, the recommended procedure is to not use such commands at all in body text, but to define commands that describe structural information and use the type style commands inside them. For example, the \url{} command provided by the url package switches to \ttfamily by default when typesetting a url.

I often define commands describing structure that do nothing but select a different type style. Something like:

\newcommand{\realperson}[1]{{\textbf #1}}
\newcommand{\fictionalperson}[1]{{\textit #1}}

It has the advantage that I can leave thinking about *which* type style is the most appropriate for *that* document element until after I've written the bloody thing and seen how it looks on paper. On top of that, when I come back to the document years later and want to re-use text, I can change type style to match whatever I want to use the text for with a single easy-to-apply change for each logical element rather than having to read the entire document, figure out what the hell I was on at the time, and then manually change each instance of type styling to suit the new document.

I've written package documentation that uses similar commands for elements like documentclass name, package name, file name, and so on. Many of these elements end up being typeset identically - but if I ever change my mind, I can change the style of a single kind of element with a single change and almost no effort.

Rowland.