[latexrefman] Font styles & sizes as environments
Karl Berry
karl at freefriends.org
Mon Jun 8 00:50:12 CEST 2020
Hi Denis,
"Environments like \begin{small} are never defined, only the commands
are provided."
Sure, but use of \begin{small}...\end{small} has been widespread since
the beginning. Yes, the envs are only defined because of the way LaTeX
defines \begin and \end, but that cannot change at this late date.
For those reasons, I suggest to drop the mentions of environments
"equivalents" to declaration commands.
The purpose of a reference manual is to describe defined
features, not prescribe behavior. So it shouldn't be removed.
I realize that, as stated by muzimuzhi, because of the \begin and \end
definitions, nearly every command can technically be construed as having
an environment form. But the env form is typically useless; the reason
for mentioning it in the font change is because those env constructs are
actually known and used. I agree they are error-prone.
Or, if not, to warn the user about the possibility of spurious spaces.
Agreed. I added a few words of warning about all this. --thanks, karl.
--- latex2e.texi (revision 810)
+++ latex2e.texi (working copy)
@@ -2274,14 +2277,27 @@
@end example
@noindent
-The scope of the @code{\small} lasts until the end of the
- at code{quotation} environment. It would also end at the next type style
-command or the end of the current group, so you could enclose it in
-extra curly braces @code{@{\small We are here, we are here, we are
-here!@}}. You can instead use the environment form of these commands;
-for instance, @code{\begin@{tiny@}...\end@{tiny@}}.
+Here, the scope of the @code{\small} lasts until the end of the
+ at code{quotation} environment. It would also end at the next type
+style command or the end of the current group, so you could enclose it
+in curly braces @code{@{\small This text is typeset in the small font.@}}.
+ at cindex environment form of commands
+An environment form of each of these commands is also defined; for
+instance, @code{\begin@{tiny@}...\end@{tiny@}}. However, in practice
+this form can easily lead to unwanted spaces at the beginning and/or
+end of the environment without careful consideration, so it's
+generally less error-prone to stick to the declaration form.
+(Aside: Technically, due to the way @LaTeX{} defines @code{\begin} and
+ at code{\end}, nearly every command that does not take an argument
+technically has an environment form. But in almost all cases, it would
+only cause confusion to use it. The reason for mentioning the
+environment form of the font size declarations specifically is that
+this particular use turns out to be rather common, despite its
+problems.)
More information about the latexrefman
mailing list.