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?

  • 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 – user31729 Jul 13 '14 at 14:43
  • Related: tex.stackexchange.com/questions/15361/… – egreg Jul 13 '14 at 14:46
  • Oh, I forgot: Welcome to TeX.SX – user31729 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 – user31729 Jul 13 '14 at 14:49
4

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.