I came across a German LaTeX page and found instructions like:
\Large{bit bigger}
{\Large a bit bigger}
\begin{Large} ... \end{Large}
Is it true that all three are "correct"? I only remember the second one being correct for 1) \Large
and others don't take an argument and perhaps I forgot about 3). Can somebody enlighten me?
Best Answer
You are indeed correct. The
\Large
command and its ilk change the font size for everything following them up until the end of the group, just like\color{red}
. This means that\Large{bit bigger}
will appear to work in certain cases, since it's parsed as two things: first, the command\Large
, and second, the group{bit bigger}
. The difference—and the reason that #1 is incorrect—is easy to see: compareand
The former renders as
The latter, however, renders as
This is a useful property of
\Large
and its friends; for instance, to get a list in a larger font size, one can write simplyNow, as for the third usage, it's true that
\begin{Large}
and\end{Large}
will work, even though\Large
is not defined as an environment. To see why this works, consider the\begin
and\end
commands. What\begin
does is expand to some boilerplate (for error checking and the like), then\csname#1\endcsname
, and then\begingroup
. Conversely, aside from the boilerplate,\end
expands to\csname end#1\endcsname
, and then\endgroup
. Writing\csname foo\endcsname
is almost exactly like writing\foo
, except with one important difference: if\foo
is undefined, it's\let
to\relax
(the command which does nothing). This means that when you write\begin{Large} Some text here \end{Large}
, this is roughly equivalent to\begingroup\Large some text here \relax\endgroup
. Thus, even though\endLarge
isn't defined, the environment functions just as well. Note that this ability to use switches as environments is apparently documented in Leslie Lamport's book, although I've never had the chance to read it myself; Philipp's answer clarifies the pitfalls of using switches as environments.