Is there a modern modal version of the math font commands?

In modern LaTeX, the use of old font-commands like \rm is quite strongly discouraged, with the commands being removed from the Kernel, and therefore unavailable in modern versions of some document classes (the KOMA-script classes in particular).

However, I always found them quite useful to make editing easier, as I find reading and writing

\int_{\rm BZ} \chi^{\rm(2D)} 

much easier than

\int_{\mathrm{BZ}} \chi^{\mathrm{(2D)}}

primarily due to the smaller level of brace-nesting.

In text-mode, there are modal commands like \bfseries¹, but these commands are forbidden in math-mode.

It is easy enough to reenable the font commands if needed (e.g. for compiling an old document) with \DeclareOldFontCommand, but is there some modern replacement?

Note: I am primarily looking for comands that are supported without custom definitions or special packages, as

  • Journals may require that submitted documents use no packages beyond the template, and don't include user-defined macros.
  • Custom commands make copy/paste of text and equations across documents difficult.

¹ Leaving other issues with using the modal commands asigde, in text-mode unlike math-mode, the word meant to be emphasized is rarely already in braces, so Hello {\bfseries World} provides no real advantage over Hello \textbf{World}, in the manner a^{\rm stuff} does compared to a^{\rm stuff} in math-mode.

  • There is nothing in the kernel so you will have to add a custom definition. I don't see any reason why you shouldn't use \DeclareOldFontCommand if your class doesn't provide them (btw: they are still in the KOMA classes only hidden). – Ulrike Fischer Nov 3 '17 at 12:38

Your Answer

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

Browse other questions tagged or ask your own question.