Does it matter if I use \textit or \it, \bfseries or \bf, etc

From l2tabu:

Why not use obsolete commands? Obsolete commands do not support LaTeX2e's new font selection scheme, or NFSS. {\bf foo}, for example, resets all font attributes which had been set earlier before it prints foo in bold face. This is why you cannot simply define a bold-italics style by {\it \bf Test} only. (This definition will produce: Test.) On the other hand, the new commands \textbf{\textit{Test}} will behave as expected producing: Test.

Apart from that, with the former commands there is no ‘italic correction’, cf. for instance halfhearted ({\it half}hearted) to halfhearted (\textit{half}hearted).

enter image description here


Hmm, I just posted this as an answer to another question, but just as I was posting, that question was closed—with a referral here. So I'll throw in my 2¢ here...

The reason I don't like \it and \bf is that they do not play well together. That is, they do not nest as one would intuitively expect:

Whereas \textit and \textbf do play well together:

This is nice. However, you may notice that it still fails to handle nested style adjustments to small caps, since the Computer Modern fonts do not contain slanted or bold small caps:

If this is a problem for you, then what I recommend—and I just happened to learn about this yesterday myself—is the wonderful slantsc package in combination with the lmodern package. slantsc provides, among other things, \rmfamily (roman), \ttfamily (typewriter/​teletype), \sffamily (sans-serif), \bfseries (boldface), \itshape (italics), \slshape (slant/​oblique), and \scshape (small caps). With these, small caps can obtained in slanted form:

As a bonus, slantsc fixes \textsl to behave properly with \textsc, so you can continue using those if you like.

Alas, I haven't yet found a package which fixes the behavior of nested instances of \textit. In typesetting, when you nest italics, you're supposed to come back out of italics to roman. For example, the word "Titanic" below is in nested italics:

Tanaka, Shelly. On Board the Titanic: What It Was Like When the Great Liner Sank. New York, NY: Hyperion/​Madison Press, 1998.

As a workaround, you can usually write \textrm to temporarily return to non-italics in those cases, but of course this is only valid if you know the exact number of nested italic levels, which may not always be the case, especially inside a macro.

Update:

As others have pointed out, \textit and \textsl do automatic italic correction, whereas \it, \itshape, \sl, and \slshape do not. Thus, you can write \textit{stuff}, but you must write {\it stuff\/} or {\itshape stuff\/} to get the same effect.


The \it syntax is inherited from LaTeX 2.09, and is regarded as supported 'for historical reasons only' in LaTeX2e. For bold, you should go for \textbf rather than \bf. For italic, you'd usually use \emph rather than \textit as it's semantic mark up and as it handles the italic correction automatically.