[Tex/LaTex] Why are text format commands used inside braces

bracesfontsizeformattingsyntax

Most commands in Latex are written with the arguments inside braces following the command: \command{arguments}. But text formatting options, like \em, or \scriptsize are usually written inside the braces, like {\em some italicised text}. Why is this? What makes these commands different? I'm particularly asking because it seems to make standardisation – of which LaTeX really appears badly in need – more difficult.

Best Answer

There is a standard. It's a matter of opinion whether it's sensible or not, but it's been there since the release of LaTeX2e.

  1. Font aspect changing commands have two forms: action and declaration

  2. The same holds for abstract instruction such as "emphasize"

  3. Size changing commands have only the declarative form.

Let me review the three points.

Font aspect changing commands

The declarative form for changing the font's aspect is formed from a prefix denoting briefly the purpose and by a suffix denoting the attribute that's changed:

\sffamily
\itshape
\bfseries

The "action form" is a command that takes an argument; all kernel defined commands of this type have a prefix text and a suffix corresponding to the similar declaration:

\textsf{words}
\textit{words}
\textbf{words}

The fundamental difference is that a declaration's scope is up to the end of the group in which it's issued (or a countermanding declaration).

Two important commands are \textnormal (action) and \normalfont (declaration) that instruct LaTeX to use the font which was current at document start.

Abstract instruction

By "abstract instruction" I mean \emph and \em, which usually act by italicizing, but one should not rely on this, as the effect can be redefined by the document class.

The form \emph is the action: \emph{words}, while \em is a declaration. The latter can be useful in defining environments.

Size changing commands

The size changing commands have only the declarative form, as very rarely one needs to set a couple of words in a smaller or larger size. Examples

\footnotesize
\small
\normalsize
\large

Their scope ends with the group where they have been issued (usually an environment). If a paragraph must be typeset in a different size it's important to remember marking explicitly the end with \par or a blank line. Commonly it's the environment where they are issued that takes care of it.