2

What is the difference between math font \xx{} and \mathxx{} where xx=rm, bf, cal?

When I use them it seems that the \xx{} formats all the words after it.

But \mathxx{} formats only what is between brackets {}.

Is this correct?

Chiba
  • 449
  • What you noted is the cause why \bf, \rm etc. should not be used any longer, but rather \textbf{}, \textrm{} etc. and this will also distinguish them clearly from \mathbf{} etc. as well as text to \math mode, so the answer is yes, it is correct –  Jul 13 '14 at 14:43
  • Related: http://tex.stackexchange.com/questions/15361/will-two-letter-font-style-commands-bf-it-ever-be-resurrected-in-latex – egreg Jul 13 '14 at 14:46
  • Oh, I forgot: Welcome to TeX.SX –  Jul 13 '14 at 14:46
  • Newer versions of the KOMA classes explicitly shipout warnings if the code encounters \bf etc. command, this as tiny remark –  Jul 13 '14 at 14:49

1 Answers1

5

Commands like \bf are obsolete in LaTeX. See, e.g., Always \textrm, never \rm? A counterexample?. Moreover, the proper usage is {\bf your text}, because it is a global switch. In math mode you can use \mathxx or also \textxx. In particular, in the former spaces are omitted, in the latter they behave like in normal text.