summaryrefslogtreecommitdiff
path: root/info/latex2e-help-texinfo/latex2e.texi
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2022-01-27 03:00:41 +0000
committerNorbert Preining <norbert@preining.info>2022-01-27 03:00:41 +0000
commitb5deca5ab245af14ca010a3e61225189e9c860f9 (patch)
tree50f4cfc4a516024350a41166589f283a0d0c1871 /info/latex2e-help-texinfo/latex2e.texi
parentd36626add433e216b29d959884d3593baa216866 (diff)
CTAN sync 202201270300
Diffstat (limited to 'info/latex2e-help-texinfo/latex2e.texi')
-rw-r--r--info/latex2e-help-texinfo/latex2e.texi2176
1 files changed, 1373 insertions, 803 deletions
diff --git a/info/latex2e-help-texinfo/latex2e.texi b/info/latex2e-help-texinfo/latex2e.texi
index aec0978aa8..50a0d91903 100644
--- a/info/latex2e-help-texinfo/latex2e.texi
+++ b/info/latex2e-help-texinfo/latex2e.texi
@@ -1,8 +1,8 @@
\input texinfo
-@c $Id: latex2e.texi 935 2021-07-23 17:48:15Z jimhefferon $
+@c $Id: latex2e.texi 1079 2022-01-26 18:15:20Z karl $
@comment %**start of header (This is for running Texinfo on a region.)
@setfilename latex2e.info
-@set UPDATED July 2021
+@set UPDATED January 2022
@include common.texi
@settitle @LaTeX{}2e unofficial reference manual (@value{UPDATED})
@comment %**end of header (This is for running Texinfo on a region.)
@@ -25,7 +25,8 @@
@c xx JH expand theorem, AMS math
@c xx JH something on code listings
@c xx JH ligatures
-@c xx JH \caption
+@c
+@c xx \NewCommandCopy et al. (Brian Dunn, 21 Dec 2021 06:50:17).
@c
@c xx The typeset source2e has an index with all kernel
@c xx commands, though some are internal and shouldn't be included.
@@ -53,7 +54,7 @@ latex2e-reference by Martin Herbert Dietze. (From these references no
text was directly copied.)
Copyright 2007, 2008, 2009, 2010, 2011, 2012, 2013,
-2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Karl Berry.@*
+2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022 Karl Berry.@*
Copyright 1988, 1994, 2007 Stephen Gilmore.@*
Copyright 1994, 1995, 1996 Torsten Martinsen.
@@ -101,8 +102,10 @@ href='https://ctan.org/topic/tut-latex'>this list</a>.</p>
<p>This manual has two versions. One has <a
href="https://latexref.xyz/">separate web pages for each section or
subsection</a>. It's also available as a <a
-href="https://latexref.xyz/dev/latex2e.html">single web page</a> and
-as a <a href="https://latexref.xyz/dev/latex2e.pdf">pdf</a>.</p>
+href="https://latexref.xyz/dev/latex2e.html">single web page</a> and as
+a <a href="https://latexref.xyz/dev/latex2e.pdf">pdf</a>. Note that
+there is also a separately-maintained <a
+href="https://latexref.xyz/fr/">French edition</a>.</p>
<p> This document is not official. It has not been reviewed by the
LaTeX maintainers. Our goal is to cover all (non-private) LaTeX
@@ -131,6 +134,11 @@ as well as
@c Best Effort Symbol
@iftex
+@macro visiblespace
+@tex%
+{@tt@char`@ }%
+@end tex@c
+@end macro
@macro BES {utf8,math}
@math{\math\}
@end macro
@@ -139,6 +147,9 @@ as well as
@end macro
@end iftex
@ifnottex
+@macro visiblespace
+@w{ }
+@end macro
@macro BES {utf8,math}
@U{\utf8\}
@end macro
@@ -158,7 +169,7 @@ as well as
@end macro
@set NotInPlainTeX Not available in plain @TeX{}.
-@set NeedsAMSSymb @value{NotInPlainTeX} In @LaTeX{} you need to load the @file{amssymb} package.
+@set NeedsAMSSymb @value{NotInPlainTeX} In @LaTeX{} you need to load the @package{amssymb} package.
@set NeedsSTIX @value{NotInPlainTeX} In @LaTeX{} you need to load the @file{stix} package.
@ifnottex
@@ -591,8 +602,8 @@ commands it covers (barring unintentional omissions, a.k.a.@: bugs).
@PkgIndex{expl3}
@PkgIndex{xparse}
@cindex @LaTeX{}3 syntax
-As of the 2020-10-01 release of @LaTeX{}, the @code{expl3} and
-@code{xparse} packages are part of the @LaTeX{}2e format. They
+As of the 2020-10-01 release of @LaTeX{}, the @package{expl3} and
+@package{xparse} packages are part of the @LaTeX{}2e format. They
provide a completely different underlying programming language
syntax. We won't try to cover them in this document; see the related
package documentation and other @LaTeX{} manuals.
@@ -721,7 +732,7 @@ such as technical reports or theses, which may contain several chapters.
@item slides
@anchor{document classes slides}
For slide presentations---rarely used nowadays. The
-@code{beamer} package is perhaps the most prevalent
+@package{beamer} package is perhaps the most prevalent
(@url{https://ctan.org/pkg/beamer}). @xref{beamer template}, for a
small template for a beamer document.
@@ -802,7 +813,7 @@ the print area but you must also set the physical paper size. One way
to do that is to put @code{\pdfpagewidth=\paperwidth} and
@code{\pdfpageheight=\paperheight} in your document's preamble.
@PkgIndex{geometry}
-The @code{geometry} package provides flexible ways of setting the print
+The @package{geometry} package provides flexible ways of setting the print
area and physical page size.
@findex draft @r{option}
@@ -1162,7 +1173,7 @@ Commands defined this way are a bit less efficient than those defined
using @code{\newcommand} so unless the command's data is fragile and the
command is used within a moving argument, use @code{\newcommand}.
-@PkgIndex{etoolbox} The @file{etoolbox} package offers the commands
+@PkgIndex{etoolbox} The @package{etoolbox} package offers the commands
@code{\newrobustcmd}, @code{\newrobustcmd*}, as well as the commands
@code{\renewrobustcmd}, @code{\renewrobustcmd*}, and the commands
@code{\providerobustcmd}, and @code{\providerobustcmd*}. These are
@@ -1523,16 +1534,17 @@ or
Specify the font encodings. A font encoding is a mapping of the
character codes to the font glyphs that are used to typeset your output.
+@PkgIndex{fontspec}
This package only applies if you use the @code{pdflatex} engine
(@pxref{@TeX{} engines}). If you use the @command{xelatex} or
-@command{lualatex} engine then instead use the @file{fontspec} package.
+@command{lualatex} engine then instead use the @package{fontspec} package.
@TeX{}'s original font family, Computer Modern, has a limited character
set. For instance, to make common accented characters you must use
@code{\accent} (@pxref{\accent}) but this disables hyphenation. @TeX{}
users have agreed on a number of standards to access the larger sets of
characters provided by modern fonts. If you are using
-@command{pdflatex} then this in the preamble
+@command{pdflatex} then put this in the preamble
@example
\usepackage[T1]@{fontenc@}
@@ -1549,7 +1561,7 @@ to directly enter accented characters into your source file.)
If you are using an encoding such as @code{T1} and the characters appear
blurry or do not magnify well then your fonts may be bitmapped,
sometimes called raster or Type@tie{}3. You want vector fonts. Use a
-package such as @file{lmodern} or @file{cm-super} to get a font that
+package such as @package{lmodern} or @package{cm-super} to get a font that
extends @LaTeX{}'s default using vector fonts.
For each @var{font_encoding} given as an option but not already
@@ -1641,7 +1653,7 @@ The file @file{t1enc.def} contains this line (followed by many others).
The @var{text-settings} are the commands that @LaTeX{} will run every
time it switches from one encoding to another with the
-@code{\selectfont} or @code{\fontencoding} command. The
+@code{\selectfont} and @code{\fontencoding} commands. The
@var{math-settings} are the commands that @LaTeX{} will use whenever the
font is accessed as a math alphabet.
@@ -1678,6 +1690,9 @@ Synopsis:
Define an accent, to be put on top of other glyphs, in the encoding
@var{encoding} at the location @var{slot}.
+@cindex slot, font
+A @dfn{slot} is the number identifying a glyph within a font.
+
This line from @file{t1enc.def} declares that to make a circumflex
accent as in @code{\^A}, the system will put the accent in slot@tie{}2
over the @samp{A} character, which is represented in ASCII as@tie{}65.
@@ -1704,10 +1719,10 @@ transcript file.
Synopsis:
@example
-\DeclareTextAccentDefault@{@var{cmd}@}@{@var{encoding}@}
+\DeclareTextAccentDefault@{\@var{cmd}@}@{@var{encoding}@}
@end example
-If there is an encoding-specific accent command @var{cmd} but there is
+If there is an encoding-specific accent command \@var{cmd} but there is
no associated @code{\DeclareTextAccent} for that encoding then this
command will pick up the slack, by saying to use it as described for
@var{encoding}.
@@ -1728,8 +1743,8 @@ That is, this command is equivalent to this call (@pxref{\UseTextSymbol
& \UseTextAccent}).
@example
-\DeclareTextCommandDefault[1]@{@var{cmd}@}
- @{\UseTextAccent@{@var{encoding}@}@{@var{cmd}@}@{#1@}@}
+\DeclareTextCommandDefault[1]@{\@var{cmd}@}
+ @{\UseTextAccent@{@var{encoding}@}@{\@var{cmd}@}@{#1@}@}
@end example
Note that @code{\DeclareTextAccentDefault} works for any one-argument
@@ -1740,30 +1755,29 @@ Note that @code{\DeclareTextAccentDefault} works for any one-argument
@subsection @code{\DeclareTextCommand} & @code{\ProvideTextCommand}
@findex \DeclareTextCommand
-@findex \DeclareTextCommandDefault
@findex \ProvideTextCommand
Synopsis, one of:
@example
-\DeclareTextCommand@{@var{cmd}@}@{@var{encoding}@}@{@var{defn}@}
-\DeclareTextCommand@{@var{cmd}@}@{@var{encoding}@}[@var{nargs}]@{@var{defn@}}
-\DeclareTextCommand@{@var{cmd}@}@{@var{encoding}@}[@var{nargs}][@var{optargdefault}]@{@var{defn}@}
+\DeclareTextCommand@{\@var{cmd}@}@{@var{encoding}@}@{@var{defn}@}
+\DeclareTextCommand@{\@var{cmd}@}@{@var{encoding}@}[@var{nargs}]@{@var{defn@}}
+\DeclareTextCommand@{\@var{cmd}@}@{@var{encoding}@}[@var{nargs}][@var{optargdefault}]@{@var{defn}@}
@end example
or one of:
@example
-\ProvideTextCommand@{@var{cmd}@}@{@var{encoding}@}@{@var{defn}@}
-\ProvideTextCommand@{@var{cmd}@}@{@var{encoding}@}[@var{nargs}]@{@var{defn}@}
-\ProvideTextCommand@{@var{cmd}@}@{@var{encoding}@}[@var{nargs}][@var{optargdefault}]@{@var{defn}@}
+\ProvideTextCommand@{\@var{cmd}@}@{@var{encoding}@}@{@var{defn}@}
+\ProvideTextCommand@{\@var{cmd}@}@{@var{encoding}@}[@var{nargs}]@{@var{defn}@}
+\ProvideTextCommand@{\@var{cmd}@}@{@var{encoding}@}[@var{nargs}][@var{optargdefault}]@{@var{defn}@}
@end example
-Define the command @var{cmd}, which will be specific to one encoding.
-The command name @var{cmd} must begin with a backslash, \. These
-commands can only appear in the preamble. Redefining @code{cmd} does
-not cause an error. The defined command will be robust even if the code
-in @var{defn} is fragile (@pxref{\protect}).
+Define the command @code{\@var{cmd}}, which will be specific to one
+encoding. The command name @var{cmd} must be preceded by a backslash,
+@code{\}. These commands can only appear in the preamble. Redefining
+\@var{cmd} does not cause an error. The defined command will be robust
+even if the code in @var{defn} is fragile (@pxref{\protect}).
For example, the file @file{t1enc.def} contains this line.
@@ -1784,22 +1798,23 @@ If you change the font encoding to @code{OT1} then you get an error like
@samp{LaTeX Error: Command \textperthousand unavailable in encoding
OT1}.
+@findex \DeclareTextSymbol
The @code{\ProvideTextCommand} variant does the same, except that it
-does nothing if @var{cmd} is already defined. The
+does nothing if @code{\@var{cmd}} is already defined. The
@code{\DeclareTextSymbol} command is faster than this one for simple
slot-to-glyph association (@pxref{\DeclareTextSymbol})
-The optional @var{nargs} and @var{optargsdefault} arguments play the
-same role here as in @code{\newcommand} (@pxref{\newcommand &
+The optional @var{nargs} and @var{optargdefault} arguments play the same
+role here as in @code{\newcommand} (@pxref{\newcommand &
\renewcommand}). Briefly, @var{nargs} is an integer from 0 to 9
-specifying the number of arguments that the defined command @code{cmd}
-takes. This number includes any optional argument. Omitting this
-argument is the same as specifying 0, meaning that @var{cmd} will have
-no arguments. And, if @var{optargsdefault} is present then the first
-argument of @code{\@var{cmd}} is optional, with default value
-@var{optargdefault} (which may be the empty string). If
-@var{optargsdefault} is not present then @code{\@var{cmd}} does not take
-an optional argument.
+specifying the number of arguments that the defined command
+@code{\@var{cmd}} takes. This number includes any optional argument.
+Omitting this argument is the same as specifying 0, meaning that
+@code{\@var{cmd}} will have no arguments. And, if @var{optargdefault}
+is present then the first argument of @code{\@var{cmd}} is optional,
+with default value @var{optargdefault} (which may be the empty string).
+If @var{optargdefault} is not present then @code{\@var{cmd}} does not
+take an optional argument.
@node \DeclareTextCommandDefault & \ProvideTextCommandDefault
@@ -1813,18 +1828,18 @@ an optional argument.
Synopsis:
@example
-\DeclareTextCommandDefault@{@var{cmd}@}@{@var{defn}@}
+\DeclareTextCommandDefault@{\@var{cmd}@}@{@var{defn}@}
@end example
or:
@example
-\ProvideTextCommandDefault@{@var{cmd}@}@{@var{defn}@}
+\ProvideTextCommandDefault@{\@var{cmd}@}@{@var{defn}@}
@end example
-Give a default definition for @var{cmd}, for when that command is not
-defined in the encoding currently in force. This default should only use
-encodings known to be available.
+Give a default definition for @code{\@var{cmd}}, for when that command
+is not defined in the encoding currently in force. This default should
+only use encodings known to be available.
This makes @code{\copyright} available.
@@ -1832,6 +1847,7 @@ This makes @code{\copyright} available.
\DeclareTextCommandDefault@{\copyright@}@{\textcircled@{c@}@}
@end example
+@noindent
It uses only an encoding (OMS) that is always available.
The @code{\DeclareTextCommandDefault} should not occur in the encoding
@@ -1841,7 +1857,7 @@ when you select that encoding. It should instead be in a package.
As with the related non-default commands, the
@code{\ProvideTextCommandDefault} has exactly the same behavior as
@code{\DeclareTextCommandDefault} except that it does nothing if
-@var{cmd} is already defined (@pxref{\DeclareTextCommand &
+@code{\@var{cmd}} is already defined (@pxref{\DeclareTextCommand &
\ProvideTextCommand}). So, packages can use it to provide fallbacks
that other packages can improve upon.
@@ -1855,7 +1871,7 @@ that other packages can improve upon.
Synopsis:
@example
-\DeclareTextComposite@{@var{cmd}@}@{@var{encoding}@}@{@var{simple_object}@}@{@var{slot}@}
+\DeclareTextComposite@{\@var{cmd}@}@{@var{encoding}@}@{@var{simple_object}@}@{@var{slot}@}
@end example
Access an accented glyph directly, that is, without having to put an
@@ -1863,7 +1879,7 @@ accent over a separate character.
This line from @file{t1enc.def} means that @code{\^o} will cause
@LaTeX{} to typeset lowercase@tie{}@samp{o} by taking the character
-directly from location 224 in the font.
+directly from slot 224 in the font.
@example
\DeclareTextComposite@{\^@}@{T1@}@{o@}@{244@}
@@ -1873,7 +1889,7 @@ directly from location 224 in the font.
@var{simple_object} should be a single character or a single command.
The @var{slot} argument is usually a positive integer represented in
decimal (although octal or hexadecimal are possible). Normally
-@var{cmd} has already been declared for this encoding, either with
+\@var{cmd} has already been declared for this encoding, either with
@code{\DeclareTextAccent} or with a one-argument
@code{\DeclareTextCommand}. In @file{t1enc.def}, the above line follows
the @code{\DeclareTextAccent@{\^@}@{T1@}@{2@}} command.
@@ -1888,11 +1904,11 @@ the @code{\DeclareTextAccent@{\^@}@{T1@}@{2@}} command.
Synopsis:
@example
-\DeclareTextCompositeCommand@{@var{cmd}@}@{@var{encoding}@}@{@var{arg}@}@{@var{code}@}
+\DeclareTextCompositeCommand@{\@var{cmd}@}@{@var{encoding}@}@{@var{arg}@}@{@var{code}@}
@end example
A more general version of @code{\DeclareTextComposite} that runs
-arbitrary code with @var{cmd}.
+arbitrary code with @code{\@var{cmd}}.
This allows accents on @samp{i} to act like accents on dotless@tie{}i,
@code{\i}.
@@ -1902,7 +1918,7 @@ This allows accents on @samp{i} to act like accents on dotless@tie{}i,
@end example
@xref{fontenc package}, for a list of common encodings. Normally
-@var{cmd} will have already been declared with @code{\DeclareTextAccent}
+@code{\@var{cmd}} will have already been declared with @code{\DeclareTextAccent}
or as a one argument @code{\DeclareTextCommand}.
@@ -1915,7 +1931,7 @@ or as a one argument @code{\DeclareTextCommand}.
Synopsis:
@example
-\DeclareTextSymbol@{@var{cmd}@}@{@var{encoding}@}@{@var{slot}@}
+\DeclareTextSymbol@{\@var{cmd}@}@{@var{encoding}@}@{@var{slot}@}
@end example
Define a symbol in the encoding @var{encoding} at the location
@@ -1923,7 +1939,7 @@ Define a symbol in the encoding @var{encoding} at the location
mathematics.
For example, this line from @file{t1enc.def} declares the number of the
-glyph to use for @BES{00AB}, the left guillemet.
+glyph to use for @BES{00AB,\hbox{\guillemotleft}}, the left guillemet.
@example
\DeclareTextSymbol@{\guillemotleft@}@{T1@}@{19@}
@@ -1939,9 +1955,9 @@ can be specified in decimal, or octal (as in @code{'023}), or
hexadecimal (as in @code{"13}), although decimal has the advantage that
single quote or double quote could be redefined by another package.
-If @var{cmd} has already been defined then @code{\DeclareTextSymbol}
-does not give an error but it does log the redefinition in the
-transcript file.
+If @code{\@var{cmd}} has already been defined then
+@code{\DeclareTextSymbol} does not give an error but it does log the
+redefinition in the transcript file.
@node \DeclareTextSymbolDefault
@@ -1954,13 +1970,13 @@ transcript file.
Synopsis:
@example
-\DeclareTextSymbolDefault@{@var{cmd}@}@{@var{encoding}@}
+\DeclareTextSymbolDefault@{\@var{cmd}@}@{@var{encoding}@}
@end example
-If there is an encoding-specific symbol command @var{cmd} but there is no
-associated @code{\DeclareTextSymbol} for that encoding, then this command
-will pick up the slack, by saying to get the symbol as described for
-@var{encoding}.
+If there is an encoding-specific symbol command @code{\@var{cmd}} but
+there is no associated @code{\DeclareTextSymbol} for that encoding, then
+this command will pick up the slack, by saying to get the symbol as
+described for @var{encoding}.
For example, to declare that if the current encoding has no meaning for
@code{\textdollar} then use the one from @code{OT1}, declare this.
@@ -1973,8 +1989,8 @@ That is, this command is equivalent to this call (@pxref{\UseTextSymbol
& \UseTextAccent}).
@example
-\DeclareTextCommandDefault@{@var{cmd}@}
- @{\UseTextSymbol@{@var{encoding}@}@{@var{cmd}@}@}
+\DeclareTextCommandDefault@{\@var{cmd}@}
+ @{\UseTextSymbol@{@var{encoding}@}@{\@var{cmd}@}@}
@end example
Note that @code{\DeclareTextSymbolDefault} can be used to define a
@@ -2014,13 +2030,13 @@ name of the encoding explicitly.
Synopsis:
@example
-\UseTextSymbol@{@var{encoding}@}@{@var{cmd}@}
+\UseTextSymbol@{@var{encoding}@}@{\@var{cmd}@}
@end example
or:
@example
-\UseTextAccent@{@var{encoding}@}@{@var{cmd}@}@{@var{text}@}
+\UseTextAccent@{@var{encoding}@}@{\@var{cmd}@}@{@var{text}@}
@end example
Use a symbol or accent not from the current encoding.
@@ -2331,6 +2347,18 @@ Here, the scope of the @code{\small} lasts until the end of the
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.@}}.
+Trying to use these commands in math, as with @code{$\small mv^2/2$},
+results in @samp{LaTeX Font Warning: Command \small
+invalid in math mode}, and the font size doesn't
+change. To work with a too-large formula, often the best option is to
+use the @code{displaymath} environment (@pxref{Math formulas}), or
+one of the environments from the @package{amsmath} package. For inline
+mathematics, such as in a table of formulas, an alternative is something
+like @code{@{\small $mv^2/2$@}}. (Sometimes @code{\scriptsize} and
+@code{\scriptstyle} are confused. Both change the font size, but the
+latter also changes a number of other aspects of how mathematics is
+typeset. @xref{Math styles}.)
+
@cindex environment form of font size commands
An @dfn{environment form} of each of these commands is also defined; for
instance, @code{\begin@{tiny@}...\end@{tiny@}}. However, in practice
@@ -2500,10 +2528,10 @@ When forming the @var{series} string from the weight and width, drop the
weight and width are @code{m}, in which case use just one
(@samp{@code{m}}).
+@anchor{low level font commands fontshape}
@item \fontshape@{@var{shape}@}
@findex \fontshape
@cindex shapes, of fonts
-@anchor{low level font commands fontshape}
Select font shape. Valid shapes are:
@multitable {xx} {Slanted (oblique)xx}
@@ -2541,11 +2569,10 @@ reset every time a size change happens; instead use
@anchor{low level font commands linespread}
@item \linespread@{@var{factor}@}
@findex \linespread
-Equivalent to
-@code{\renewcommand@{\baselinestretch@}@{@var{factor}@}}, and
-therefore must be followed by @code{\selectfont} to have any effect.
-Best specified in the preamble, or use the @code{setspace} package, as
-just described.
+Equivalent to @code{\renewcommand@{\baselinestretch@}@{@var{factor}@}},
+and therefore must be followed by @code{\selectfont} to have any
+effect. Best specified in the preamble. @xref{\baselineskip &
+\baselinestretch}, for using @package{setspace} package instead.
@anchor{low level font commands selectfont}
@item \selectfont
@@ -2982,7 +3009,7 @@ same as the font size, e.g., @samp{10pt} at a type size of 10pt.
@cindex double spacing
The @code{\baselineskip} is a rubber length (@pxref{Lengths}). It gives
-the leading, the normal distance between lines in a paragraph, from
+the @dfn{leading}, the normal distance between lines in a paragraph, from
baseline to baseline.
Ordinarily document authors do not directly change @code{\baselineskip}
@@ -2996,9 +3023,9 @@ spacing, see the discussion of @code{\baselinestretch} below.
Usually, a font's size and baseline skip is assigned by the font
designer. These numbers are nominal in the sense that if, for instance,
a font's style file has the command @code{\fontsize@{10pt@}@{12pt@}}
-then that does not mean that the characters in the font are 10pt tall;
+then that does not mean that the characters in the font are 10@dmn{pt} tall;
for instance, parentheses and accented capitals may be taller. Nor does
-it mean that if the lines are spaced less than 12pt apart then they risk
+it mean that if the lines are spaced less than 12@dmn{pt} apart then they risk
touching. Rather these numbers are typographic judgements. (Often, the
@code{\baselineskip} is about twenty percent larger than the font size.)
@@ -3035,15 +3062,15 @@ lines would be too close together, closer than @code{\lineskiplimit},
then @TeX{} instead uses @code{\lineskip} as the interline glue. The
second is that @TeX{} doesn't actually use the depth of the previous
line. Instead it uses @code{\prevdepth}, which usually contains that
-depth. But at the beginning of the paragraph (or any vertical list)
-or just after a rule, @code{\prevdepth} has the value -1000pt and this
-special value tells @TeX{} not to insert any interline glue at the
+depth. But at the beginning of the paragraph (or any vertical list) or
+just after a rule, @code{\prevdepth} has the value -1000@dmn{pt} and
+this special value tells @TeX{} not to insert any interline glue at the
paragraph start.
-In the standard classes @code{\lineskiplimit} is 0pt and
-@code{\lineskip} is 1pt. By the prior paragraph then, the distance
+In the standard classes @code{\lineskiplimit} is 0@dmn{pt} and
+@code{\lineskip} is 1@dmn{pt}. By the prior paragraph then, the distance
between lines can approach zero but if it becomes zero (or less than
-zero) then the lines jump to 1pt apart.
+zero) then the lines jump to 1@dmn{pt} apart.
Sometimes authors must, for editing purposes, put the document in double
space or one-and-a-half space. The right way to influence the interline
@@ -3057,7 +3084,7 @@ document is to put @code{\linespread@{@var{factor}@}} in the preamble.
For double spacing, take @var{factor} to be 1.6 and for one-and-a-half
spacing use 1.3. These number are rough: for instance, since the
@code{\baselineskip} is about 1.2 times the font size, multiplying by
-1.6 gives a font size to baseline ratio of about 2. (The
+1.6 gives a baseline skip to font size ratio of about 2. (The
@code{\linespread} command is defined as
@code{\renewcommand@{\baselinestretch@}@{@var{factor}@}} so it won't
take effect until a font setting happens. But that always takes place at
@@ -3065,13 +3092,14 @@ the start of a document, so there you don't need to follow it with
@code{\selectfont}.)
@PkgIndex{setspace}
-A simpler approach is the @file{setspace} package. The basic example:
+A simpler approach is the @package{setspace} package. The basic example:
@example
\usepackage@{setspace@}
\doublespacing % or \onehalfspacing for 1.5
@end example
+@noindent
In the preamble these will start the document off with that sizing.
But you can also use these declarations in the document body to change
the spacing from that point forward, and consequently there is
@@ -3081,7 +3109,9 @@ environments, such as @code{\begin@{doublespace@}
... \end@{doublespace@}}. The package also has commands to do
arbitrary spacing: @code{\setstretch@{@var{factor}@}} and
@code{\begin@{spacing@}@{@var{factor}@} ... \end@{spacing@}}.
-
+This package also keeps the line spacing single-spaced in places
+where that is typically desirable, such as footnotes and figure
+captions. See the package documentation.
@node Floats
@section Floats
@@ -3093,7 +3123,7 @@ for instance floating to the top of a later page.
@LaTeX{} can have a number of different classes of floating material.
The default is the two classes, @code{figure} (@pxref{figure}) and
@code{table} (@pxref{table}), but you can create a new class with the
-package @file{float}.
+package @package{float}.
Within any one float class @LaTeX{} always respects the order, so that
the first figure in a document source must be typeset before the second
@@ -3177,7 +3207,7 @@ is finished and then flush all outstanding floats.
the @var{placement} parameter. If this is not desired, and deleting
the @code{t} is not acceptable as it keeps the float from being placed
at the top of the next page, then you can prevent it by either using
-the @file{flafter} package or using the command
+the @package{flafter} package or using the command
@findex \suppressfloats
@code{\suppressfloats[t]}, which causes floats for the top position on
this page to moved to the next page.
@@ -3276,6 +3306,103 @@ influence the position of float environments like figure and table in
@LaTeX{}?''
(@url{https://www.latex-project.org/publications/2014-FMi-TUB-tb111mitt-float-placement.pdf}).
+@menu
+* \caption:: Make a caption for a floating environment.
+@end menu
+
+
+@node \caption
+@subsection @code{\caption}
+
+@findex \caption
+@cindex captions
+
+Synopsis:
+
+@example
+\caption@{@var{caption-text}@}
+@end example
+
+@noindent
+or
+
+@example
+\caption[@var{short-caption-text}]@{@var{caption-text}@}
+@end example
+
+Make a caption for a floating environment, such as a @code{figure} or
+@code{table} environment (@pxref{figure} or @ref{table}).
+
+In this example, @LaTeX{} places a caption below the vertical blank
+space that is left by the author for the later inclusion of a picture.
+
+@example
+\begin@{figure@}
+ \vspace*@{1cm@}
+ \caption@{Alonzo Cushing, Battery A, 4th US Artillery.@}
+ \label@{fig:CushingPic@}
+\end@{figure@}
+@end example
+
+@noindent
+The @code{\caption} command will label the @var{caption-text} with
+something like @samp{Figure@tie{}1:} for an article or
+@samp{Figure@tie{}1.1:} for a book. The text is centered if it is
+shorter than the text width, or set as an unindented paragraph if it
+takes more than one line.
+
+In addition to placing the @var{caption-text} in the output, the
+@code{\caption} command also saves that information for use in a list of
+figures or list of tables (@pxref{Table of contents etc.}).
+
+Here the @code{\caption} command uses the optional
+@var{short-caption-text}, so that the shorter text appears in the list
+of tables, rather than the longer @var{caption-text}.
+
+@example
+\begin@{table@}
+ \centering
+ \begin@{tabular@}@{|*@{3@}@{c@}|@}
+ \hline
+ 4 &9 &2 \\
+ 3 &5 &7 \\
+ 8 &1 &6 \\
+ \hline
+ \end@{tabular@}
+ \caption[\textit@{Lo Shu@} magic square]@{%
+ The \textit@{Lo Shu@} magic square, which is unique among
+ squares of order three up to rotation and reflection.@}
+ \label@{tab:LoShu@}
+\end@{table@}
+@end example
+
+@noindent
+@LaTeX{} will label the @var{caption-text} with something like
+@samp{Table@tie{}1:} for an article or @samp{Table@tie{}1.1:} for a
+book.
+
+The caption can appear at the top of the @code{figure} or @code{table}.
+For instance, that would happen in the prior example by putting the
+@code{\caption} between the @code{\centering} and the
+@code{\begin@{tabular@}}.
+
+Different floating environments are numbered separately, by default. It
+is @code{\caption} that updates the counter, and so any @code{\label}
+must come after the @code{\caption}. The counter for the @code{figure}
+environment is named @code{figure}, and similarly the counter for the
+@code{table} environment is @code{table}.
+
+The text that will be put in the list of figures or list of tables is
+moving argument. If you get the @LaTeX{} error @samp{! Argument of
+\@@caption has an extra @}} then you must put @code{\protect} in front
+of any fragile commands. @xref{\protect}.
+
+@PkgIndex{caption}
+The @package{caption} package has many options to adjust how the caption
+appears, for example changing the font size, making the caption be
+hanging text rather than set as a paragraph, or making the caption
+always set as a paragraph rather than centered when it is short.
+
@node Sectioning
@chapter Sectioning
@@ -3368,7 +3495,7 @@ simple example, you can change the section numbering to upper-case
letters with @code{\renewcommand\thesection@{\Alph@{section@}@}} in the
preamble (@pxref{\alph \Alph \arabic \roman \Roman \fnsymbol}). CTAN
has many packages that make this adjustment easier, notably
-@file{titlesec}.
+@package{titlesec}.
Two counters relate to the appearance of headings made by sectioning commands.
@@ -3463,8 +3590,8 @@ but it does not show the part number, does not increment the
The optional argument @var{toc-title} will appear as the part title in
the table of contents (@pxref{Table of contents etc.}) and in running
headers (@pxref{Page styles}). If it is not present then @var{title}
-will be there. This example puts a line break in @var{title} but leaves
-out the break in the table of contents.
+will be there. This example puts a line break in @var{title} but omits
+the break in the table of contents.
@example
\part[Up from the bottom; my life]@{Up from the bottom\\ my life@}
@@ -3477,10 +3604,10 @@ the table of contents, the level number of a part is@tie{}-1
@PkgIndex{indentfirst}
In the class @code{article}, if a paragraph immediately follows the part
title then it is not indented. To get an indent you can use the package
-@file{indentfirst}.
+@package{indentfirst}.
@PkgIndex{titlesec}
-One package to change the behavior of @code{\part} is @file{titlesec}.
+One package to change the behavior of @code{\part} is @package{titlesec}.
See its documentation on CTAN.
@@ -3558,7 +3685,7 @@ the table of contents, the level number of a chapter is@tie{}0
@PkgIndex{indentfirst}
The paragraph that follows the chapter title is not indented, as is a
standard typographical practice. To get an indent use the package
-@file{indentfirst}.
+@package{indentfirst}.
You can change what is shown for the chapter number. To change it to
something like @samp{Lecture 1}, put in the preamble either
@@ -3573,7 +3700,7 @@ something like @samp{Lecture 1}, put in the preamble either
@PkgIndex{babel}
@noindent To make this change because of the primary language for
-the document, see the package @file{babel}.
+the document, see the package @package{babel}.
In a two-sided document @LaTeX{} puts a chapter on odd-numbered page, if
necessary leaving an even-numbered page that is blank except for any
@@ -3584,7 +3711,7 @@ see@tie{}@ref{\clearpage & \cleardoublepage}.
To change the behavior of the @code{\chapter} command, you can copy its
definition from the @LaTeX{} format file and make adjustments. But
there are also many packages on CTAN that address this. One is
-@file{titlesec}. See its documentation, but the example below gives a
+@package{titlesec}. See its documentation, but the example below gives a
sense of what it can do.
@example
@@ -3651,7 +3778,7 @@ The optional argument @var{toc-title} will appear as the section title
in the table of contents (@pxref{Table of contents etc.}) and in
running headers (@pxref{Page styles}). If it is not present then
@var{title} will be there. This shows the full name in the title of the
-section,
+section:
@example
\section[Elizabeth~II]@{Elizabeth the Second,
@@ -3677,13 +3804,13 @@ the table of contents, the level number of a section is@tie{}1
@PkgIndex{indentfirst}
The paragraph that follows the section title is not indented, as is a
standard typographical practice. One way to get an indent is to use the
-package @file{indentfirst}.
+package @package{indentfirst}.
@PkgIndex{titlesec}
In general, to change the behavior of the @code{\section} command, there
are a number of options. One is the @code{\@@startsection} command
(@pxref{\@@startsection}). There are also many packages on CTAN that
-address this, including @file{titlesec}. See the documentation but the
+address this, including @package{titlesec}. See the documentation but the
example below gives a sense of what they can do.
@c credit: egreg https://groups.google.com/forum/#!topic/comp.text.tex/tvc8oM5P4y4
@@ -3743,8 +3870,8 @@ But it does not show the subsection number, does not increment the
The optional argument @var{toc-title} will appear as the subsection title
in the table of contents (@pxref{Table of contents etc.}). If it is
-not present then @var{title} will be there. This shows the full text in
-the title of the subsection,
+not present then @var{title} will be there. This
+shows the full text in the title of the subsection:
@example
\subsection[$\alpha,\beta,\gamma$ paper]@{\textit@{The Origin of
@@ -3762,13 +3889,13 @@ the table of contents, the level number of a subsection is@tie{}2
@PkgIndex{indentfirst}
The paragraph that follows the subsection title is not indented, as is a
standard typographical practice. One way to get an indent is to use the
-package @file{indentfirst}.
+package @package{indentfirst}.
@PkgIndex{titlesec}
There are a number of ways to change the behavior of the
@code{\subsection} command. One is the @code{\@@startsection} command
(@pxref{\@@startsection}). There are also many packages on CTAN that
-address this, including @file{titlesec}. See the documentation but the
+address this, including @package{titlesec}. See the documentation but the
example below gives a sense of what they can do.
@example
@@ -3863,13 +3990,13 @@ a paragraph is@tie{}4, and of a subparagraph is@tie{}5
@PkgIndex{indentfirst}
The paragraph that follows the subsubsection title is not indented, as is a
standard typographical practice. One way to get an indent is to use the
-package @file{indentfirst}.
+package @package{indentfirst}.
@PkgIndex{titlesec}
There are a number of ways to change the behavior of the these commands.
One is the @code{\@@startsection} command (@pxref{\@@startsection}).
There are also many packages on CTAN that address this, including
-@file{titlesec}. See the documentation on CTAN.
+@package{titlesec}. See the documentation on CTAN.
@node \appendix
@@ -3911,7 +4038,7 @@ the first two will generate output numbered @samp{Chapter 1} and
for another example.
@PkgIndex{appendix}
-The @file{appendix} package adds the command
+The @package{appendix} package adds the command
@code{\appendixpage} to put a separate @samp{Appendices} in the document
body before the first appendix, and the command @code{\addappheadtotoc}
to do the same in the table of contents. You can reset the name
@@ -3985,7 +4112,7 @@ Synopsis:
Used to help redefine the behavior of commands that start sectioning
divisions such as @code{\section} or @code{\subsection}.
-Note that the @file{titlesec} package makes manipulation of sectioning
+Note that the @package{titlesec} package makes manipulation of sectioning
easier. Further, while most requirements for sectioning commands can be
satisfied with @code{\@@startsection}, some cannot. For instance, in
the standard @LaTeX{} @code{book} and @code{report} classes the commands
@@ -4261,7 +4388,7 @@ change some things so the references changes; you get the same warning
and the output contains the old reference information. In both cases,
resolve this by compiling the document a second time.
-@PkgIndex{cleveref} The @code{cleveref} package enhances @LaTeX{}'s
+@PkgIndex{cleveref} The @package{cleveref} package enhances @LaTeX{}'s
cross referencing features. You can arrange that if you enter
@code{\begin@{thm@}\label@{th:Nerode@}...\end@{thm@}} then
@code{\cref@{th:Nerode@}} will output @samp{Theorem 3.21}, without you
@@ -4419,15 +4546,15 @@ The most widely-used format is item number~\ref@{popular@}.
@end example
@PkgIndex{cleveref}
-The @file{cleveref} package includes text such as @samp{Theorem} in the
+The @package{cleveref} package includes text such as @samp{Theorem} in the
reference. See the documentation on CTAN.
@node xr package
-@section @code{xr} package
+@section @package{xr} package
-@findex @code{xr} package
-@findex @code{xr-hyper} package
+@PkgIndex{xr}
+@PkgIndex{xr-hyper}
@findex \externaldocument
@cindex cross referencing, across documents
@@ -4438,6 +4565,7 @@ Synopsis:
\externaldocument@{@var{document-basename}@}
@end example
+@noindent
or
@example
@@ -4446,9 +4574,9 @@ or
@end example
Make cross references to the external document
-@code{@var{document-basename}.tex}.
+@file{@var{document-basename}.tex}.
-Here is an example. If @code{lectures.tex} has this in the preamble
+Here is an example. If @file{lectures.tex} has this in the preamble
@example
\usepackage@{xr@}
@@ -4457,21 +4585,24 @@ Here is an example. If @code{lectures.tex} has this in the preamble
\externaldocument@{answers@}
@end example
+@noindent
then it can use cross reference labels from the other three documents.
-Suppose that @code{exercises.tex} has an enumerated list containing
+Suppose that @file{exercises.tex} has an enumerated list containing
this,
@example
\item \label@{exer:EulersThm@} What if every vertex has odd degree?
@end example
-and @code{hints.tex} has an enumerated list with this,
+@noindent
+and @file{hints.tex} has an enumerated list with this,
@example
\item \label@{exer:EulersThm@} Distinguish the case of two vertices.
@end example
-and @code{answers.tex} has an enumerated list with this.
+@noindent
+and @file{answers.tex} has an enumerated list with this,
@example
\item \label@{ans:EulersThm@} There is no Euler path, except if there
@@ -4479,7 +4610,7 @@ and @code{answers.tex} has an enumerated list with this.
@end example
After compiling the exercises, hints, and answers documents, entering
-this in the body of @code{lectures.tex} will result in the lectures
+this in the body of @file{lectures.tex} will result in the lectures
getting the reference numbers used in the other documents.
@example
@@ -4492,10 +4623,10 @@ because the label in the hints file is the same as the label in the
exercises file. Without that prefix, both references would get the
number from the later file.
-Note: if the document uses the @code{hyperref} package then in place of
-@code{xr}, put @code{\usepackage@{xr-hyper@}} before the
+Note: if the document uses the @package{hyperref} package then in place of
+@package{xr}, put @code{\usepackage@{xr-hyper@}} before the
@code{\usepackage@{hyperref@}}. Also, if any of the multiple documents
-uses @code{hyperref} then they all must use it.
+uses @package{hyperref} then they all must use it.
@node Environments
@@ -4640,10 +4771,10 @@ or:
@end example
Produce a mathematical array. This environment can only be used in math
-mode, and normally appears within a displayed mathematics environment
-such as @code{equation} (@pxref{equation}). Inside of each row the
-column entries are separated by an ampersand, (@code{&}). Rows are
-terminated with double-backslashes (@pxref{\\}).
+mode (@pxref{Modes}), and normally appears within a displayed
+mathematics environment such as @code{equation} (@pxref{equation}).
+Inside of each row the column entries are separated by an ampersand,
+(@code{&}). Rows are terminated with double-backslashes (@pxref{\\}).
This example shows a three by three array.
@@ -4670,7 +4801,7 @@ other common features of the two environments, including the optional
There are two ways that @code{array} diverges from @code{tabular}. The
first is that @code{array} entries are typeset in math mode, in
-textstyle (@pxref{Modes}) except if the @var{cols} definition specifies
+textstyle (@pxref{Math styles}) except if the @var{cols} definition specifies
the column with @code{p@{...@}}, which causes the entry to be typeset in
text mode. The second is that, instead of @code{tabular}'s parameter
@code{\tabcolsep}, @LaTeX{}'s intercolumn space in an @code{array} is
@@ -4681,7 +4812,7 @@ default for this is @samp{5pt} so that between two columns comes
10@dmn{pt} of space.
@PkgIndex{amsmath}
-To obtain arrays with braces the standard is to use the @file{amsmath}
+To obtain arrays with braces the standard is to use the @package{amsmath}
package. It comes with environments @code{pmatrix} for an array
surrounded by parentheses@tie{}@code{(...)}, @code{bmatrix} for an array
surrounded by square brackets@tie{}@code{[...]}, @code{Bmatrix} for an
@@ -4691,7 +4822,7 @@ an array surrounded by vertical bars@tie{}@code{|...|}, and
bars@tie{}@code{||...||}, along with a number of other array constructs.
@PkgIndex{amsmath}
-The next example uses the @file{amsmath} package.
+The next example uses the @package{amsmath} package.
@example
\usepackage@{amsmath@} % in preamble
@@ -4704,10 +4835,10 @@ The next example uses the @file{amsmath} package.
\end@{equation@}
@end example
-@PkgIndex{array (package)}
+@PkgIndex{array}
@PkgIndex{dcolumn}
-There are many packages concerning arrays. The @file{array} package has
-many useful extensions, including more column types. The @file{dcolumn}
+There are many packages concerning arrays. The @package{array} package has
+many useful extensions, including more column types. The @package{dcolumn}
package adds a column type to center on a decimal point. For both see
the documentation on CTAN.
@@ -4782,7 +4913,6 @@ entire page.
@findex \centering
@cindex centering text, declaration for
-
Synopsis:
@example
@@ -4892,7 +5022,7 @@ boldface and flush left at all levels.
For information about list layout parameters, including the default
values, and for information about customizing list layout, see
-@ref{list}. The package @file{enumitem} is useful for customizing
+@ref{list}. The package @package{enumitem} is useful for customizing
lists.
This example changes the description labels to small caps.
@@ -4928,7 +5058,7 @@ math text. One way to get an equation number is to use the
@LaTeX{} will not break the @var{math text} across lines.
@PkgIndex{amsmath}
-Note that the @file{amsmath} package has significantly more extensive
+Note that the @package{amsmath} package has significantly more extensive
displayed equation facilities. For example, there are a number of
ways in that package for having math text broken across lines.
@@ -5089,7 +5219,7 @@ The @code{enumerate} environment uses the counters @code{\enumi} through
For other major @LaTeX{} labeled list environments, see
@ref{description} and @ref{itemize}. For information about list layout
parameters, including the default values, and for information about
-customizing list layout, see @ref{list}. The package @file{enumitem} is
+customizing list layout, see @ref{list}. The package @package{enumitem} is
useful for customizing lists.
@findex \labelenumi
@@ -5126,14 +5256,14 @@ For a list of counter-labeling commands see @ref{\alph \Alph \arabic
@cindex equations, aligning
@cindex aligning equations
-@cindex align @r{environment, from @code{amsmath}}
+@cindex align @r{environment, from @package{amsmath}}
@cindex amsmath @r{package, replacing @code{eqnarray}}
@cindex Madsen, Lars
The @code{eqnarray} environment is obsolete. It has infelicities,
including spacing that is inconsistent with other mathematics elements.
(See ``Avoid eqnarray!''@: by Lars Madsen
@url{https://tug.org/TUGboat/tb33-1/tb103madsen.pdf}). New documents
-should include the @file{amsmath} package and use the displayed
+should include the @package{amsmath} package and use the displayed
mathematics environments provided there, such as the @code{align}
environment. We include a description only for completeness and for
working with old documents.
@@ -5217,7 +5347,7 @@ You should have no blank lines between @code{\begin@{equation@}} and
missing dollar sign.
@PkgIndex{amsmath}
-The package @file{amsmath} package has extensive displayed equation
+The package @package{amsmath} package has extensive displayed equation
facilities. New documents should include this package.
@@ -5270,13 +5400,12 @@ spans both columns, at the top of the page. To add the possibility of
placing at a page bottom see the discussion of @var{placement} @code{b}
in @ref{Floats}.
-The label is optional; it is used for cross references (@pxref{Cross
-references}).
@findex \caption
-The optional @code{\caption} command specifies caption text for the
-figure. By default it is numbered. If @var{loftitle} is present, it is
-used in the list of figures instead of @var{title} (@pxref{Table of
-contents etc.}).
+The label is optional; it is used for cross references (@pxref{Cross
+references}). The optional @code{\caption} command specifies caption
+text for the figure (@pxref{\caption}). By default it is numbered.
+If @var{loftitle} is present, it is used in the list of figures
+instead of @var{title} (@pxref{Table of contents etc.}).
This example makes a figure out of a graphic. @LaTeX{} will place that
graphic and its caption at the top of a page or, if it is pushed to the
@@ -5490,7 +5619,7 @@ delimit its effect.
\end@{flushright@}
@end example
-@findex \\ (for @code{flushright})
+@findex \\ @r{(for @code{flushright})}
An environment that creates a paragraph whose lines are flush to the
right-hand margin and ragged left. If you have lines that are too long
to fit the margins then @LaTeX{} will linebreak them in a way that
@@ -5580,7 +5709,7 @@ This gives a two-item list.
@end example
@noindent
-With the default locale---without loading e.g.@: @file{babel} package
+With the default locale---without loading e.g.@: @package{babel} package
with another language than USenglish---as a top-level list each label
would come out as a bullet, @bullet{}. The format of the labeling
depends on the nesting level; see below.
@@ -5660,7 +5789,7 @@ For other major @LaTeX{} labeled list environments, see
@code{enumerate} and @code{description} environment use the same list
layout parameters. For a description, including the default values, and
for information about customizing list layout, see @ref{list}. The
-package @file{enumitem} is useful for customizing lists.
+package @package{enumitem} is useful for customizing lists.
This example greatly reduces the margin space for outermost itemized
lists.
@@ -5984,7 +6113,7 @@ The page breaking penalty for breaking after a list (default @code{-51}).
@end ftable
@PkgIndex{enumitem}
-The package @code{enumitem} is useful for customizing lists.
+The package @package{enumitem} is useful for customizing lists.
This example has the labels in red. They are numbered, and the left
edge of the label lines up with the left edge of the item text.
@@ -6197,15 +6326,13 @@ vertical center lines up with the center of the adjacent text line.
@item t
@findex \vtop @r{plain @TeX{}}
-@c xx Is there any reason why the word ``match'' is used instead of word
-@c ``align''. Do we mean some more permissive alignment?
-Match the top line in the @code{minipage} with the baseline of the
-surrounding text (plain @TeX{}'s @code{\vtop}).
+Align the baseline of the top line in the @code{minipage} with the
+baseline of the surrounding text (plain @TeX{}'s @code{\vtop}).
@item b
-@findex \vbox @r{plain @TeX{}}
-Match the bottom line in the @code{minipage} with the baseline of the
-surrounding text (plain @TeX{}'s @code{\vbox}).
+@findex \vbox @r{(plain @TeX{})}
+Align the baseline of the bottom line in the @code{minipage} with the
+baseline of the surrounding text (plain @TeX{}'s @code{\vbox}).
@end table
To see the effects of these, contrast running this
@@ -6628,7 +6755,7 @@ Synopsis:
@end example
@PkgIndex{graphpap}
-Draw a coordinate grid. Requires the @file{graphpap} package.
+Draw a coordinate grid. Requires the @package{graphpap} package.
The grid's origin is @code{(@var{x_init},@var{y_init})}.
Grid lines come every @var{spacing} units (the default is 10).
The grid extends @var{x_dimen} units to the right and @var{y_dimen} units up.
@@ -6691,7 +6818,6 @@ then the line's ending point has a second coordinate that is less than
If @var{travel} is negative then you get @code{LaTeX Error: Bad \line or
\vector argument.}
-@cindex @code{pict2e} package
@cindex graphics packages
@PkgIndex{pict2e}
@PkgIndex{TikZ}
@@ -6706,7 +6832,7 @@ relatively prime, so that @var{(x_run,y_rise)} can be (2,1) but not
(4,2) (if you choose the latter then instead of lines you get sequences
of arrowheads; the solution is to switch to the former). To get lines
of arbitrary slope and plenty of other shapes in a system like
-@code{picture}, see the package @file{pict2e}
+@code{picture}, see the package @package{pict2e}
(@url{https://ctan.org/pkg/pict2e}). Another solution
is to use a full-featured graphics system such as TikZ, PSTricks,
MetaPost, or Asymptote.
@@ -6727,7 +6853,7 @@ Declares the thickness of subsequent horizontal and vertical lines in a
picture to be @var{dim}, which must be a positive length
(@pxref{Lengths}). It differs from @code{\thinlines} and
@code{\thicklines} in that it does not affect the thickness of slanted
-lines, circles, or ovals.
+lines, circles, or ovals (@pxref{\oval}).
@node \thinlines
@@ -6749,7 +6875,7 @@ changed with either @ref{\linethickness} or @ref{\thicklines}.
Declaration to set the thickness of subsequent lines, circles, and ovals
in a picture environment to be 0.8@dmn{pt}. See also
@ref{\linethickness} and @ref{\thinlines}. This command is illustrated
-in the Trapezoidal Rule example of @ref{picture}.
+in the Trapezoidal Rule example of @ref{\qbezier}.
@node \circle
@@ -6790,9 +6916,10 @@ Synopsis:
\oval(@var{width},@var{height})[@var{portion}]
@end example
-Produce a rectangle with rounded corners. The optional argument
-@var{portion} allows you to produce only half or a quarter of the oval.
-For half an oval take @var{portion} to be one of these.
+Produce a rectangle with rounded corners, hereinafter referred to as an
+@dfn{oval}. The optional argument @var{portion} allows you to produce
+only half or a quarter of the oval. For half an oval take @var{portion}
+to be one of these.
@table @code
@item t
@@ -6821,7 +6948,7 @@ top half.
These shapes are not ellipses. They are rectangles whose corners are
made with quarter circles. These circles have a maximum radius of
20@dmn{pt} (@pxref{\circle} for the sizes). Thus large ovals are just
-boxes with a small amount of corner rounding.
+frames with a small amount of corner rounding.
@node \shortstack
@@ -6837,19 +6964,23 @@ Synopsis:
Produce a vertical stack of objects.
-This labels the @math{y} axis.
+This labels the @math{y} axis by writing the word @samp{@math{y}} above
+the word @samp{axis}.
@example
-\put(0,0)@{\vector(1,0)@{4@}@} % x axis
-\put(0,0)@{\vector(0,1)@{2@}@} % y
-\put(-0.25,2)@{\makebox[0][r]@{\shortstack[r]@{$y$\\ axis@}@}@}
+\setlength@{\unitlength@}@{1cm@}
+\begin@{picture@}(5,2.5)(-0.75,0)
+ \put(0,0)@{\vector(1,0)@{4@}@} % x axis
+ \put(0,0)@{\vector(0,1)@{2@}@} % y
+ \put(-0.2,2)@{\makebox(0,0)[r]@{\shortstack[r]@{$y$\\ axis@}@}@}
+\end@{picture@}
@end example
@noindent
For a short stack, the reference point is the lower left of the stack.
-In the above example the @ref{\mbox & \makebox} puts the stack flush
-right in a zero width box so in total the short stack sits slightly to
-the left of the @math{y}@tie{}axis.
+In the above example the @code{\makebox} (@pxref{\mbox & \makebox}) puts
+the stack flush right in a zero width box so in total the short stack
+sits slightly to the left of the @math{y}@tie{}axis.
The valid positions are:
@@ -6865,11 +6996,13 @@ Center objects (default)
@findex \\ @r{(for @code{\shortstack} objects)}
Separate objects into lines with @code{\\}. These stacks are short in
that, unlike in a @code{tabular} or @code{array} environment, here the
-rows are not spaced out to be of even heights. Thus, in
+rows are not spaced out to be of even baseline skips. Thus, in
@code{\shortstack@{X\\o\\o\\X@}} the first and last rows are taller than
-the middle two. You can adjust row heights either by putting in the
-usual interline spacing with @code{\shortstack@{X\\ \strut o\\o\\X@}},
-or by hand, via an explicit zero-width box @code{\shortstack@{X \\
+the middle two, and therefore the baseline skip between the two middle
+rows is smaller than that between the third and last row. You can
+adjust row heights and depths either by putting in the usual interline
+spacing with @code{\shortstack@{X\\ \strut o\\o\\X@}} (@pxref{\strut}),
+or explicitly, via an zero-width box @code{\shortstack@{X \\
\rule@{0pt@}@{12pt@} o\\o\\X@}} or by using @code{\\}'s optional
argument @code{\shortstack@{X\\[2pt] o\\o\\X@}}.
@@ -7283,8 +7416,8 @@ function fact(n : integer) : integer;
This example is just for illustration of the environment. To actually
typeset computer code in typewriter like this, a verbatim environment
(@pxref{verbatim}) would normally be best. For pretty-printed code,
-there are quite a few packages, including @code{algorithm2e},
-@code{fancyvrb}, @code{listings}, and @code{minted}.
+there are quite a few packages, including @package{algorithm2e},
+@package{fancyvrb}, @package{listings}, and @package{minted}.
@node table
@@ -7336,10 +7469,11 @@ float placement algorithm, see @ref{Floats}.
The label is optional; it is used for cross references (@pxref{Cross
references}).
@findex \caption
-The @code{\caption} command is also optional. It specifies caption text
-@var{title} for the table. By default it is numbered. If its optional
-@var{lottitle} is present then that text is used in the list of tables
-instead of @var{title} (@pxref{Table of contents etc.}).
+The @code{\caption} command is also optional. It specifies caption
+text @var{title} for the table (@pxref{\caption}). By default it is
+numbered. If its optional @var{lottitle} is present then that text is
+used in the list of tables instead of @var{title} (@pxref{Table of
+contents etc.}).
In this example the table and caption will float to the bottom of a page,
unless it is pushed to a float page at the end.
@@ -7664,7 +7798,7 @@ range en-dash.
@example
\begin@{tabular@}@{l|r@@@{--@}l@}
\multicolumn@{1@}@{c@}@{\textsc@{Period@}@}
- &multicolumn@{2@}@{c@}@{\textsc@{Span@}@} \\ \hline
+ &\multicolumn@{2@}@{c@}@{\textsc@{Span@}@} \\ \hline
Baroque &1600 &1760 \\
Classical &1730 &1820 \\
Romantic &1780 &1910 \\
@@ -7825,7 +7959,7 @@ as with @code{\renewcommand@{\refname@}@{Cited references@}}, after
@code{\begin@{document@}}.
@PkgIndex{babel}
-Language support packages such as @file{babel} will automatically
+Language support packages such as @package{babel} will automatically
redefine @code{\refname} or @code{\bibname} to fit the selected
language.
@@ -8008,8 +8142,8 @@ sophisticated approach to managing bibliographies is provided by the
Bib@TeX{} program. This is only an introduction; see the full
documentation on CTAN (@pxref{CTAN}).
-With Bib@TeX{}, you don't use @code{thebibliography}
-(@pxref{thebibliography}). Instead, include these lines.
+With Bib@TeX{}, you don't use the @code{thebibliography} environment
+directly (@pxref{thebibliography}). Instead, include these lines:
@example
\bibliographystyle@{@var{bibstyle}@}
@@ -8035,8 +8169,8 @@ Like @code{plain}, but more compact labels.
@end table
@noindent Many, many other Bib@TeX{} style files exist,
-tailored to the demands of various publications. See CTAN's listing
-@url{https://mirror.ctan.org/biblio/bibtex/contrib}.
+tailored to the demands of various publications. See the CTAN topic
+@url{https://ctan.org/topic/bibtex-sty}.
The @code{\bibliography} command is what actually produces the
bibliography. Its argument is a comma-separated list, referring to
@@ -8067,6 +8201,55 @@ can keep all your sources together in one file, or a small number of
files, and rely on Bib@TeX{} to include in this document only those that
you used.
+@cindex @samp{*}, to @code{\nocite} all keys
+@findex \nocite @r{@{*@}, for all keys}
+With Bib@TeX{}, the @var{keys} argument to @code{\nocite} can also be
+the single character @samp{*}. This means to implicitly cite all
+entries from all given bibliographies.
+
+@menu
+* Bib@TeX{} error messages::
+@end menu
+
+@node Bib@TeX{} error messages
+@subsubsection Bib@TeX{} error messages
+
+@cindex Bib@TeX{} error messages
+@cindex error messages, from Bib@TeX{}
+@findex .aux @r{file and Bib@TeX{} commands}
+
+If you forget to use @code{\bibliography} or @code{\bibliographystyle}
+in your document (or, less likely, any @code{\cite} or @code{\nocite}
+command), Bib@TeX{} will issue an error message. Because Bib@TeX{}
+can be used with any program, not just @LaTeX{}, the error messages
+refer to the internal commands read by Bib@TeX{} (from the @file{.aux}
+file), rather than the user-level commands described above.
+
+Here is a table showing internal commands mentioned in the Bib@TeX{}
+errors, and the corresponding user-level commands.
+
+@ftable @code
+@item \bibdata
+@findex \bibliography @r{and internal @code{\bibdata}}
+@code{\bibliography}
+
+@item \bibstyle
+@findex \bibliographystyle @r{and internal @code{\bibstyle}}
+@code{\bibliographystyle}
+
+@item \citation
+@findex \cite @r{and internal @code{\citation}}
+@findex \nocite @r{and internal @code{\citation}}
+@code{\cite}, @code{\nocite}
+@end ftable
+
+For example, if your document has no @code{\bibliographystyle}
+command, Bib@TeX{} complains as follows:
+
+@example
+I found no \bibstyle command---while reading file @var{document}.aux
+@end example
+
@node theorem
@section @code{theorem}
@@ -8102,7 +8285,7 @@ The next result follows immediately.
@PkgIndex{amsmath}
@PkgIndex{amsthm}
-Most new documents use the packages @code{amsthm} and @code{amsmath}
+Most new documents use the packages @package{amsthm} and @package{amsmath}
from the American Mathematical Society. Among other things these
packages include a large number of options for theorem environments,
such as styling options.
@@ -8198,7 +8381,7 @@ as the @code{verbatim} environment changes the catcode regime before
processing its contents, and restore it immediately afterward,
nevertheless with a macro argument the content of the argument has
already be converted to a token list along the catcode regime in effect
-when the macro was called. However, the @code{cprotect} package can
+when the macro was called. However, the @package{cprotect} package can
help with this.
@PkgIndex{listings}
@@ -8206,13 +8389,13 @@ help with this.
One common use of verbatim input is to typeset computer code. There are
packages that are an improvement the @code{verbatim} environment. For
instance, one improvement is to allow the verbatim inclusion of external
-files, or parts of those files. Such packages include @code{listings},
-and @code{minted}.
+files, or parts of those files. Such packages include @package{listings},
+and @package{minted}.
@PkgIndex{fancyvrb}
@PkgIndex{verbatimbox}
A package that provides many more options for verbatim environments is
-@code{fancyvrb}. Another is @code{verbatimbox}.
+@package{fancyvrb}. Another is @package{verbatimbox}.
For a list of all the relevant packages, see CTAN (@pxref{CTAN}).
@@ -8273,14 +8456,14 @@ The command's first argument is \verb*!filename with extension! and ...
@end example
@PkgIndex{url}
-For typesetting Internet addresses, urls, the package @code{url}
+For typesetting Internet addresses, urls, the package @package{url}
is a better option than the @code{\verb} command, since
it allows line breaks.
@PkgIndex{listings}
@PkgIndex{minted}
For computer code there are many packages with advantages over
-@code{\verb}. One is @file{listings}, another is @file{minted}.
+@code{\verb}. One is @package{listings}, another is @package{minted}.
@PkgIndex{cprotect}
You cannot use @code{\verb} in the argument to a macro, for instance in
@@ -8290,7 +8473,7 @@ being fragile (@pxref{\protect}), instead it just cannot work, as the
argument, and restore it immediately afterward, nevertheless with a
macro argument the content of the argument has already be converted to a
token list along the catcode regime in effect when the macro was called.
-However, the @code{cprotect} package can help with this.
+However, the @package{cprotect} package can help with this.
@node verse
@@ -8360,6 +8543,23 @@ before taking a final pass through and considering line breaks (and page
breaks). This differs from word processing, where you are formatting
text as you input it. Putting these off until the end prevents a lot of
fiddling with breaks that will change anyway.
+@c Alernative text proposed here: https://tug.org/pipermail/latexrefman/2021q3/000803.html
+@c this text is that of the French version.
+@ignore
+A common workflow with LaTeX is to get a final version of the document
+content before taking a final pass through and considering line breaks
+(and page breaks). Most people do not consider LaTeX as a word
+processor, because it does not show the output instantly. However
+differing the output encourages the user to put off until the end
+formatting adjustments, and thus it prevents a lot of fiddling with
+breaks that will change anyway.
+@noindent
+Differing the output has other advantages: it enables to make no
+compromise about the typesetting, which ensures that what you see it
+exactly what you get, and it also helps authors concentrate their mind
+on either writing or reading rather than distract it by doing both a the
+same time.
+@end ignore
@menu
* \\:: Start a new line.
@@ -8401,14 +8601,15 @@ rubber length (@pxref{Lengths}) and can be negative. The text before
the line break is set at its normal length, that is, it is not stretched
to fill out the line width. This command is fragile (@pxref{\protect}).
-The starred form, @code{\\*}, tells @LaTeX{} not to start a new page
-between the two lines, by issuing a @code{\nobreak}.
-
@example
\title@{My story: \\[0.25in]
a tale of woe@}
@end example
+@noindent
+The starred form, @code{\\*}, tells @LaTeX{} not to start a new page
+between the two lines, by issuing a @code{\nobreak}.
+
Explicit line breaks in the main text body are unusual in @LaTeX{}. In
particular, don't start new paragraphs with @code{\\}. Instead leave a
blank line between the two paragraphs. And don't put in a sequence of
@@ -8514,9 +8715,9 @@ The indents are paragraph indents.
@cindex new line, starting (paragraph mode)
In ordinary text, this ends a line in a way that does not right-justify
-the line, so the prior text is not stretched. That is, in paragraph mode
-(@pxref{Modes}), the @code{\newline} command is equivalent to
-double-backslash (@pxref{\\}). This command is fragile
+it, so the text before the end of line is not stretched. That is, in
+paragraph mode (@pxref{Modes}), the @code{\newline} command is
+equivalent to double-backslash (@pxref{\\}). This command is fragile
(@pxref{\protect}).
However, the two commands are different inside a @code{tabular} or
@@ -8530,7 +8731,7 @@ This will print @samp{Name:} and @samp{Address:} as two lines in a
single cell of the table.
@example
-\begin@{tabular@}@{p@{1in@}@{\hspace@{2in@}@}p@{1in@}@}
+\begin@{tabular@}@{p@{1in@}@@@{\hspace@{2in@}@}p@{1in@}@}
Name: \newline Address: &Date: \\ \hline
\end@{tabular@}
@end example
@@ -8547,8 +8748,9 @@ The @samp{Date:} will be baseline-aligned with @samp{Name:}.
Tell @LaTeX{} that it may hyphenate the word at that point. When you
insert @code{\-} commands in a word, the word will only be hyphenated at
-those points and not at any of the hyphenation points that @LaTeX{}
-might otherwise have chosen. This command is robust (@pxref{\protect}).
+those points and not at any of the other hyphenation points that
+@LaTeX{} might otherwise have chosen. This command is robust
+(@pxref{\protect}).
@LaTeX{} is good at hyphenating and usually finds most of the correct
hyphenation points, while almost never using an incorrect one. The
@@ -8575,9 +8777,9 @@ Commenting out the third line and uncommenting the fourth makes a much
better fit.
The @code{\-} command only allows @LaTeX{} to break there, it does not
-require that it break there. You can insist on a split with something
-like @code{Hef-\linebreak feron}. Of course, if you later change the
-text then this forced break may look very odd, so this approach requires
+require that it break there. You can force a split with something like
+@code{Hef-\linebreak feron}. Of course, if you later change the text
+then this forced break may look very odd, so this approach requires
care.
@@ -8598,10 +8800,10 @@ Handle word changes around hyphens. This command is not often used in
If a line break occurs at the point where @code{\discretionary} appears
then @TeX{} puts @var{pre-break} at the end of the current line and puts
@var{post-break} at the start of the next line. If there is no line
-break here then @TeX{} puts @var{no-break}
+break here then @TeX{} puts @var{no-break}.
In @samp{difficult} the three letters @code{ffi} form a ligature. But
-@TeX{} can nonetheless break between the two f's with this.
+@TeX{} can nonetheless break between the two @samp{f}'s with this.
@example
di\discretionary@{f-@}@{fi@}@{ffi@}cult
@@ -8610,6 +8812,47 @@ di\discretionary@{f-@}@{fi@}@{ffi@}cult
Note that users do not have to do this. It is typically handled
automatically by @TeX{}'s hyphenation algorithm.
+@c xxx TODO, complete this node, see LaTeX-fr (copied & pasted below,
+@c with accented letter escaped)
+
+@ignore
+@c Les arguments de @code{\discretionary} ne peuvent contenir que des
+@c caract@`eres, des bo@^{@dotless{i}}tes ou des cr@'enages.
+@c
+@c La commande @code{\discretionary} permet de contr@^oler
+@c finement la c@'esure dans les cas o@`u ne suffisent ni le contr@^ole standard
+@c de la c@'esure fait l'algorithme de c@'esure de @TeX{} et les r@`egles de
+@c c@'esures donn@'ees par les paquetages de gestion linguistiques, ni les
+@c moyens de contr@^ole explicites offerts par les commandes
+@c @code{\hyphenation} (@pxref{\hyphenation}) et @code{\-} (@pxref{\-
+@c (hyphenation),\- (c@'esure @`a gr@'e)}).
+@c
+@c L'usage typique de @code{\discretionary} est par exemple de contr@^oler la
+@c c@'esure au sein d'une formule math@'ematique en mode ligne (voir aussi
+@c @ref{Math miscellany,Miscellan@'ees math@'ematique (entr@'ee \*)}). Ci-dessous
+@c un exemple de contr@^ole de la c@'esure au sein d'une adresse r@'eticulaire,
+@c o@`u l'on autorise la c@'esure sur les obliques mais en utilisant une
+@c contr'oblique violette en lieu de trait d'union@tie{}:
+@c
+@c @example
+@c \documentclass@{article@}
+@c \usepackage[T1]@{fontenc@}
+@c \usepackage[utf8]@{inputenc@}
+@c \usepackage@{xcolor@}
+@c \usepackage@{hyperref@}
+@c \usepackage@{french@}
+@c \newcommand*\DiscrSlash@{\discretionary@{\mbox@{\textcolor
+@c @{purple@}@{\textbackslash@}@}@}@{/@}@{/@}@}
+@c \begin@{document@}
+@c Allez donc @`a \href@{http://une/tr\%c3\%A8s/tr\%c3\%A8s/longue%
+@c /mais/vraiment/tr\%c3\%A8s/longue/adresse/r\%C3\%A9ticulaire%
+@c /index.html@}@{http://une\DiscrSlash tr@`es\DiscrSlash tr@`es\DiscrSlash
+@c longue\DiscrSlash mais\DiscrSlash vraiment\DiscrSlash
+@c tr@`es\DiscrSlash longue\DiscrSlash adresse\DiscrSlash
+@c r@'eticulaire\DiscrSlash index.html@}
+@c \end@{document@}
+@c @end example
+@end ignore
@node \fussy & \sloppy
@section @code{\fussy} & @code{\sloppy}
@@ -8625,10 +8868,10 @@ words, at the cost of an occasional overfull box. Conversely,
spacing.
The default is @code{\fussy}. Line breaking in a paragraph is
-controlled by whichever declaration is current at the blank line, or
-@code{\par}, or displayed equation ending that paragraph. So to affect
-the line breaks, include that paragraph-ending material in the scope of
-the command.
+controlled by whichever declaration is current at the end of the
+paragraph, i.e., at the blank line or @code{\par} or displayed
+equation ending that paragraph. So to affect the line breaks, include
+that paragraph-ending material in the scope of the command.
@menu
* sloppypar:: Environment version of \sloppy command.
@@ -8638,7 +8881,7 @@ the command.
@node sloppypar
@subsection @code{sloppypar}
-@findex sloppypar
+@EnvIndex{sloppypar}
@cindex sloppypar environment
Synopsis:
@@ -8694,7 +8937,12 @@ Here is an example:
@end example
Use lowercase letters. @TeX{} will only hyphenate if the word matches
-exactly. Multiple @code{\hyphenation} commands accumulate.
+exactly, no inflections are tried. Multiple @code{\hyphenation}
+commands accumulate.
+
+@c xx Re-align on LaTeX-fr which also mentions fontenc, and that
+@c babel/polyglossia already load hyphenation patterns, and you have to
+@c declare only non existing words.
@node \linebreak & \nolinebreak
@@ -8721,12 +8969,12 @@ or one of these.
@end example
Encourage or discourage a line break. The optional @var{zero-to-four}
-is an integer that allows you to soften the instruction. The default is
-4, so that without the optional argument these commands entirely force
-or prevent the break. But for instance, @code{\nolinebreak[1]} is a
-suggestion that another place may be better. The higher the number, the
-more insistent the request. Both commands are fragile
-(@pxref{\protect}).
+is an integer lying between 0 and 4 that allows you to soften the
+instruction. The default is 4, so that without the optional argument
+these commands entirely force or prevent the break. But for instance,
+@code{\nolinebreak[1]} is a suggestion that another place may be better.
+The higher the number, the more insistent the request. Both commands
+are fragile (@pxref{\protect}).
Here we tell @LaTeX{} that a good place to put a linebreak is after the
standard legal text.
@@ -8738,11 +8986,10 @@ underrepresented groups.
@end example
When you issue @code{\linebreak}, the spaces in the line are stretched
-out so that it extends to the right margin. @xref{\\}
+out so that the break point reaches the right margin. @xref{\\}
and@tie{}@ref{\newline}, to have the spaces not stretched out.
-
@node Page breaking
@chapter Page breaking
@@ -8978,6 +9225,14 @@ this can cause you to get @samp{Underfull \vbox (badness 10000) has
occurred while \output is active}. @xref{\newpage}, for a command that
does not have these effects.
+@findex \samepage
+@findex samepage @r{environment}
+(There is an obsolete declaration @code{\samepage}, which tries to only
+allow a break between two paragraphs. There is a related environment
+@code{samepage}, also obsolete. Neither of these work reliably. For
+more on keeping material on the same page, see the FAQ entry
+@url{https://texfaq.org/FAQ-nopagebrk}.)
+
@node Footnotes
@chapter Footnotes
@@ -9075,6 +9330,7 @@ Change the rule with something like this.
@item \footnotesep
@anchor{footnote footnotesep}
+@cindex strut
The height of the strut placed at the beginning of the footnote
(@pxref{\strut}). By default, this is set to the normal strut for
@code{\footnotesize} fonts (@pxref{Font sizes}), therefore there is no
@@ -9120,9 +9376,9 @@ footnote mark. This command can be used in inner paragraph mode
(@pxref{Modes}).
If you use @code{\footnotemark} without the optional argument then it
-increments the footnote counter but if you use the optional @var{number}
-then it does not. The next example produces several consecutive footnote
-markers referring to the same footnote.
+increments the @code{footnote} counter, but if you use the optional
+@var{number} then it does not. The next example produces several
+consecutive footnote markers referring to the same footnote.
@example
The first theorem\footnote@{Due to Gauss.@}
@@ -9130,10 +9386,11 @@ and the second theorem\footnotemark[\value@{footnote@}]
and the third theorem.\footnotemark[\value@{footnote@}]
@end example
-If there are intervening footnotes then you must remember the value of the
-common mark. This example gives the same institutional affiliation to
-both the first and third authors (@code{\thanks} is a version of
-@code{footnote}), by-hand giving the number of the footnote.
+If there are intervening footnotes then you must remember the value of
+the number of the common mark. This example gives the same
+institutional affiliation to both the first and third authors
+(@code{\thanks} is a version of @code{\footnote}), by-hand giving the
+number of the footnote.
@example
\title@{A Treatise on the Binomial Theorem@}
@@ -9159,7 +9416,7 @@ Therefore, anyone who can manage a crocodile is not a baby.
@PkgIndex{cleveref}
@PkgIndex{hyperref}
-This example accomplishes the same by using the package @file{cleveref}.
+This example accomplishes the same by using the package @package{cleveref}.
@c from SE user Jake http://tex.stackexchange.com/a/10116/339
@example
@@ -9172,7 +9429,7 @@ But the key lemma is from Tinker.\cref@{fn:TE@}
@end example
@PkgIndex{hyperref}
-It will work with the package @file{hyperref}.
+It will work with the package @package{hyperref}.
@node \footnotetext
@@ -9245,7 +9502,7 @@ the footnote text does not appear. The solution is to use a
\textit@{HMS Polychrest@} &Post Captain \\
\textit@{HMS Lively@} &Post Captain \\
\textit@{HMS Surprise@} &A number of books\footnote@{%
- Starting with HMS Surprise.@}
+ Starting with \textit@{HMS Surprise@}.@}
\end@{tabular@}
\end@{minipage@}
\end@{center@}
@@ -9282,8 +9539,9 @@ part of the regular footnote sequence, use the @code{\footnotemark} and
\end@{center@}
@end example
+@PkgIndex{tablefootnote}
For a floating @code{table} environment (@pxref{table}), use the
-@file{tablefootnote} package.
+@package{tablefootnote} package.
@example
\usepackage@{tablefootnote@} % in preamble
@@ -9314,7 +9572,7 @@ other footnotes.
@PkgIndex{bigfoot}
Particularly in the humanities, authors can have multiple classes of
footnotes, including having footnotes of footnotes. The package
-@file{bigfoot} extends @LaTeX{}'s default footnote mechanism in many
+@package{bigfoot} extends @LaTeX{}'s default footnote mechanism in many
ways, including allow these two, as in this example.
@example
@@ -9324,7 +9582,7 @@ ways, including allow these two, as in this example.
...
The third theorem is a partial converse of the
second.\footnotefrom@{%
- First noted in Wilson.\footnote@{Second edition only.@}@}
+ Noted in Wilson.\footnote@{Second edition only.@}@}
@end example
@@ -9400,8 +9658,8 @@ These are the parameters:
@table @var
@item cmd
-Required; the command name. It must begin with a backslash, @code{\},
-and must not begin with the four letter string @code{\end}. For
+Required; @code{\@var{cmd}} is the command name. It must begin with a backslash, @code{\},
+and must not begin with the four character string @code{\end}. For
@code{\newcommand}, it must not be already defined. For
@code{\renewcommand}, this name must already be defined.
@@ -9441,10 +9699,11 @@ argument and you don't exercise the option).
@end table
-@TeX{} ignores spaces in the source following an alphabetic control
-sequence, as in @samp{\cmd }. If you actually want a space there, one
-solution is to type @code{@{@}} after the command (@samp{\cmd@{@} }, and
-another solution is to use an explicit control space (@samp{\cmd\ }).
+@TeX{} ignores blanks in the source following a control word
+(@pxref{Control sequences}), as in @samp{\cmd }. If you actually want a
+space there, one solution is to type @code{@{@}} after the command
+(@samp{\cmd@{@} }, and another solution is to use an explicit control
+space (@samp{\cmd\ }).
A simple example of defining a new command:
@code{\newcommand@{\RS@}@{Robin Smith@}} results in @code{\RS} being
@@ -9457,8 +9716,8 @@ defined. Or name \end... illegal, see p.192 of the manual}. If you try
to redefine a command and the name has not yet been used then you get
something like @samp{LaTeX Error: \hank undefined}.
-Here the first command definition has no arguments, and the second has
-one required argument.
+Here the first definition creates a command with no arguments, and the
+second, one with one required argument.
@example
\newcommand@{\student@}@{Ms~O'Leary@}
@@ -9467,7 +9726,7 @@ one required argument.
@noindent
Use the first as in @code{I highly recommend \student@{@} to you}. The
-second has a variable, so that @code{\defref@{def:basis@}} expands to
+second has a variable argument, so that @code{\defref@{def:basis@}} expands to
@code{Definition~\ref@{def:basis@}}, which ultimately expands to
something like @samp{Definition~3.14}.
@@ -9514,6 +9773,50 @@ the words @samp{met the} would incorrectly be in italics. The solution
is to put another pair of braces inside the definition:
@code{\newcommand@{\shipname@}[1]@{@{\it #1@}@}}.
+@menu
+* Control sequences:: Control sequence, control word and control symbol.
+@end menu
+
+@node Control sequences
+@subsection Control sequence, control word and control symbol
+
+When reading input @TeX{} converts the sequences of read characters into
+a sequence of @dfn{tokens}. When @TeX{} sees a backslash @code{\}, it
+will handle the following characters in a special way in order to make a
+@dfn{control sequence} token.
+
+The control sequences fall into two categories:
+
+@itemize
+@item
+@dfn{control word}, when the control sequence is gathered from a
+@code{\} followed by at least one ASCII letter, followed by at least one
+blank. The sequence of at least one ASCII letter is called the
+@dfn{control sequence name}.
+@item
+@dfn{control symbol}, when the control sequence is gathered from a
+@code{\} followed by one non-letter character.
+@end itemize
+
+Blanks after a control word are ignored and do not produce any
+whitespace in the output (@pxref{\newcommand & \renewcommand} and
+@ref{\(SPACE)}).
+
+Just as the @code{\relax} command does nothing, the following will print
+@samp{Hello!}@inlinefmt{tex,---where we used visible spaces
+@samp{@visiblespace{}} instead of blanks,}@inlinefmt{info,---if you use
+the Emacs info viewer@comma{} turn on the whitespace-mode minor mode to
+see the trailing spaces}:
+
+@example
+Hel\relax@visiblespace{}@visiblespace{}@visiblespace{}
+@visiblespace{}@visiblespace{}@visiblespace{}lo!
+@end example
+
+@noindent
+This is because blanks after @code{\relax}, including the newline are
+ignored, and blanks at the beginning of a line are also ignored
+(@pxref{Leading blanks}).
@node \providecommand
@section @code{\providecommand}
@@ -9526,12 +9829,12 @@ is to put another pair of braces inside the definition:
Synopses, one of:
@example
-\providecommand@{@var{cmd}@}@{@var{defn}@}
-\providecommand@{@var{cmd}@}[@var{nargs}]@{@var{defn}@}
-\providecommand@{@var{cmd}@}[@var{nargs}][@var{optargdefault}]@{@var{defn}@}
-\providecommand*@{@var{cmd}@}@{@var{defn}@}
-\providecommand*@{@var{cmd}@}[@var{nargs}]@{@var{defn}@}
-\providecommand*@{@var{cmd}@}[@var{nargs}][@var{optargdefault}]@{@var{defn}@}
+\providecommand@{\@var{cmd}@}@{@var{defn}@}
+\providecommand@{\@var{cmd}@}[@var{nargs}]@{@var{defn}@}
+\providecommand@{\@var{cmd}@}[@var{nargs}][@var{optargdefault}]@{@var{defn}@}
+\providecommand*@{\@var{cmd}@}@{@var{defn}@}
+\providecommand*@{\@var{cmd}@}[@var{nargs}]@{@var{defn}@}
+\providecommand*@{\@var{cmd}@}[@var{nargs}][@var{optargdefault}]@{@var{defn}@}
@end example
Defines a command, as long as no command of this name already exists.
@@ -9545,8 +9848,8 @@ This example
@example
\providecommand@{\myaffiliation@}@{Saint Michael's College@}
-\providecommand@{\myaffiliation@}@{Saint Michael's College@}
->From \myaffiliation.
+\providecommand@{\myaffiliation@}@{Lyc\'ee Henri IV@}
+From \myaffiliation.
@end example
@noindent
@@ -9688,11 +9991,11 @@ standard practice is not to insert any such spaces.
@PkgIndex{suffix}
@PkgIndex{xparse}
There are two alternative ways to accomplish the work of
-@code{\@@ifstar}. (1)@tie{}The @file{suffix} package allows the
+@code{\@@ifstar}. (1)@tie{}The @package{suffix} package allows the
construct @code{\newcommand\mycommand@{@var{unstarred-variant}@}}
followed by
@code{\WithSuffix\newcommand\mycommand*@{@var{starred-variant}@}}.
-(2)@tie{}@LaTeX{} provides the @file{xparse} package, which allows
+(2)@tie{}@LaTeX{} provides the @package{xparse} package, which allows
this code:
@example
@@ -9767,15 +10070,17 @@ defined.}
Synopsis:
@example
-\newlength@{@var{arg}@}
+\newlength@{\@var{len}@}
@end example
Allocate a new length register (@pxref{Lengths}). The required argument
-@var{arg} must begin with a backslash, @code{\}. The new register holds
-rubber lengths such as @code{72.27pt} or @code{1in plus.2in minus.1in}
-(a @LaTeX{} length register is what plain @TeX{} calls a @code{skip}
-register). The initial value is zero. The control sequence
-@code{\@var{arg}} must not be already defined.
+@code{\@var{len}} has to be a control sequence (@pxref{Control
+sequences}), and as such must begin with a backslash, @code{\} under
+normal circumstances. The new register holds rubber lengths such as
+@code{72.27pt} or @code{1in plus.2in minus.1in} (a @LaTeX{} length
+register is what plain @TeX{} calls a @code{skip} register). The
+initial value is zero. The control sequence @code{\@var{len}} must not
+be already defined.
An example:
@@ -9784,7 +10089,7 @@ An example:
@end example
If you forget the backslash then you get @samp{Missing control sequence
-inserted}. If the command sequence already exists then you get
+inserted}. If the control sequence already exists then you get
something like @samp{LaTeX Error: Command \graphichgt already defined.
Or name \end... illegal, see p.192 of the manual}.
@@ -10256,11 +10561,12 @@ or
\ignorespacesafterend
@end example
-Both commands cause @LaTeX{} to ignore spaces after the end of the
-command up until the first non-space character. The first is a command
-from plain @TeX{}, and the second is @LaTeX{}-specific.
+Both commands cause @LaTeX{} to ignore blanks (that is, characters of
+catcode@tie{}10 such as space or tabulation) after the end of the
+command up to the first box or non-blank character. The first is a
+command from plain @TeX{}, and the second is @LaTeX{}-specific.
-The @code{ignorespaces} is often used when defining commands via
+The @code{\ignorespaces} is often used when defining commands via
@code{\newcommand}, or @code{\newenvironment}, or @code{\def}. The
example below illustrates. It allows a user to show the points values
for quiz questions in the margin but it is inconvenient because, as
@@ -10283,7 +10589,7 @@ The solution is to change to this.
\makebox[0pt]@{\makebox[10em][l]@{#1~pts@}@}\ignorespaces@}
@end example
-A second example shows spaces being removed from the front of text. The
+A second example shows blanks being removed from the front of text. The
commands below allow a user to uniformly attach a title to names. But,
as given, if a title accidentally starts with a space then
@code{\fullname} will reproduce that.
@@ -10307,7 +10613,7 @@ at the end of the @var{begin} clause, as in
@code{\begin@{newenvironment@}@{@var{env
name}@}@{... \ignorespaces@}@{...@}}.
-To strip spaces off the end of an environment use
+To strip blanks off the end of an environment use
@code{\ignorespacesafterend}. An example is that this will show a much
larger vertical space between the first and second environments than
between the second and third.
@@ -10335,6 +10641,7 @@ inconvenient. The solution is to change to
@section xspace package
@findex \xspace
+@PkgIndex{xspace}
@cindex spaces, ignore around commands
@cindex commands, ignore spaces
@@ -10346,13 +10653,15 @@ Synopsis:
\newcommand@{...@}@{...\xspace@}
@end example
-The @code{\xspace} macro, when used at the end of a command, adds a
-space unless the command is followed by certain punctuation characters.
+The @code{\xspace} macro, when used at the end of a command definition,
+adds a space unless the command is followed by certain punctuation
+characters.
-After a command name that uses letters (as opposed to single character
-command names using non-letters such as @code{\$}), @TeX{} gobbles white
-space. Thus, in the first sentence below, the output has @samp{Vermont}
-placed snugly against the period, without any intervening space.
+After a command control sequence that is a control word (@pxref{Control
+sequences}, as opposed to control symbols such as @code{\$}), @TeX{}
+gobbles blank characters. Thus, in the first sentence below, the output
+has @samp{Vermont} placed snugly against the period, without any
+intervening space.
@example
\newcommand@{\VT@}@{Vermont@}
@@ -10360,15 +10669,16 @@ Our college is in \VT .
The \VT@{@} summers are nice.
@end example
-But because of the gobbling, the second sentence needs the dummy curly
+But because of the gobbling, the second sentence needs the empty curly
braces or else there would be no space separating @samp{Vermont} from
-@samp{summers}. (Many authors instead instead use a backslash-space
+@samp{summers}. (Many authors instead use a backslash-space
@code{\ } for this. @xref{\(SPACE)}.)
-The @file{xspace} package provides @code{\xspace}. It is for writing
-commands which are designed to be used mainly in text. It inserts a
-space after that command unless what immediately follows is in a list of
-exceptions. In this example, the dummy braces are not needed.
+The @package{xspace} package provides @code{\xspace}. It is for writing
+commands which are designed to be used mainly in text. It must be place
+at the very end of the definition of these commands. It inserts a space
+after that command unless what immediately follows is in a list of
+exceptions. In this example, the empty braces are not needed.
@example
\newcommand@{\VT@}@{Vermont\xspace@}
@@ -10379,16 +10689,17 @@ Our college is in \VT .
The default exception list contains the characters @code{,.'/?;:!~-)},
the open curly brace and the backslash-space command discussed above,
and the commands @code{\footnote} or @code{\footnotemark}. Add to that
-list as with @code{\xspaceaddexceptions@{\myfni \myfnii@}} and remove
-from that list as with @code{\xspaceremoveexception@{!@}}.
+list as with @code{\xspaceaddexceptions@{\myfni \myfnii@}} which adds
+@code{\myfni} and@tie{}@code{\myfnii} to the list, and remove from that
+list as with @code{\xspaceremoveexception@{!@}}.
@c David Carlisle https://tex.stackexchange.com/a/86620/339
A comment: many experts prefer not to use @code{\xspace}. Putting it in
a definition means that the command will usually get the spacing right.
-But it isn't easy to predict when to enter dummy braces because
+But it isn't easy to predict when to enter empty braces because
@code{\xspace} will get it wrong, such as when it is followed by another
command, and so @code{\xspace} can make editing material harder and more
-error-prone than instead always remembering the dummy braces.
+error-prone than instead always inserting the empty braces.
@node Counters
@@ -10407,6 +10718,23 @@ track of the chapter number.
Below is a list of the counters used in @LaTeX{}'s standard document
classes to control numbering.
+@findex part counter
+@findex chapter counter
+@findex section counter
+@findex subsection counter
+@findex subsubsection counter
+@findex paragraph counter
+@findex subparagraph counter
+@findex page counter
+@findex equation counter
+@findex figure counter
+@findex table counter
+@findex footnote counter
+@findex mpfootnote counter
+@findex enumi counter
+@findex enumii counter
+@findex enumiii counter
+@findex enumiv counter
@example
part paragraph figure enumi
chapter subparagraph table enumii
@@ -10485,7 +10813,7 @@ warning but @LaTeX{} does not output anything.
Here are the symbols:
-@multitable @columnfractions .10 .30 .30 .30
+@multitable @columnfractions .11 .30 .30 .29
@headitem Number@tab Name@tab Command@tab Symbol
@item
1@tab asterisk@tab@code{\ast}@tab@iftexthenelse{@math{\ast},*}
@@ -10694,9 +11022,9 @@ not influence references; that is, it does not define the current
@LaTeX{} defines the counter @code{\day} for the day of the month
(nominally with value between 1 and 31), @code{\month} for the month of
-the year (nominally with value between 1 and 12), and year @code{\year}.
-When @TeX{} starts up, they are set from the current values on the
-system. The related command @code{\today} produces a string
+the year (nominally with value between 1 and 12), and @code{\year} for
+the year. When @TeX{} starts up, they are set from the current values
+on the system. The related command @code{\today} produces a string
representing the current day (@pxref{\today}).
They counters are not updated as the job progresses so in principle they
@@ -10711,6 +11039,8 @@ check:
gives no error or warning and results in the output @samp{-2, -4} (the
bogus month value produces no output).
+@xref{Command line input}, to force the date to a given value from the
+command line.
@node Lengths
@chapter Lengths
@@ -10827,10 +11157,10 @@ the page.
\end@{minipage@}
@end example
-@TeX{} actually has three levels of infinity for glue components:
-@code{fil}, @code{fill}, and @code{filll}. The later ones are more
-infinite than the earlier ones. Ordinarily document authors only use
-the middle one (@pxref{\hfill} and @pxref{\vfill}).
+@TeX{} has three levels of infinity for glue components: @code{fil},
+@code{fill}, and @code{filll}. The later ones are more infinite than
+the earlier ones. Ordinarily document authors only use the middle one
+(@pxref{\hfill} and @pxref{\vfill}).
Multiplying a rubber length by a number turns it into a rigid length, so
that after @code{\setlength@{\ylength@}@{1in plus 0.2in@}} and
@@ -10846,7 +11176,6 @@ that after @code{\setlength@{\ylength@}@{1in plus 0.2in@}} and
* \settowidth:: Set a length to the width of something.
* \stretch:: Add infinite stretchability.
* Expressions:: Compute with lengths and integers.
-@c * Predefined lengths:: Lengths that are, like, predefined.
@end menu
@@ -10858,95 +11187,96 @@ that after @code{\setlength@{\ylength@}@{1in plus 0.2in@}} and
@TeX{} and @LaTeX{} know about these units both inside and outside of
math mode.
-@table @code
+@ftable @code
@item pt
-@findex pt
@cindex point
@anchor{units of length pt}
-Point, 1/72.27 inch. The conversion to metric units
-is 1@dmn{point} = 2.845@dmn{mm} = .2845@dmn{cm}.
+Point, 1/72.27 inch. The (approximate) conversion to metric units
+is 1@dmn{point} = .35146@dmn{mm} = .035146@dmn{cm}.
@item pc
@cindex pica
-@findex pc
@anchor{units of length pc}
Pica, 12 pt
@item in
-@findex in
-@findex inch
+@cindex inch
@anchor{units of length in}
-Inch, 72.27 pt
+Inch, 72.27 pt
-@item bp
-@findex bp
+@item bp
@cindex big point
+@cindex PostScript point
@anchor{units of length bp}
Big point, 1/72 inch. This length is the definition of a point in
PostScript and many desktop publishing systems.
-@item cm
-@cindex centimeter
-@findex cm
-@anchor{units of length cm}
-Centimeter
-
@item mm
@cindex millimeter
-@findex mm
@anchor{units of length mm}
-Millimeter
+Millimeter, 2.845 pt
+
+@item cm
+@cindex centimeter
+@anchor{units of length cm}
+Centimeter, 10 mm
@item dd
@cindex didot point
-@findex dd
@anchor{units of length dd}
Didot point, 1.07 pt
@item cc
@cindex cicero
-@findex cc
@anchor{units of length cc}
Cicero, 12 dd
@item sp
@cindex scaled point
-@findex sp
@anchor{units of length sp}
Scaled point, 1/65536 pt
-@end table
+@end ftable
+
+Three other units are defined according to the current font, rather
+than being an absolute dimension.
-@cindex ex
+@ftable @code
+@item ex
@cindex x-height
-@findex ex
+@cindex ex
+@anchor{Lengths/ex}
+@anchor{units of length ex}
+The x-height of the current font @dfn{ex}, traditionally the
+height of the lowercase letter x, is often used for vertical
+lengths.
+
+@item em
@cindex m-width
@cindex em
-@findex em
@anchor{Lengths/em}
-@anchor{Lengths/en}
-@anchor{Lengths/ex}
@anchor{units of length em}
-@anchor{units of length en}
-@anchor{units of length ex}
-Two other lengths that are often used are values set by the designer of
-the font. The x-height of the current font @dfn{ex}, traditionally the
-height of the lowercase letter x, is often used for vertical
-lengths. Similarly @dfn{em}, traditionally the width of the capital
-letter M, is often used for horizontal lengths (there is also
-@code{\enspace}, which is @code{0.5em}). Use of these can help make a
-definition work better across font changes. For example, a definition
-of the vertical space between list items given as
-@code{\setlength@{\itemsep@}@{1ex plus 0.05ex minus 0.01ex@}} is more
-likely to still be reasonable if the font is changed than a definition
-given in points.
+Similarly @dfn{em}, traditionally the width of the capital
+letter M, is often used for horizontal lengths. This is also often
+the size of the current font, e.g., a nominal 10@dmn{pt} font will
+have 1@dmn{em} = 10@dmn{pt}. @LaTeX{} has several commands to produce
+horizontal spaces based on the em (@pxref{\enspace & \quad & \qquad}).
+@item mu
@cindex mu, math unit
-@findex mu
-In math mode, many definitions are expressed in terms of the math unit
-@dfn{mu} given by 1 em = 18 mu, where the em is taken from the current
-math symbols family. @xref{Spacing in math mode}.
+@anchor{units of length mu}
+Finally, in math mode, many definitions are expressed in terms
+of the math unit @dfn{mu}, defined by 1@dmn{em} = 18@dmn{mu}, where the
+em is taken from the current math symbols family. @xref{Spacing in
+math mode}.
+@end ftable
+
+Using these units can help make a definition work better across font
+changes. For example, a definition of the vertical space between list
+items given as @code{\setlength@{\itemsep@}@{1ex plus 0.05ex minus
+0.01ex@}} is more likely to still be reasonable if the font is changed
+than a definition given in points.
@node \setlength
@section @code{\setlength}
@@ -10957,14 +11287,15 @@ math symbols family. @xref{Spacing in math mode}.
Synopsis:
@example
-\setlength@{@var{len}@}@{@var{amount}@}
+\setlength@{\@var{len}@}@{@var{amount}@}
@end example
-Set the length @var{len} to @var{amount}. The length name @var{len}
-must begin with a backslash, @code{\}. The @code{amount} can be a
-rubber length (@pxref{Lengths}). It can be positive, negative or zero,
-and can be in any units that @LaTeX{} understands (@pxref{Units of
-length}).
+Set the length \@var{len} to @var{amount}. The length name
+@code{\@var{len}} has to be a control sequence (@pxref{Control
+sequences}), and as such must begin with a backslash, @code{\} under
+normal circumstances. The @var{amount} can be a rubber length
+(@pxref{Lengths}). It can be positive, negative or zero, and can be in
+any units that @LaTeX{} understands (@pxref{Units of length}).
Below, with @LaTeX{}'s defaults the first paragraph will be indented
while the second will not.
@@ -10976,14 +11307,12 @@ I told the doctor I broke my leg in two places.
He said stop going to those places.
@end example
-If you did not declare @var{len} with @code{\newlength}, for example if
-you mistype the above as
+If you did not declare \@var{len} with @code{\newlength}, for example if
+you mistype it as in
@code{\newlength@{\specparindent@}\setlength@{\sepcparindent@}@{...@}},
then you get an error like @samp{Undefined control sequence. <argument>
\sepcindent}. If you omit the backslash at the start of the length name
-then you get an error like @samp{Missing number, treated as zero. <to be
-read again> \relax l.19 \setlength@{specparindent@}@{0.6\parindent@}}
-
+then you get an error like @samp{Missing number, treated as zero.}.
@node \addtolength
@section @code{\addtolength}
@@ -10994,14 +11323,15 @@ read again> \relax l.19 \setlength@{specparindent@}@{0.6\parindent@}}
Synopsis:
@example
-\addtolength@{@var{len}@}@{@var{amount}@}
+\addtolength@{\@var{len}@}@{@var{amount}@}
@end example
-Increment the length @var{len} by @var{amount}. The length name
-@var{len} begins with a backslash, @code{\}. The @code{amount} is a
-rubber length (@pxref{Lengths}). It can be positive, negative or zero,
-and can be in any units that @LaTeX{} understands (@pxref{Units of
-length}).
+Increment the length \@var{len} by @var{amount}. The length name
+@code{\@var{len}} has to be a control sequence (@pxref{Control
+sequences}), and as such must begin with a backslash, @code{\} under
+normal circumstances. The @var{amount} is a rubber length
+(@pxref{Lengths}). It can be positive, negative or zero, and can be in
+any units that @LaTeX{} understands (@pxref{Units of length}).
Below, if @code{\parskip} starts with the value @code{0pt plus 1pt}
@@ -11015,15 +11345,18 @@ Nurse: no change.
@noindent
then it has the value @code{1pt plus 1pt} for the second paragraph.
-If you did not declare the length @var{len} with @code{\newlength}, if
-for example you mistype the above as
+If you did not declare \@var{len} with @code{\newlength}, for example if
+you mistype it as in
+@code{\newlength@{\specparindent@}\addtolength@{\sepcparindent@}@{...@}},
+then you get an error like @samp{Undefined control sequence. <argument>
+\sepcindent}. If the @var{amount} uses some length that has not been
+declared, for instance if for example you mistype the above as
@code{\addtolength@{\specparindent@}@{0.6\praindent@}}, then you get
something like @samp{Undefined control sequence. <argument> \praindent}.
-If you leave off the backslash at the start of @var{len}, as in
+If you leave off the backslash at the start of \@var{len}, as in
@code{\addtolength@{parindent@}@{1pt@}}, then you get something like
@samp{You can't use `the letter p' after \advance}.
-
@node \settodepth
@section @code{\settodepth}
@@ -11032,14 +11365,15 @@ If you leave off the backslash at the start of @var{len}, as in
Synopsis:
@example
-\settodepth@{@var{len}@}@{@var{text}@}
+\settodepth@{\@var{len}@}@{@var{text}@}
@end example
-Set the length @var{len} to the depth of box that @LaTeX{} gets on
-typesetting the @var{text} argument. The length name @var{len} must
-begin with a backslash, @code{\}.
+Set the length \@var{len} to the depth of box that @LaTeX{} gets on
+typesetting the @var{text} argument. The length name @code{\@var{len}}
+has to be a control sequence (@pxref{Control sequences}), and as such
+must begin with a backslash, @code{\} under normal circumstances.
-This will show how low the character descenders go.
+This will print how low the character descenders go.
@example
\newlength@{\alphabetdepth@}
@@ -11047,10 +11381,10 @@ This will show how low the character descenders go.
\the\alphabetdepth
@end example
-If you did not set aside the length @var{len}, if for example you
+If you did not declare \@var{len} with @code{\newlength}, if for example you
mistype the above as @code{\settodepth@{\aplhabetdepth@}@{abc...@}},
then you get something like @samp{Undefined control sequence. <argument>
-\aplhabetdepth}. If you leave the backslash out of @var{len}, as in
+\aplhabetdepth}. If you leave the backslash out of \@var{len}, as in
@code{\settodepth@{alphabetdepth@}@{...@}} then you get something like
@samp{Missing number, treated as zero. <to be read again> \setbox}.
@@ -11063,14 +11397,15 @@ then you get something like @samp{Undefined control sequence. <argument>
Synopsis:
@example
-\settoheight@{@var{len}@}@{text@}
+\settoheight@{\@var{len}@}@{text@}
@end example
-Sets the length @var{len} to the height of box that @LaTeX{} gets on
-typesetting the @code{text} argument. The length name @var{len} must
-begin with a backslash, @code{\}.
+Sets the length \@var{len} to the height of box that @LaTeX{} gets on
+typesetting the @code{text} argument. The length name @code{\@var{len}}
+has to be a control sequence (@pxref{Control sequences}), and as such
+must begin with a backslash, @code{\} under normal circumstances.
-This will show how high the characters go.
+This will print how high the characters go.
@example
\newlength@{\alphabetheight@}
@@ -11078,11 +11413,11 @@ This will show how high the characters go.
\the\alphabetheight
@end example
-If no such length @var{len} has been declared with @code{\newlength}, if
+If no such length \@var{len} has been declared with @code{\newlength}, if
for example you mistype as
@code{\settoheight@{\aplhabetheight@}@{abc...@}}, then you get something
like @samp{Undefined control sequence. <argument> \alphabetheight}. If
-you leave the backslash out of @var{len}, as in
+you leave the backslash out of \@var{len}, as in
@code{\settoheight@{alphabetheight@}@{...@}} then you get something like
@samp{Missing number, treated as zero. <to be read again> \setbox}.
@@ -11095,14 +11430,15 @@ you leave the backslash out of @var{len}, as in
Synopsis:
@example
-\settowidth@{@var{len}@}@{@var{text}@}
+\settowidth@{\@var{len}@}@{@var{text}@}
@end example
-Set the length @var{len} to the width of the box that @LaTeX{} gets on
-typesetting the @var{text} argument. The length name @var{len} must
-begin with a backslash, @code{\}.
+Set the length \@var{len} to the width of the box that @LaTeX{} gets on
+typesetting the @var{text} argument. The length name @code{\@var{len}}
+has to be a control sequence (@pxref{Control sequences}), and as such
+must begin with a backslash, @code{\} under normal circumstances.
-This measures the width of the lowercase ASCII alphabet.
+This prints the width of the lowercase ASCII alphabet.
@example
\newlength@{\alphabetwidth@}
@@ -11110,10 +11446,11 @@ This measures the width of the lowercase ASCII alphabet.
\the\alphabetwidth
@end example
-If no such length @var{len} has been set aside, if for example you
-mistype the above as @code{\settowidth@{\aplhabetwidth@}@{abc...@}},
-then you get something like @samp{Undefined control sequence. <argument>
-\aplhabetwidth}. If you leave the backslash out of @var{len}, as in
+If no such length \@var{len} has been declared with @code{\newlength},
+if for example you mistype the above as
+@code{\settowidth@{\aplhabetwidth@}@{abc...@}}, then you get something
+like @samp{Undefined control sequence. <argument> \aplhabetwidth}. If
+you leave the backslash out of \@var{len}, as in
@code{\settoheight@{alphabetwidth@}@{...@}} then you get something like
@samp{Missing number, treated as zero. <to be read again> \setbox}.
@@ -11249,10 +11586,11 @@ parentheses to be affected by a factor. So @code{\the\glueexpr 5pt plus
@TeX{} will coerce other numerical types in the same way as it does when
doing register assignment. Thus @code{\the\numexpr\dimexpr
1pt\relax\relax} will result in @samp{65536}, which is @code{1pt}
-converted to scaled points (@TeX{}'s internal unit) and then coerced
-into an integer. With a @code{\glueexpr} here, the stretch and shrink
-would be dropped. Going the other way, a @code{\numexpr} inside a
-@code{\dimexpr} or @code{\glueexpr} will need appropriate units, as in
+converted to scaled points (@pxref{units of length sp,@code{sp}},
+@TeX{}'s internal unit) and then coerced into an integer. With a
+@code{\glueexpr} here, the stretch and shrink would be dropped. Going
+the other way, a @code{\numexpr} inside a @code{\dimexpr} or
+@code{\glueexpr} will need appropriate units, as in
@code{\the\dimexpr\numexpr 1 + 2\relax pt\relax}, which produces
@samp{3.0pt}.
@@ -11280,8 +11618,8 @@ because it rounds @code{3/2} to @code{2}, while
@cindex paragraphs
To start a paragraph, just type some text. To end the current
-paragraph, put an empty line. This is three paragraphs, separated by
-two empty lines.
+paragraph, put an empty line. This is three paragraphs, the
+separation of which is made by two empty lines.
@example
It is a truth universally acknowledged, that a single man in possession
@@ -11296,15 +11634,35 @@ of some one or other of their daughters.
``have you heard that Netherfield Park is let at last?''
@end example
-The separator lines must be empty, including not containing a comment
-character, @code{%}.
+A paragraph separator is made of a sequence of at least one blank
+line, at least one of which is not terminated by a comment. A blank
+line is a line that is empty or made only of blank characters such as
+space or tab. Comments in source code are started with a @code{%} and
+span up to the end of line. In the following example the two columns
+are identical:
+
+@example
+\documentclass[twocolumn]@{article@}
+\begin@{document@}
+First paragraph.
+
+Second paragraph.
+\newpage
+First paragraph.
+
+ % separator lines may contain blank characters.
+
+Second paragraph.
+\end@{document@}
+@end example
+
Once @LaTeX{} has gathered all of a paragraph's contents it divides that
content into lines in a way that is optimized over the entire paragraph
(@pxref{Line breaking}).
There are places where a new paragraph is not permitted. Don't put a
-blank line in math mode (@pxref{Modes}); here the line before the
+blank line in math mode (@pxref{Modes}); here the blank line before the
@code{\end@{equation@}}
@example
@@ -11316,7 +11674,7 @@ blank line in math mode (@pxref{Modes}); here the line before the
@noindent
will get you the error @samp{Missing $ inserted}. Similarly, the blank
-line in this @code{section} argument
+line in this @code{\section} argument
@example
\section@{aaa
@@ -11343,8 +11701,8 @@ complete}.
@findex \par
@cindex paragraph, ending
-Synopsis (note that while reading the input @TeX{} converts two
-consecutive newlines to a @code{\par}):
+Synopsis (note that while reading the input @TeX{} converts any sequence
+of one or more blank lines to a @code{\par}, @ref{Making paragraphs}):
@example
\par
@@ -11362,18 +11720,18 @@ readability.
\whatCheatingIs\par\whatHappensWhenICatchYou@}
@end example
-In LR mode or a vertical mode the @code{\par} command does nothing but
-it terminates paragraph mode, switching @LaTeX{} to vertical mode
-(@pxref{Modes}).
+In LR mode the @code{\par} command does nothing and is ignored. In
+paragraph mode, the @code{\par} command terminates paragraph mode,
+switching @LaTeX{} to vertical mode (@pxref{Modes}).
You cannot use the @code{\par} command in a math mode. You also cannot
-use it in the argument of many commands, such as the @code{\section}
-command (@pxref{Making paragraphs} and @ref{\newcommand &
-\renewcommand}).
+use it in the argument of many commands, such as the sectioning
+commands, e.g.@: @code{\section} (@pxref{Making paragraphs} and
+@ref{\newcommand & \renewcommand}).
The @code{\par} command is not the same as the @code{\paragraph}
command. The latter is, like @code{\section} or @code{\subsection}, a
-sectioning unit used by the standard @LaTeX{} documents
+sectioning command used by the @LaTeX{} document standard classes
(@pxref{\subsubsection & \paragraph & \subparagraph}).
The @code{\par} command is not the same as @code{\newline} or the line
@@ -11463,7 +11821,7 @@ you may want to also set the length of spaces between paragraphs,
@PkgIndex{indentfirst}
Default @LaTeX{} styles have the first paragraph after a section that is
not indented, as is traditional typesetting in English. To change that,
-look on CTAN for the package @code{indentfirst}.
+look on CTAN for the package @package{indentfirst}.
@node \parindent & \parskip
@@ -11498,17 +11856,19 @@ For example, if this is put in the preamble:
The document will have paragraphs that are not indented, but instead
are vertically separated by about the height of a lowercase @samp{x}.
-In standard @LaTeX{} documents, the default value for @code{\parindent}
-in one-column documents is @code{15pt} when the default text size is
-@code{10pt}, @code{17pt} for @code{11pt}, and @code{1.5em} for
-@code{12pt}. In two-column documents it is @code{1em}. (These values
-are set before @LaTeX{} calls @code{\normalfont} so @code{em} is derived
-from the default font, Computer Modern. If you use a different font
-then to set @code{\parindent} in units matching that font, do
-@code{\AtBeginDocument@{\setlength@{\parindent@}@{1em@}@}}.)
+In @LaTeX{} standard class documents, the default value for
+@code{\parindent} in one-column documents is @code{15pt} when the
+default text size is @code{10pt}, @code{17pt} for @code{11pt}, and
+@code{1.5em} for @code{12pt}. In two-column documents it is @code{1em}.
+(These values are set before @LaTeX{} calls @code{\normalfont} so
+@code{em} is derived from the default font, Computer Modern. If you use
+a different font then to set @code{\parindent} to 1@dmn{em} matching
+that font, put
+@code{\AtBeginDocument@{\setlength@{\parindent@}@{1em@}@}} in the
+preamble.)
The default value for @code{\parskip} in @LaTeX{}'s standard document
-styles is @code{0pt plus1pt}.
+classes is @code{0pt plus1pt}.
@node Marginal notes
@@ -11664,53 +12024,25 @@ equivalent to @code{\begin@{displaymath@} @var{math}
\end@{displaymath@}}. These environments can only be used in paragraph
mode (@pxref{Modes}).
-@findex \displaystyle
-The two mathematics modes are similar, but there are some differences.
-One involves the placement of subscripts and superscripts; in display
-math mode they are further apart and in inline math mode they are closer
-together.
-
-Sometimes you want the display math typographical treatment to happen in
-the inline math mode. For this, the @code{\displaystyle} declaration
-forces the size and style of the formula to be that of
-@code{displaymath}. Thus @code{\(\displaystyle \sum_@{n=0@}^\infty
-x_n\)} will have the limits above and below the summation sign, not next
-to it. Another example is that
-
-@example
-\begin@{tabular@}@{r|cc@}
- \textsc@{Name@} &\textsc@{Series@} &\textsc@{Sum@} \\ \hline
- Arithmetic &\( a+(a+b)+(a+2b)+\cdots+(a+(n-1)b) \)
- &\( na+(n-1)n\cdot\frac@{b@}@{2@}\) \\
- Geometric &\( a+ab+ab^2+\cdots+ab^@{n-1@} \)
- &\(\displaystyle a\cdot\frac@{1-b^n@}@{1-b@}\) \\
-\end@{tabular@}
-@end example
-
-@noindent
-because it has no @code{\displaystyle}, the @samp{Arithmetic} line's
-fraction will be scrunched. But, because of its @code{\displaystyle},
-the @samp{Geometric} line's fraction will be easy to read, with
-characters the same size as in the rest of the line.
-
@PkgIndex{amsmath}
@PkgIndex{amsfonts}
@PkgIndex{mathtools}
The American Mathematical Society has made freely available a set of
packages that greatly expand your options for writing mathematics,
-@file{amsmath} and @file{amssymb} (also be aware of the @file{mathtools}
-package that is an extension to, and loads, @file{amsmath}). New
+@package{amsmath} and @package{amssymb} (also be aware of the @package{mathtools}
+package that is an extension to, and loads, @package{amsmath}). New
documents that will have mathematical text should use these packages.
Descriptions of these packages is outside the scope of this document;
see their documentation on CTAN.
@menu
-* Subscripts & superscripts:: Also known as exponent or index.
+* Subscripts & superscripts:: Also known as exponents or indices.
* Math symbols:: Various mathematical squiggles.
* Math functions:: Math function names like sin and exp.
* Math accents:: Accents in math.
* Over- and Underlining:: Things over or under formulas.
* Spacing in math mode:: Thick, medium, thin, and negative spaces.
+* Math styles:: Determine the size of things.
* Math miscellany:: Stuff that doesn't fit anywhere else.
@end menu
@@ -11796,7 +12128,7 @@ the error @samp{Missing $ inserted}.
@PkgIndex{mhchem}
A common reason to want subscripts outside of a mathematics mode is to
typeset chemical formulas. There are packages for that, such as
-@file{mhchem}; see CTAN.
+@package{mhchem}; see CTAN.
@node Math symbols
@@ -12170,7 +12502,7 @@ for@tie{}@code{\le}.
@item \lhd
@BES{25C1,\lhd} Arrowhead, that is, triangle, pointing left (binary).
For the normal subgroup symbol you should load
-@file{amssymb} and use@tie{}@code{\vartriangleleft} (which is a relation
+@package{amssymb} and use@tie{}@code{\vartriangleleft} (which is a relation
and so gives better spacing).
@item \ll
@@ -12259,7 +12591,7 @@ of@tie{}@code{\in}.
following operator (relation).
Many negated operators are available that don't require @code{\not},
-particularly with the @file{amssymb} package. For example, @code{\notin}
+particularly with the @package{amssymb} package. For example, @code{\notin}
is typographically preferable to @code{\not\in}.
@item \notin
@@ -12380,7 +12712,7 @@ Similar: greater than@tie{}@code{>}. Matches:@code{\langle}.
@item \Re
@BES{211C,\Re} Real part, real numbers, cursive capital R (ordinary). Related:
double-line, or blackboard bold, R@tie{}@code{\mathbb@{R@}}; to access
-this, load the @file{amsfonts} package.
+this, load the @package{amsfonts} package.
@item \restriction
@BES{21BE}, Restriction of a function (relation). Synonym:
@@ -12397,7 +12729,7 @@ off (closing). Matches@tie{}@code{\lfloor}.
@item \rhd
@BES{25C1,\rhd} Arrowhead, that is, triangle, pointing right (binary).
For the normal subgroup symbol you should instead
-load @file{amssymb} and use@tie{}@code{\vartriangleright} (which is a
+load @package{amssymb} and use@tie{}@code{\vartriangleright} (which is a
relation and so gives better spacing).
@item \rho
@@ -12548,26 +12880,26 @@ Synonym:@tie{}@code{\rightarrow}.
@item \triangleleft
@BES{25C1,\triangleleft} Not-filled triangle pointing left
(binary). Similar:@tie{}@code{\lhd}. For the normal subgroup symbol you
-should load @file{amssymb} and use@tie{}@code{\vartriangleleft} (which
+should load @package{amssymb} and use@tie{}@code{\vartriangleleft} (which
is a relation and so gives better spacing).
@item \triangleright
@BES{25B7,\triangleright} Not-filled triangle pointing right
(binary). For the normal subgroup symbol you should instead load
-@file{amssymb} and use@tie{}@code{\vartriangleright} (which is a
+@package{amssymb} and use@tie{}@code{\vartriangleright} (which is a
relation and so gives better spacing).
@item \unlhd
@BES{22B4,\unlhd} Left-pointing not-filled underlined arrowhead, that is,
triangle, with a line under (binary). For the
-normal subgroup symbol load @file{amssymb} and
+normal subgroup symbol load @package{amssymb} and
use@tie{}@code{\vartrianglelefteq} (which is a relation and so gives
better spacing).
@item \unrhd
@BES{22B5,\unrhd} Right-pointing not-filled underlined arrowhead, that is,
triangle, with a line under (binary). For the
-normal subgroup symbol load @file{amssymb} and
+normal subgroup symbol load @package{amssymb} and
use@tie{}@code{\vartrianglerighteq} (which is a relation and so gives
better spacing).
@@ -12651,13 +12983,13 @@ operator@tie{}@code{\bigvee}.
@item \Vert
@BES{2016,\Vert} Vertical double bar (ordinary). @xref{Delimiters},
-for how to use the @file{mathtools} package to create flexibly-sized
+for how to use the @package{mathtools} package to create flexibly-sized
norm symbols.
@item \vert
@BES{007C,\vert} Single line vertical bar (ordinary). For ``such
that'', as in the definition of a set, use@tie{}@code{\mid} because it
-is a relation. @xref{Delimiters}, for how to use the @file{mathtools}
+is a relation. @xref{Delimiters}, for how to use the @package{mathtools}
package to create flexibly-sized absolute-value symbols.
@item \wedge
@@ -12724,7 +13056,7 @@ Underscore in math mode: _.
@PkgIndex{amsfonts}
@PkgIndex{latexsym}
These are the arrows that come with standard @LaTeX{}. The
-@file{latexsym} and @file{amsfonts} packages contain many more.
+@package{latexsym} and @package{amsfonts} packages contain many more.
@multitable @columnfractions .10 .40 .50
@headitem Symbol@tab Command@tab
@@ -12788,7 +13120,7 @@ is: @code{\( f\colon D\to C \) given by \( n\mapsto n^2 \)}.
@PkgIndex{amscd}
@PkgIndex{tikz-cd}
For commutative diagrams there are a number of packages, including
-@file{tikz-cd} and @file{amscd}.
+@package{tikz-cd} and @package{amscd}.
@node \boldmath & \unboldmath
@@ -12840,7 +13172,7 @@ Font Warning: Command \mathversion invalid in math mode on input line
@PkgIndex{bm}
There are many issues with @code{\boldmath}. New documents should use
-the @file{bm} package provided by the @LaTeX{} Project team. A complete
+the @package{bm} package provided by the @LaTeX{} Project team. A complete
description is outside the scope of this document (see the full
documentation on CTAN) but even this small example
@@ -12879,7 +13211,7 @@ Here
@end example
@noindent
-the @code{\mathbb@{N@}} gives blackboard bold symbol @BES{2115},
+the @code{\mathbb@{N@}} gives blackboard bold symbol @BES{2115,\mathbbN},
representing the natural numbers.
If you use other than an uppercase letter then you do not get an error
@@ -12974,19 +13306,19 @@ Here are the common delimiters:
@end multitable
@PkgIndex{mathtools}
-The @file{mathtools} package allows you to create commands for paired
+The @package{mathtools} package allows you to create commands for paired
delimiters. For instance, if you put
@code{\DeclarePairedDelimiter\abs@{\lvert@}@{\rvert@}} in your preamble
then you get two commands for single-line vertical bars (they only work
-in math mode). The starred version, such as
+in math mode). The starred form, such as
@code{\abs*@{\frac@{22@}@{7@}@}}, has the height of the vertical bars
-match the height of the argument. The unstarred version, such as
+match the height of the argument. The unstarred form, such as
@code{\abs@{\frac@{22@}@{7@}@}}, has the bars fixed at a default height.
-This version accepts an optional argument, as in @code{\abs[@var{size
+This form accepts an optional argument, as in @code{\abs[@var{size
command}]@{\frac@{22@}@{7@}@}}, where the height of the bars is given in
-@var{size command}, such as @code{\Bigg}. Using @code{\lVert} and
-@code{\rVert} as the symbols will give you a norm symbol with the same
-behavior.
+@var{size command}, such as @code{\Bigg}. Using instead @code{\lVert}
+and @code{\rVert} as the symbols will give you a norm symbol with the
+same behavior.
@menu
* \left & \right:: Automatically sized delimiters.
@@ -13053,9 +13385,9 @@ case is that you want an unmatched brace, as below. Use a period,
@noindent
Note that to get a curly brace as a delimiter you must prefix it with a
-backslash, @code{\@{}. (The packages @file{amsmath} and
-@file{mathtools} allow you to get the above construct through in a
-@code{cases} environment.)
+backslash, @code{\@{} (@pxref{Reserved characters}). (The packages
+@package{amsmath} and @package{mathtools} allow you to get the above
+construct through in a @code{cases} environment.)
The @code{\left ... \right} pair make a group. One consequence is that
the formula enclosed in the @code{\left ... \right} pair cannot have
@@ -13102,7 +13434,7 @@ form a group, the enclosed subformula will be typeset at its natural
width, with no stretching or shrinking to make the line fit better.
@TeX{} scales the delimiters according to the height and depth of the
-contained formula. Here @LaTeX{} grows the brackets to extend the full
+enclosed formula. Here @LaTeX{} grows the brackets to extend the full
height of the integral.
@example
@@ -13147,10 +13479,10 @@ To size the delimiters manually, see@tie{}@ref{\bigl & \bigr etc.}.
Synopsis, one of:
@example
-\bigl@var{delimiter1} ... \bigr@var{delimiter2}
-\Bigl@var{delimiter1} ... \bigr@var{delimiter2}
-\biggl@var{delimiter1} ... \biggr@var{delimiter2}
-\Biggl@var{delimiter1} ... \Biggr@var{delimiter2}
+\bigl@inlinefmt{info,@tie{}}@var{delimiter1} ... \bigr@inlinefmt{info,@tie{}}@var{delimiter2}
+\Bigl@inlinefmt{info,@tie{}}@var{delimiter1} ... \bigr@inlinefmt{info,@tie{}}@var{delimiter2}
+\biggl@inlinefmt{info,@tie{}}@var{delimiter1} ... \biggr@inlinefmt{info,@tie{}}@var{delimiter2}
+\Biggl@inlinefmt{info,@tie{}}@var{delimiter1} ... \Biggr@inlinefmt{info,@tie{}}@var{delimiter2}
@end example
@noindent
@@ -13158,20 +13490,20 @@ Synopsis, one of:
paired, see below), or one of:
@example
-\bigm@var{delimiter}
-\Bigm@var{delimiter}
-\biggm@var{delimiter}
-\Biggm@var{delimiter}
+\bigm@inlinefmt{info,@tie{}}@var{delimiter}
+\Bigm@inlinefmt{info,@tie{}}@var{delimiter}
+\biggm@inlinefmt{info,@tie{}}@var{delimiter}
+\Biggm@inlinefmt{info,@tie{}}@var{delimiter}
@end example
@noindent
(as with @code{\bigm|}), or one of:
@example
-\big@var{delimiter}
-\Big@var{delimiter}
-\bigg@var{delimiter}
-\Bigg@var{delimiter}
+\big@inlinefmt{info,@tie{}}@var{delimiter}
+\Big@inlinefmt{info,@tie{}}@var{delimiter}
+\bigg@inlinefmt{info,@tie{}}@var{delimiter}
+\Bigg@inlinefmt{info,@tie{}}@var{delimiter}
@end example
@noindent
@@ -13192,8 +13524,8 @@ causing @LaTeX{} to spread the lines apart. The larger sizes are meant
for displayed equations.
@xref{Delimiters}, for a list of the common delimiters. In the family of
-commands with @samp{l} and @samp{r}, @var{delimiter1} and
-@var{delimiter2} need not be the same.
+commands with @samp{l} or@tie{}@samp{r}, @var{delimiter1} and
+@var{delimiter2} need not match together.
The @samp{l} and @samp{r} commands produce open and close delimiters
that insert no horizontal space between a preceding atom and the
@@ -13226,7 +13558,7 @@ some circumstances, as with this large vertical line
@PkgIndex{amsmath}
@noindent
(many authors would replace @code{\frac} with the @code{\tfrac} command
-from the @file{amsmath} package), and as with this larger slash.
+from the @package{amsmath} package), and as with this larger slash.
@example
\begin@{equation@}
@@ -13235,7 +13567,7 @@ from the @file{amsmath} package), and as with this larger slash.
@end example
Unlike the @code{\left...\right} pair (@pxref{\left & \right}), the
-commands here with @samp{l} and@tie{}@samp{r} do not make a group.
+commands here with @samp{l} or@tie{}@samp{r} do not make a group.
Strictly speaking they need not be matched so you can write something
like this.
@@ -13293,7 +13625,7 @@ usage.
@item \ldots
Ellipsis on the baseline, @BES{2026,\ldots}. Used as: @code{\(
x_0,\ldots x_@{n-1@} \)}. Another example is the above array example. A
-synonym is @code{\mathellipsis}. A synonym from the @file{amsmath}
+synonym is @code{\mathellipsis}. A synonym from the @package{amsmath}
package is @code{\hdots}.
You can also use this command outside of mathematical text, as in
@@ -13308,7 +13640,7 @@ usage.
@end ftable
@PkgIndex{amsmath}
-The @file{amsmath} package has the command @code{\dots} to semantically
+The @package{amsmath} package has the command @code{\dots} to semantically
mark up ellipses. This example produces two different-looking outputs
for the first two uses of the @code{\dots} command.
@@ -13398,7 +13730,7 @@ differ from Roman upper case letters.
For omicron, if you are using @LaTeX{}'s default Computer Modern font
then enter omicron just as @samp{o} or @samp{O}. If you like having the
name or if your font shows a difference then you can use something like
-@code{\newcommand\omicron@{o@}}. The package @file{unicode-math} has
+@code{\newcommand\omicron@{o@}}. The package @package{unicode-math} has
@code{\upomicron} for upright omicron and @code{\mitomicron} for math
italic.
@@ -13630,7 +13962,7 @@ Hyperbolic tangent
@end ftable
@PkgIndex{amsmath}
-The @file{amsmath} package adds improvements on some of these, and also
+The @package{amsmath} package adds improvements on some of these, and also
allows you to define your own. The full documentation is on CTAN, but
briefly, you can define an identity operator with
@code{\DeclareMathOperator@{\identity@}@{id@}} that is like the ones
@@ -13772,7 +14104,7 @@ descenders, so in @code{\(\underline@{y@}\)} the line is lower than in
@code{\(\underline@{x@}\)}. This command is fragile (@pxref{\protect}).
@PkgIndex{ulem}
-Note that the package @file{ulem} does text mode underlining and allows
+Note that the package @package{ulem} does text mode underlining and allows
line breaking as well as a number of other features. See the
documentation on CTAN. See also@tie{}@ref{\hrulefill & \dotfill} for
producing a line, for such things as a signature.
@@ -13813,7 +14145,7 @@ Put a brace over @var{math}, as with
@end ftable
@PkgIndex{mathtools}
-The package @file{mathtools} adds an over- and underbrace, as well as
+The package @package{mathtools} adds an over- and underbrace, as well as
some improvements on the braces. See the documentation on CTAN.
@@ -13848,15 +14180,17 @@ a@tie{}@samp{M}.
@findex \;
@findex \thickspace
@anchor{spacing in math mode thickspace}
-Synonym: @code{\thickspace}. Normally @code{5.0mu plus 5.0mu}.
-With @code{amsmath}, or as of the 2020-10-01 @LaTeX{} release, can be
-used in text mode as well as math mode; before that, in math mode only.
+@PkgIndex{amsmath}
+Synonym: @code{\thickspace}. Normally @code{5.0mu plus 5.0mu}. With
+the @package{amsmath} package, or as of the 2020-10-01 @LaTeX{} release,
+can be used in text mode as well as math mode; otherwise, in math mode
+only.
@item \negthickspace
@findex \negthickspace
-Normally @code{-5.0mu plus 2.0mu minus 4.0mu}.
-With @code{amsmath}, or as of the 2020-10-01 @LaTeX{} release, can be
-used in text mode as well as math mode; before that, in math mode only.
+Normally @code{-5.0mu plus 2.0mu minus 4.0mu}. With the @package{amsmath}
+package, or as of the 2020-10-01 @LaTeX{} release, can be used in text
+mode as well as math mode; otherwise, in math mode only.
@item \:
@itemx \>
@@ -13864,15 +14198,16 @@ used in text mode as well as math mode; before that, in math mode only.
@findex \>
@findex \medspace
@anchor{spacing in math mode medspace}
-Synonym: @code{\medspace}. Normally @code{4.0mu plus 2.0mu minus 4.0mu}.
-With @code{amsmath}, or as of the 2020-10-01 @LaTeX{} release, can be
-used in text mode as well as math mode; before that, in math mode only.
+Synonym: @code{\medspace}. Normally @code{4.0mu plus 2.0mu minus
+4.0mu}. With the @package{amsmath} package, or as of the 2020-10-01
+@LaTeX{} release, can be used in text mode as well as math mode; before
+that, in math mode only.
@item \negmedspace
@findex \negmedspace
-Normally @code{-4.0mu plus 2.0mu minus 4.0mu}.
-With @code{amsmath}, or as of the 2020-10-01 @LaTeX{} release, can be
-used in text mode as well as math mode; before that, in math mode only.
+Normally @code{-4.0mu plus 2.0mu minus 4.0mu}. With the @package{amsmath}
+package, or as of the 2020-10-01 @LaTeX{} release, can be used in text
+mode as well as math mode; before that, in math mode only.
@item \,
@findex \,
@@ -13900,11 +14235,12 @@ The antiderivative is
@findex \negthinspace
@cindex thin space, negative
@anchor{spacing in math mode negthinspace}
-A negative thin space. Normally @code{-3mu}.
-With @code{amsmath}, or as of the 2020-10-01 @LaTeX{} release, can be
-used in text mode as well as math mode; before that,
-The @code{\!} command is math mode only but the @code{\negthinspace}
-command has always worked in text mode (@pxref{\thinspace & \negthinspace}).
+Synonym: @code{\negthinspace}. A negative thin space. Normally
+@code{-3mu}. With the @package{amsmath} package, or as of the 2020-10-01
+@LaTeX{} release, can be used in text mode as well as math mode;
+otherwise, the @code{\!} command is math mode only but the
+@code{\negthinspace} command has always also worked in text mode
+(@pxref{\thinspace & \negthinspace}).
@item \quad
@cindex quad
@@ -14001,7 +14337,7 @@ xxx xxx xxx
@end example
@PkgIndex{mathtools}
-The package @code{mathtools} has operators that provide even finer
+The package @package{mathtools} has operators that provide even finer
control over smashing a subformula box.
@@ -14036,11 +14372,13 @@ or
The @code{\phantom} command creates a box with the same height, depth,
and width as @var{subformula}, but empty. That is, this command causes
@LaTeX{} to typeset the space but not fill it with the material. Here
-@LaTeX{} will put a box of the right size for the quotation, but empty.
+@LaTeX{} will put a blank line that is the correct width for the answer,
+but will not show that answer.
@example
-\fbox@{\phantom@{Conservatism is the fear-filled worship of dead radicals.
- --- Mark Twain@}@}
+\begin@{displaymath@}
+ \int x^2\,dx=\mbox@{\underline@{$\phantom@{(1/3)x^3+C@}$@}@}
+\end@{displaymath@}
@end example
The @code{\vphantom} variant produces an invisible box with the same
@@ -14071,14 +14409,14 @@ a suite of other commands to work with box sizes that may be more
convenient, including @code{\makebox} (@pxref{\mbox & \makebox}) as well
as @code{\settodepth} (@pxref{\settodepth}), @code{\settoheight}
(@pxref{\settoheight}), and @code{\settowidth} (@pxref{\settowidth}).
-In addition, the @file{mathtools} package has many commands that offer
+In addition, the @package{mathtools} package has many commands that offer
fine-grained control over spacing.
@PkgIndex{amsmath}
All three commands produce an ordinary box, without any special
mathematics status. So to do something like attaching a superscript you
should give it such a status, for example with the @code{\operatorname}
-command from the package @file{amsmath}.
+command from the package @package{amsmath}.
While most often used in mathematics, these three can appear in other
contexts. However, they don't cause @LaTeX{} to change into horizontal
@@ -14095,6 +14433,7 @@ with @code{\leavevmode}.
@cindex math mode, spacing
@cindex invisible character
@cindex character, invisible
+@cindex strut, math
Synopsis:
@@ -14118,6 +14457,101 @@ an open parenthesis is just a convention; for complete control over the
amount of space, use @code{\rule} with a width of zero. @xref{\rule}.
+@node Math styles
+@section Math styles
+
+@cindex math styles
+
+@TeX{}'s rules for typesetting a formula depend on the context. For
+example, inside a displayed equation, the input @code{\sum_@{0\leq
+i<n@}k^m=\frac@{n^@{m+1@}@}@{m+1@}+\mbox@{lower order terms@}} will give
+output with the summation index centered below the summation symbol.
+But if that input is inline then the summation index is off to the right
+rather than below, so it won't push the lines apart. Similarly, in a
+displayed context, the symbols in the numerator and denominator will be
+larger than for an inline context, and in display math subscripts and
+superscripts are further apart then they are in inline math.
+
+@TeX{} uses four math styles.
+
+@itemize @bullet
+
+@cindex display style
+@item
+Display style is for a formula displayed on a line by itself, such as
+with @code{\begin@{equation@} ... \end@{equation@}}.
+
+@cindex text style
+@item
+Text style is for an inline formula, as with @samp{so we have $ ... $}.
+
+@cindex script style
+@item
+Script style is for parts of a formula in a subscript or superscript.
+
+@cindex scriptscript style
+@item
+Scriptscript style is for parts of a formula at a second level (or more)
+of subscript or superscript.
+
+@end itemize
+
+@findex \displaystyle
+@findex \textstyle
+@findex \scriptstyle
+@findex \scriptscriptstyle
+@TeX{} determines a default math style but you can override it with a
+declaration of @code{\displaystyle}, or @code{\textstyle}, or
+@code{\scriptstyle}, or @code{\scriptscriptstyle}.
+
+In this example, the @samp{Arithmetic} line's fraction will look
+scrunched.
+
+@example
+\begin@{tabular@}@{r|cc@}
+ \textsc@{Name@} &\textsc@{Series@} &\textsc@{Sum@} \\ \hline
+ Arithmetic &$a+(a+b)+(a+2b)+\cdots+(a+(n-1)b)$
+ &$na+(n-1)n\cdot\frac@{b@}@{2@}$ \\
+ Geometric &$a+ab+ab^2+\cdots+ab^@{n-1@}$
+ &$\displaystyle a\cdot\frac@{1-b^n@}@{1-b@}$ \\
+\end@{tabular@}
+@end example
+
+@noindent
+But because of the @code{\displaystyle} declaration,
+the @samp{Geometric} line's fraction will be easy to read, with
+characters the same size as in the rest of the line.
+
+Another example is that, compared to the same input without the
+declaration, the result of
+
+@example
+we get
+$\pi=2\cdot@{\displaystyle\int_@{x=0@}^1 \sqrt@{1-x^2@}\,dx@}$
+@end example
+
+@noindent
+will have an integral sign that is much taller. Note that here the
+@code{\displaystyle} applies to only part of the formula, and it is
+delimited by being inside curly braces, as @samp{@{\displaystyle ...@}}.
+
+The last example is a continued fraction.
+
+@example
+\begin@{equation@}
+a_0+\frac@{1@}@{
+ \displaystyle a_1+\frac@{\mathstrut 1@}@{
+ \displaystyle a_2+\frac@{\mathstrut 1@}@{
+ \displaystyle a_3@}@}@}
+\end@{equation@}
+@end example
+
+@noindent
+Without the @code{\displaystyle} declarations, the denominators would be
+set in script style and scriptscript style. (The @code{\mathstrut}
+improves the height of the denominators; @pxref{\mathstrut}.)
+
+
@node Math miscellany
@section Math miscellany
@@ -14162,7 +14596,7 @@ with the spacing appropriate for punctuation, as in set-builder notation
@code{\@{x\colon 0\leq x<1\@}}.
@PkgIndex{amsmath}
-But the widely-used @file{amsmath} package defines @code{\colon} for use
+But the widely-used @package{amsmath} package defines @code{\colon} for use
in the definition of functions @code{f\colon D\to C}. So if you want
the colon character as a punctuation then use @code{\mathpunct@{:@}}.
@@ -14274,9 +14708,11 @@ the math modes), and error messages will refer to these.
@item
@anchor{modes paragraph mode}
@cindex paragraph mode
-@dfn{Paragraph mode} is what @LaTeX{} is in when processing ordinary
-text. It breaks the input text into lines and breaks the lines into
-pages. This is the mode @LaTeX{} is in most of the time.
+@dfn{Paragraph mode} (in plain @TeX{} this is called @dfn{horizontal
+mode}) is what @LaTeX{} is in when processing ordinary text. It breaks
+the input text into lines and finds the positions of line breaks, so that
+in vertical mode page breaks can be done. This is the mode @LaTeX{} is
+in most of the time.
@cindex left-to-right mode
@cindex LR mode
@@ -14304,15 +14740,16 @@ differs in the two situations.)
@item
@cindex vertical mode
-@anchor{modes vertical mode}
-@dfn{Vertical mode} is when @LaTeX{} is building the list of lines and
-other material making the output page. This is the mode @LaTeX{} is in
-when it starts a document.
+@anchor{modes vertical mode} @dfn{Vertical mode} is when @LaTeX{} is
+building the list of lines and other material making the output page,
+which comprises insertion of page breaks. This is the mode @LaTeX{} is
+in when it starts a document.
@cindex internal vertical mode
@anchor{modes internal vertical mode}
@dfn{Internal vertical mode} is in effect when @LaTeX{} starts making a
-@code{\vbox}. This is the vertical analogue of LR mode.
+@code{\vbox}. It has not such thing as page breaks, and as such is the
+vertical analogue of LR mode.
@end itemize
@@ -14383,7 +14820,7 @@ special pages such as the title page of a book, a page from an index, or
the first page of an article.
@PkgIndex{fancyhdr}
-The package @file{fancyhdr} is very helpful for constructing page
+The package @package{fancyhdr} is very helpful for constructing page
styles. See its documentation on CTAN.
@menu
@@ -14537,7 +14974,7 @@ get @samp{LaTeX Error: Counter too large}.
@item gobble
@PkgIndex{hyperref} @LaTeX{} does not output a page number, although it
does get reset. References to that page also are blank. (This does not
-work with the popular package @file{hyperref} so to have the page number
+work with the popular package @package{hyperref} so to have the page number
not appear you may want to instead use @code{\pagestyle@{empty@}} or
@code{\thispagestyle@{empty@}}.)
@@ -14548,10 +14985,9 @@ contents, etc.---then it is numbered with lowercase Roman numerals. The
main matter of a document uses arabic. @xref{\frontmatter & \mainmatter
& \backmatter}.
-If you want to address where the page number appears on the page,
-see@tie{}@ref{\pagestyle}. If you want to change the value of page
-number then you will manipulate the @code{page} counter
-(@pxref{Counters}).
+If you want to change where the page number appears on the page,
+see@tie{}@ref{\pagestyle}. If you want to change the value of the page
+number, then you manipulate the @code{page} counter (@pxref{Counters}).
@node \pagestyle
@@ -14573,7 +15009,7 @@ from the current page onwards.
@PkgIndex{fancyhdr}
A discussion with an example is below. Note first that the package
-@file{fancyhdr} is now the standard way to manipulate headers and
+@package{fancyhdr} is now the standard way to manipulate headers and
footers. New documents that need to do anything other than one of the
standard options below should use this package. See its documentation
on CTAN.
@@ -14585,7 +15021,7 @@ Values for @var{style}:
The header is empty. The footer contains only a page number, centered.
@item empty
-The header and footer is empty.
+The header and footer are both empty.
@item headings
Put running headers and footers on each page. The document style
@@ -14703,11 +15139,9 @@ To make the page entirely empty, the command
@cindex spaces
@cindex white space
-@LaTeX{} has many ways to produce white (or filled) space. Some of
-these are best suited to mathematical text; see@tie{}@ref{Spacing in
-math mode}. Some spacing commands are suitable for both regular text
-and mathematical text; versions of some of these commands are in this
-chapter.
+@LaTeX{} has many ways to produce white space, or filled space. Some of
+these are best suited to mathematical text; for these
+see@tie{}@ref{Spacing in math mode}.
@menu
Horizontal space
@@ -14781,11 +15215,12 @@ Synopsis, one of:
\hspace*@{@var{length}@}
@end example
-Insert the horizontal space @var{length}. The @var{length} can be
-positive, negative, or zero; adding negative space is like backspacing.
-It is a rubber length, that is, it may contain a @code{plus} or
-@code{minus} component, or both (@pxref{Lengths}). Because the space is
-stretchable and shrinkable, it is sometimes called @dfn{glue}.
+Insert the amount @var{length} of horizontal space. The @var{length} can
+be positive, negative, or zero; adding a negative amount of space is
+like backspacing. It is a rubber length, that is, it may contain a
+@code{plus} or @code{minus} component, or both (@pxref{Lengths}).
+Because the space is stretchable and shrinkable, it is sometimes called
+@dfn{glue}.
This makes a line with @samp{Name:} an inch from the right margin.
@@ -14793,10 +15228,10 @@ This makes a line with @samp{Name:} an inch from the right margin.
\noindent\makebox[\linewidth][r]@{Name:\hspace@{1in@}@}
@end example
-The @code{*}-version inserts horizontal space that non-discardable.
-More precisely, when @TeX{} breaks a paragraph into lines any white
+The @code{*}-form inserts horizontal space that is non-discardable. More
+precisely, when @TeX{} breaks a paragraph into lines any white
space---glues and kerns---that come at a line break are discarded. The
-@code{*}-version avoids that (technically, it adds a non-discardable
+@code{*}-form avoids that (technically, it adds a non-discardable
invisible item in front of the space).
In this example
@@ -14977,7 +15412,7 @@ then you have probably tried to redefine an internal command.
@menu
* \@@:: Distinguish sentence-ending periods from abbreviations.
-* \frenchspacing:: Equal interword and inter-sentence space.
+* \frenchspacing & \nonfrenchspacing:: Equal interword and inter-sentence space.
* \normalsfcodes:: Restore space factor settings to the default.
@end menu
@@ -15046,8 +15481,9 @@ Examples are @code{Nat.\ Acad.\ Science}, and @code{Mr.~Bean}, and
@code{\@@} comes before the closing parenthesis).
-@node \frenchspacing
-@subsection @code{\frenchspacing}
+@node \frenchspacing & \nonfrenchspacing
+@anchor{\frenchspacing}@c old node name
+@subsection @code{\frenchspacing} & @code{\nonfrenchspacing}
@findex \frenchspacing
@findex \nonfrenchspacing
@@ -15060,10 +15496,11 @@ Synopsis, one of:
\nonfrenchspacing
@end example
-The first declaration causes @LaTeX{} to treat spacing between sentences
-in the same way as spacing between words in the middle of a sentence.
-The second causes spacing between sentences to stretch or shrink more
-(@pxref{\spacefactor}); this is the default.
+The first declaration causes @LaTeX{} to handle spacing between
+sentences in the same way as spacing between words in the middle of a
+sentence. The second switches back to the default handling in which
+spacing between sentences stretches or shrinks more
+(@pxref{\spacefactor}).
Some typographic traditions, including English, prefer to adjust the
space between sentences (or spaces following a question mark,
@@ -15085,24 +15522,24 @@ Synopsis:
\normalsfcodes
@end example
-Reset the @LaTeX{} space factor values to the default
+Reset the @LaTeX{} space factors to the default values
(@pxref{\spacefactor}).
@node \(SPACE)
@section Backslash-space, @code{\ }
-@cindex \NEWLINE
-@cindex \SPACE
-@cindex \ (backslash-space)
-@cindex \TAB
-@findex \SPACE
+@cindex \@key{NEWLINE}
+@cindex \@key{SPACE}
+@cindex \@key{TAB}
+@findex \@w{ } @r{(backslash-space)}
+@findex \@key{SPACE}
This section refers to the command consisting of two characters, a
-backslash followed by a space. Synopsis:
+backslash followed by a space.@*Synopsis:
@example
-\
+\@w{ }
@end example
Produce a space. By default it produces white space of length
@@ -15112,10 +15549,10 @@ When you type one or more blanks between words, @LaTeX{} produces white
space. But that is different than an explicit space. This illustrates.
@example
-\begin@{tabular@}@{l@}
-One blank: makes some space \\
-Three blanks: in a row \\
-Three spaces:\ \ \ in a row \\
+\begin@{tabular@}@{rl@}
+One blank:& makes some space \\
+Three blanks:& in a row \\
+Three spaces:&\ \ \ in a row \\
\end@{tabular@}
@end example
@@ -15123,26 +15560,43 @@ Three spaces:\ \ \ in a row \\
On the first line @LaTeX{} puts some space after the colon. On the
second line @LaTeX{} collapses the three blanks to output one
whitespace, so you end with the same space after the colon as in the
-first line. @LaTeX{} would similarly collapse a blank followed by a
-tab, or a blank and a newline and a blank. However, the bottom line
-asks for three spaces so the white area is wider. That is, the
-backslash-space command creates a fixed amount of horizontal space.
-(Note that you can define a horizontal space of any width at all with
-@code{\hspace}; see@tie{}@ref{\hspace}.)
+first line. @LaTeX{} would similarly collapse them to a single
+whitespace if one, two or all of the three blanks were replaced by a
+tab, or by a newline. However, the bottom line asks for three spaces so
+the white area is wider. That is, the backslash-space command creates a
+fixed amount of horizontal space. (Note that you can define a
+horizontal space of any width at all with @code{\hspace};
+see@tie{}@ref{\hspace}.)
The backslash-space command has two main uses. It is often used after
-control sequences to keep them from gobbling the space that follows, as
-in @code{\TeX\ is nice}. (But using curly parentheses, as in
-@code{\TeX@{@} is best}, has the advantage of still working if the next
-character is a period.) The other common use is that it marks a period
-as ending an abbreviation instead of ending a sentence, as in @code{So
-says Prof.\ Smith} or @code{Jones et al.\ (1993)} (@pxref{\@@}).
-
-Under normal circumstances, @code{\}@key{tab} and @code{\}@key{newline}
+control sequences to keep them from gobbling the blank that follows, as
+after @code{\TeX} in @code{\TeX\ (or \LaTeX)}. (But using curly braces
+has the advantage of still working whether the next character is a blank
+or any other non-letter, as in @code{\TeX@{@} (or \LaTeX@{@})} in which
+@code{@{@}} can be added after @code{\LaTeX} as well as after
+@code{\TeX}.) The other common use is that it marks a period as ending
+an abbreviation instead of ending a sentence, as in @code{Prof.\ Smith}
+or @code{Jones et al.\ (1993)} (@pxref{\@@}).
+
+Under normal circumstances, @code{\}@key{TAB} and @code{\}@key{NEWLINE}
are equivalent to backslash-space, @code{\ }.
+@anchor{Leading blanks}
+Please also note that in order to allow source code indentation, under
+normal circumstances, @TeX{} ignores leading blanks in a line. So the
+following prints @samp{one word}:
+
+@example
+one
+ word
+@end example
+
+@noindent
+where the white space between @samp{one} and @samp{word} is produced by
+the newline after @samp{one}, not by the space before @samp{word}.
+
@c @PkgIndex{xspace}
-@c Some individual commands, notably those defined with the @code{xspace},
+@c Some individual commands, notably those defined with the @package{xspace},
@c package do not follow the standard behavior.
@@ -15162,12 +15616,19 @@ Synopsis:
@var{before}~@var{after}
@end example
-The tie character, @code{~}, produces a space between @var{before} and
+The @dfn{tie} character, @code{~}, produces a space between @var{before} and
@var{after} at which the line will not be broken. By default the white
space has length 3.33333@dmn{pt} plus 1.66666@dmn{pt} minus
1.11111@dmn{pt} (@pxref{Lengths}).
-Here @LaTeX{} will not break the line between the final two words.
+@c This paragraph is not translated to French, as the French translation
+@c uses a term that means ``unbreakable''.
+Note that the word @samp{tie} has this meaning in the @TeX{}/Texinfo
+community; this differs from the typographic term ``tie'', which
+is a diacritic in the shape of an arc, called a ``tie-after'' accent
+in @cite{The @TeX{}book}.
+
+Here @LaTeX{} will not break the line between the final two words:
@example
Thanks to Prof.~Lerman.
@@ -15188,7 +15649,7 @@ from @cite{The @TeX{}book}.
@itemize @bullet
@item
-Between an enumerator and its item, such as in references:
+Between an enumerator label and number, such as in references:
@code{Chapter~12}, or @code{Theorem~\ref@{th:Wilsons@}}, or
@code{Figure~\ref@{fig:KGraph@}}.
@@ -15199,10 +15660,10 @@ When cases are enumerated inline: @code{(b)~Show that $f(x)$ is
@PkgIndex{siunitx}
@item
Between a number and its unit: @code{$745.7.8$~watts} (the
-@file{siunitx} package has a special facility for this) or
-@code{144~eggs}. This includes between a month and a date:
-@code{October~12} or @code{12~Oct}. In general, in any expressions
-where numbers and abbreviations or symbols are separated by a space:
+@package{siunitx} package has a special facility for this) or
+@code{144~eggs}. This includes between a month and day number in a date:
+@code{October~12} or @code{12~Oct}. In general, in any expressions where
+numbers and abbreviations or symbols are separated by a space:
@code{AD~565}, or @code{2:50~pm}, or @code{Boeing~747}, or
@code{268~Plains Road}, or @code{\$$1.4$~billion}. Other common
choices here are a thin space (@pxref{\thinspace & \negthinspace}) and
@@ -15269,11 +15730,12 @@ think the three dots and/or four dots are plenty). Another
style-specific use is between initials, as in @code{D.\thinspace E.\
Knuth}.
-@LaTeX{} provides a variety of similar spacing commands
-(@pxref{Spacing in math mode}). With @code{amsmath}, or as of the
-2020-10-01 @LaTeX{} release, they can be used in text mode as well as
-math mode, including @code{\!} for @code{\negthinspace}; before that,
-they were available only in math mode.
+@PkgIndex{amsmath}
+@LaTeX{} provides a variety of similar spacing commands for math mode
+(@pxref{Spacing in math mode}). With the @package{amsmath} package, or as
+of the 2020-10-01 @LaTeX{} release, they can be used in text mode as
+well as math mode, including @code{\!} for @code{\negthinspace}; but
+otherwise, they are available only in math mode.
@node \/
@section @code{\/}
@@ -15324,8 +15786,8 @@ do not include italic correction values even for italic fonts.
@findex \fontdimen1
@cindex font dimension, slant
Technically, @LaTeX{} uses another font-specific value, the so-called
-slant parameter (namely @code{\fontdimen1}), to determine whether to
-possibly insert an italic correction, rather than tying the action to
+@dfn{slant parameter} (namely @code{\fontdimen1}), to determine whether
+to possibly insert an italic correction, rather than tying the action to
particular font commands.
There is no concept of italic correction in math mode; math spacing is
@@ -15372,7 +15834,7 @@ here
@example
\renewcommand@{\hrulefill@}@{%
- \leavevmode\leaders\hrule height 1pt\hfill\kern\z@@@}
+ \leavevmode\leaders\hrule height 1pt\hfill\kern0pt @}
@end example
@noindent
@@ -15381,7 +15843,7 @@ Similarly, adjust the dot spacing as with
@example
\renewcommand@{\dotfill@}@{%
- \leavevmode\cleaders\hb@@xt@@1.00em@{\hss .\hss @}\hfill\kern\z@@@}
+ \leavevmode\cleaders\hbox to 1.00em@{\hss .\hss @}\hfill\kern0pt @}
@end example
@noindent
@@ -15454,7 +15916,7 @@ quarter of a line space, with stretch and shrink. The default for the
@end ftable
-Because each command is a @code{\vspace}, if you use on in mid-paragraph
+Because each command is a @code{\vspace}, if you use it in mid-paragraph
then it will insert its vertical space between the line in which you use
it and the next line, not necessarily at the place that you use it. So
these are best between paragraphs.
@@ -15513,7 +15975,7 @@ Ensure that the current line has height at least @code{0.7\baselineskip}
and depth at least @code{0.3\baselineskip}. Essentially, @LaTeX{}
inserts into the line a rectangle having zero width,
@code{\rule[-0.3\baselineskip]@{0pt@}@{\baselineskip@}} (@pxref{\rule}).
-The @code{\baselineskip} changes with the current font and fontsize.
+The @code{\baselineskip} changes with the current font or fontsize.
In this example the @code{\strut} keeps the box inside the frame from
having zero height.
@@ -15561,14 +16023,14 @@ item's second line.
@noindent
The final two lists use @code{\fbox} to show what's happening. The
-third list's @code{\parbox} goes only to the bottom of its second
-@samp{test}, which happens not have any characters that descend below
-the baseline. The fourth list adds the strut that gives the needed
-extra below-baseline space.
+first item @code{\parbox} of the third list goes only to the bottom of
+its second @samp{test}, which happens not have any characters that
+descend below the baseline. The fourth list adds the strut that gives
+the needed extra below-baseline space.
@PkgIndex{TikZ} @PkgIndex{Asymptote}
The @code{\strut} command is often useful in graphics, such as in
-@file{TikZ} or @file{Asymptote}. For instance, you may have a command
+@package{TikZ} or @package{Asymptote}. For instance, you may have a command
such as @code{\graphnode@{@var{node-name}@}} that fits a circle around
@var{node-name}. However, unless you are careful the @var{node-name}'s
@samp{x} and @samp{y} will produce different-diameter circles because
@@ -15591,10 +16053,10 @@ second rule keeps the second integral from hitting the first.
@noindent
(Although the line-ending double backslash command has an available
-optional argument to put in more vertical room, that won't work here.
-Changing the first double backslash to something like @code{\\[2.5ex]}
-will put the room between the header line and the @code{\hline}, and the
-integral would still hit the line.)
+optional argument to change the corresponding baseline skip, that won't
+solve this issue. Changing the first double backslash to something like
+@code{\\[2.5ex]} will put more room between the header line and the
+@code{\hline} rule, and the integral would still hit the rule.)
@node \vspace
@@ -15628,9 +16090,9 @@ The new day dawned cold.
(@xref{\bigskip & \medskip & \smallskip}, for common inter-paragraph
spaces.)
-The @code{*}-version inserts vertical space that non-discardable. More
+The @code{*}-form inserts vertical space that is non-discardable. More
precisely, @LaTeX{} discards vertical space at a page break and the
-@code{*}-version causes the space to stay. This example leaves space
+@code{*}-form causes the space to stay. This example leaves space
between the two questions.
@example
@@ -15723,10 +16185,11 @@ space needed to make the natural length equal to the maximum of the
(@pxref{\protect}). The @var{vert-length} is a rubber length
(@pxref{Lengths}).
-This example illustrates. The @code{picture} draws a scale. In a
-standard @LaTeX{} article the length @code{\baselineskip} is 12@dmn{pt}.
-The two rules here are 22@dmn{pt} apart: the sum of the
-@code{\baselineskip} and the 10@dmn{pt} from the first @code{addvspace}.
+This example illustrates. The @code{picture} draws a scale over which
+to rules are placed. In a standard @LaTeX{} article the length
+@code{\baselineskip} is 12@dmn{pt}. As shown by the scale, the two
+rules are 22@dmn{pt} apart: the sum of the @code{\baselineskip} and the
+10@dmn{pt} from the first @code{\addvspace}.
@example
\documentclass@{article@}
@@ -15773,7 +16236,7 @@ page. So these commands are central.
@PkgIndex{adjustbox}
There are many packages on CTAN that are useful for manipulating boxes.
-One useful adjunct to the commands here is @file{adjustbox}.
+One useful adjunct to the commands here is @package{adjustbox}.
@menu
* \mbox & \makebox:: Horizontal boxes.
@@ -15864,6 +16327,10 @@ The @var{text} is flush left.
Flush right.
@item s
+@c xx TODO add a generic node to make clear that some statement may be
+@c not true for some internationalization or some script. Eg. in Arabic
+@c script or with microtype package I think that the strech also plays
+@c on word width
Stretch the interword space in @var{text} across the entire @var{width}.
The @var{text} must contain stretchable space for this to work. For
instance, this could head a press release:
@@ -15886,8 +16353,8 @@ puts the value of the quiz questions to the left of those questions.
@PkgIndex{Asymptote}
The right edge of the output @samp{10 points } (note the ending space
after @samp{points}) will be just before the @samp{What}. You can use
-@code{\makebox} similarly when making graphics, such as in @file{TikZ}
-or @file{Asymptote}, where you put the edge of the text at a known
+@code{\makebox} similarly when making graphics, such as in @package{TikZ}
+or @package{Asymptote}, where you put the edge of the text at a known
location, regardless of the length of that text.
For boxes with frames see@tie{}@ref{\fbox & \framebox}. For colors
@@ -15920,7 +16387,7 @@ Synopses, one of:
\framebox[@var{width}][@var{position}]@{@var{text}@}
@end example
-Create a box with an enclosing frame, four lines surrounding the space.
+Create a box with an enclosing frame, four rules surrounding the @var{text}.
These commands are the same as @code{\mbox} and @code{\makebox} except
for the frame (@pxref{\mbox & \makebox}). The @code{\fbox} command is
robust, the @code{\framebox} command is fragile (@pxref{\protect}).
@@ -15930,8 +16397,8 @@ robust, the @code{\framebox} command is fragile (@pxref{\protect}).
@end example
@noindent
-@LaTeX{} puts the text into a box that cannot be split or hyphenated.
-Around that box, separated from it by a small gap, are four lines making
+@LaTeX{} puts the text into a box, the text cannot be hyphenated.
+Around that box, separated from it by a small gap, are four rules making
a frame.
The first two command invocations, @code{\fbox@{...@}} and
@@ -15946,7 +16413,7 @@ here is an example creating an empty box that is 1/4@dmn{in} wide.
@end example
@noindent
-The @code{\strut} inserts a vertical height of @code{\baselineskip}
+The @code{\strut} ensures a total height of @code{\baselineskip}
(@pxref{\strut}).
These parameters determine the frame layout.
@@ -15957,7 +16424,7 @@ These parameters determine the frame layout.
@findex frame, line width
@findex frame rule width
@cindex \fboxrule
-The thickness of the lines around the enclosed box. The default is
+The thickness of the rules around the enclosed box. The default is
0.2@dmn{pt}. Change it with a command such as
@code{\setlength@{\fboxrule@}@{0.8pt@}} (@pxref{\setlength}).
@@ -15971,7 +16438,7 @@ Change it with a command such as @code{\setlength@{\fboxsep@}@{0pt@}}
this will put a frame around the picture with no white border.
@example
-@{\setlength@{\fboxsep@}@{0pt@}
+@{\setlength@{\fboxsep@}@{0pt@}%
\framebox@{%
\includegraphics[width=0.5\textwidth]@{prudence.jpg@}@}@}
@end example
@@ -15995,9 +16462,9 @@ paragraph, and then frame the result.
@xref{Colored boxes}, for colors other than black and white.
-The @code{picture} environment has a version of this command where the
-units depend on @code{picture}'s @code{\unitlength} (@pxref{\framebox
-(picture)}).
+The @code{picture} environment has a version of the @code{\framebox}
+command where the units depend on @code{picture}'s @code{\unitlength}
+(@pxref{\framebox (picture)}).
@node \parbox
@@ -16186,6 +16653,7 @@ warning. To fix this use a @code{\parbox} or @code{minipage} as here.
@c credit: egreg https://tex.stackexchange.com/a/41668/121234
@example
+\newsavebox@{\areg@}
\savebox@{\areg@}@{%
\begin@{minipage@}@{\linewidth@}
\begin@{enumerate@}
@@ -16239,8 +16707,8 @@ Synopsis:
@end example
This is the environment form of the @code{\sbox} and @code{\savebox}
-commands, and is equivalent to them. for the full description,
-@xref{\sbox & \savebox}.
+commands, and is equivalent to them. @xref{\sbox & \savebox}, for the
+full description.
The @var{text} inside the environment is saved in the box register
referred to by variable @code{@var{box-cmd}}. The variable name
@@ -16276,7 +16744,7 @@ Synopsis:
Produce the box most recently saved in the box register @var{box-cmd} by
the commands @code{\sbox} or @code{\savebox}, or the @code{lrbox}
-environment. For more information and examples, @xref{\sbox &
+environment. For more information and examples, @pxref{\sbox &
\savebox}. (Note that the variable name @var{box-cmd} starts with a
backslash, @code{\}.) This command is robust (@pxref{\protect}).
@@ -16670,12 +17138,12 @@ This example is the short how-to.
To use the commands described here your document preamble must contain
either @code{\usepackage@{graphicx@}} or
-@code{\usepackage@{graphics@}}. Most of the time, @file{graphicx} is the
+@code{\usepackage@{graphics@}}. Most of the time, @package{graphicx} is the
better choice.
Graphics come in two main types, raster and vector. @LaTeX{} can use
both. In raster graphics the file contains an entry for each location
-in an array, describing what color it is. An example is a photograph,
+in an array, describing what color it is. An example is a photograph
in JPG format. In vector graphics, the file contains a list of
instructions such as @samp{draw a circle with this radius and that
center}. An example is a line drawing produced by the Asymptote
@@ -16724,7 +17192,7 @@ or
The @code{graphicx} package has a format for optional arguments to the
@code{\includegraphics} command that is convenient (it is the key-value
format), so it is the better choice for new documents. When you load
-the @file{graphics} or @file{graphicx} package with @code{\usepackage}
+the @package{graphics} or @package{graphicx} package with @code{\usepackage}
there are two kinds of available options.
The first is that @LaTeX{} does not contain information about different
@@ -16929,7 +17397,7 @@ the most recent @file{pdftex.def} has this extension list.
@end example
@PkgIndex{grfext}
-To change the order, use the @code{grfext} package.
+To change the order, use the @package{grfext} package.
You can use this command anywhere in the document. You can use it more
than once. Show its value with
@@ -16949,7 +17417,7 @@ Synopsis:
Declare how to handle graphic files whose names end in @var{extension}.
-This example declares that all files with names have the form
+This example declares that all files with names of the form
@file{filename-without-dot.mps} will be treated as output from MetaPost,
meaning that the printer driver will use its MetaPost-handling code to
input the file.
@@ -17026,8 +17494,8 @@ See the documentation for your @TeX{} distribution.
@cindex graphics package commands
@cindex commands, graphics package
-These are the commands available with the @file{graphics} and
-@file{graphicx} packages.
+These are the commands available with the @package{graphics} and
+@package{graphicx} packages.
@menu
* \includegraphics:: Using a graphic in your document.
@@ -17051,7 +17519,7 @@ These are the commands available with the @file{graphics} and
@cindex PNG files
@findex \includegraphics
-Synopses for @file{graphics} package:
+Synopses for @package{graphics} package:
@example
\includegraphics@{@var{filename}@}
@@ -17062,7 +17530,7 @@ Synopses for @file{graphics} package:
\includegraphics*[@var{llx},@var{lly}][@var{urx},@var{ury}]@{@var{filename}@}
@end example
-Synopses for @file{graphicx} package:
+Synopses for @package{graphicx} package:
@example
\includegraphics@{@var{filename}@}
@@ -17105,7 +17573,7 @@ with that extension (@pxref{\DeclareGraphicsExtensions}).
If your file name contains dots before the extension then you can hide
them with curly braces, as in
@code{\includegraphics@{@{plot.2018.03.12.a@}.pdf@}}. Or, if you use
-the @file{graphicx} package then you can use the options @code{type} and
+the @package{graphicx} package then you can use the options @code{type} and
@code{ext}; see below. This and other filename issues are also handled
with the package @file{grffile}.
@@ -17152,7 +17620,7 @@ text, with the two vertically centered.
\end@{center@}
@end example
-If you use the @file{graphics} package then the only options involve the
+If you use the @package{graphics} package then the only options involve the
size of the graphic (but see @ref{\rotatebox} and @ref{\scalebox}).
When one optional argument is present then it is
@code{[@var{urx},@var{ury}]} and it gives the coordinates of the top
@@ -17165,7 +17633,7 @@ lower left. Thus, @code{\includegraphics[1in,0.618in]@{...@}} calls for
the graphic to be placed so it is 1@tie{}inch wide and 0.618@tie{}inches
tall and so its origin is at (0,0).
-The @file{graphicx} package gives you many more options. Specify them
+The @package{graphicx} package gives you many more options. Specify them
in a key-value form, as here.
@example
@@ -17445,13 +17913,13 @@ external commands.
@cindex rotating text
@findex \rotatebox
-Synopsis if you use the @file{graphics} package:
+Synopsis if you use the @package{graphics} package:
@example
\rotatebox@{@var{angle}@}@{@var{material}@}
@end example
-Synopses if you use the @file{graphicx} package:
+Synopses if you use the @package{graphicx} package:
@example
\rotatebox@{@var{angle}@}@{@var{material}@}
@@ -17487,8 +17955,8 @@ from the first step (they need not coincide vertically). This new
bounding box, in its new position, is what @LaTeX{} uses as the box when
typesetting this material.
-If you use the @file{graphics} package then the rotation is about the
-reference point of the box. If you use the @file{graphicx} package
+If you use the @package{graphics} package then the rotation is about the
+reference point of the box. If you use the @package{graphicx} package
then these are the options that can go in the @var{key-value list},
but note that you can get the same effect without needing this
package, except for the @code{x} and @code{y} options
@@ -17566,14 +18034,14 @@ You can use this command to resize a graphic, as here.
@end example
@noindent
-If you use the @file{graphicx} package then you can accomplish the same
+If you use the @package{graphicx} package then you can accomplish the same
thing with optional arguments to @code{\includegraphics}
(@pxref{\includegraphics}).
The @code{\reflectbox} command abbreviates
@code{\scalebox@{-1@}[1]@{@var{material}@}}. Thus, @code{Able was
I\reflectbox@{Able was I@}} will show the phrase @samp{Able was I}
-immediately followed by its mirror reflection.
+immediately followed by its mirror reflection against a vertical axis.
@node \resizebox
@@ -17609,7 +18077,7 @@ vertically by the same factor to keep it from being distorted.
The unstarred form @code{\resizebox} takes @var{vertical length} to be
the box's height while the starred form @code{\resizebox*} takes it to
be height+depth. For instance, make the text have a height+depth of a
-quarter inch with @code{\resizebox*@{!@}@{0.25in@}@{\parbox@{1in@}@{This
+quarter-inch with @code{\resizebox*@{!@}@{0.25in@}@{\parbox@{3.5in@}@{This
box has both height and depth.@}@}}.
You can use @code{\depth}, @code{\height}, @code{\totalheight}, and
@@ -17739,20 +18207,20 @@ you need to do expansion. Here the @code{\Schoolname} produces
@end example
@PkgIndex{textcase}
-The @file{textcase} package brings some of the missing feature of the
+The @package{textcase} package brings some of the missing feature of the
standard @LaTeX{} commands @code{\MakeUppercase} and
@code{\MakeLowerCase}.
@PkgIndex{mfirstuc}
To uppercase only the first letter of words, you can use the package
-@file{mfirstuc}.
+@package{mfirstuc}.
@PkgIndex{expl3}
@cindex Wright, Joseph
Handling all the casing rules specified by Unicode, e.g., for
non-Latin scripts, is a much bigger job than anything envisioned in
the original @TeX{} and @LaTeX{}. It has been implemented in the
-@code{expl3} package as of 2020. The article ``Case changing: From
+@package{expl3} package as of 2020. The article ``Case changing: From
@TeX{} primitives to the Unicode algorithm'', (Joseph Wright,
@cite{TUGboat}@tie{}41:1,
@url{https://tug.org/TUGboat/tb41-1/tb127wright-case.pdf}), gives a
@@ -17978,7 +18446,7 @@ for spacing around em-dashes vary widely.
The Euro currency symbol: @euro{}.
@PkgIndex{eurosym}
For an alternative glyph design, try the
-@file{eurosym} package; also, most fonts nowadays come with their own
+@package{eurosym} package; also, most fonts nowadays come with their own
Euro symbol (Unicode U+20AC).
@item \textexclamdown @r{(or @code{!`})}
@@ -18118,9 +18586,9 @@ _ Underscore.
@PkgIndex{polyglossia}
@cindex multilingual support
@LaTeX{} has wide support for many of the world's scripts and
-languages, provided through the core @code{babel} package, which
+languages, provided through the core @package{babel} package, which
supports pdf@LaTeX{}, Xe@LaTeX{} and Lua@LaTeX{}. The
-@file{polyglossia} package provides similar support with the latter
+@package{polyglossia} package provides similar support with the latter
two engines.
This section does not cover that support. It only lists the core
@@ -18252,8 +18720,12 @@ thus crossing through descenders. See also @code{\underline} in
@findex \newtie
@findex \capitalnewtie
@cindex tie-after accent
-@tieaccent{oo} Tie-after accent. The @code{\newtie} form is centered in
-its box.
+@iftex
+@tieaccent{oo}
+@end iftex
+Tie-after accent (used for transliterating from Cyrillic, such as in the
+ALA-LC romanization). It expects that the argument has two characters.
+The @code{\newtie} form is centered in its box.
@item \u
@itemx \capitalbreve
@@ -18289,9 +18761,9 @@ Synopsis:
@end example
A @TeX{} primitive command used to generate accented characters from
-accent marks and letters. The accent mark is selected by @var{number},
-a numeric argument, followed by a space and then a @var{character} argument
-constructs the accented character in the current font.
+accent marks and letters. The accent mark is selected by @var{number}, a
+numeric argument, followed by a space and then a @var{character}
+argument to construct the accented character in the current font.
These are accented @samp{e} characters.
@@ -18304,7 +18776,8 @@ These are accented @samp{e} characters.
@end example
@noindent
-The first is a grave, the second is breve, etc.
+The first is a grave, the second a caron, the third a breve, the fourth
+a macron, and the fifth a ring above.
The position of the accent is determined by the font designer and so the
outcome of @code{\accent} use may differ between fonts. In @LaTeX{} it is
@@ -18347,22 +18820,22 @@ than English.
@table @code
@item \aa
@itemx \AA
-@findex \aa (@aa{})
-@findex \AA (@AA{})
+@findex \aa @r{(@aa{})}
+@findex \AA @r{(@AA{})}
@cindex aring
@aa{} and @AA{}.
@item \ae
@itemx \AE
-@findex \ae (@ae{})
-@findex \AE (@AE{})
+@findex \ae @r{(@ae{})}
+@findex \AE @r{(@AE{})}
@cindex ae ligature
@ae{} and @AE{}.
@item \dh
@itemx \DH
-@findex \dh (@dh{})
-@findex \DH (@DH{})
+@findex \dh @r{(@dh{})}
+@findex \DH @r{(@DH{})}
@cindex Icelandic eth
@cindex eth, Icelandic letter
Icelandic letter eth: @dh{} and @DH{}. Not available with @sc{OT1}
@@ -18379,15 +18852,15 @@ select an alternate font encoding, such as @sc{T1}.
@item \ij
@itemx \IJ
-@findex \ij (ij)
-@findex \IJ (IJ)
+@findex \ij @r{(ij)}
+@findex \IJ @r{(IJ)}
@cindex ij letter, Dutch
ij and IJ (except somewhat closer together than appears here).
@item \l
@itemx \L
-@findex \l (@l{})
-@findex \L (@L{})
+@findex \l @r{(@l{})}
+@findex \L @r{(@L{})}
@cindex polish l
@l{} and @L{}.
@@ -18399,30 +18872,30 @@ Lappish letter eng, also used in phonetics.
@item \o
@itemx \O
-@findex \o (@o{})
-@findex \O (@O{})
+@findex \o @r{(@o{})}
+@findex \O @r{(@O{})}
@cindex oslash
@o{} and @O{}.
@item \oe
@itemx \OE
-@findex \oe (@oe{})
-@findex \OE (@OE{})
+@findex \oe @r{(@oe{})}
+@findex \OE @r{(@OE{})}
@cindex oe ligature
@oe{} and @OE{}.
@item \ss
@itemx \SS
-@findex \ss (@ss{})
-@findex \SS (SS)
+@findex \ss @r{(@ss{})}
+@findex \SS @r{(SS)}
@cindex es-zet German letter
@cindex sharp S letters
@ss{} and SS.
@item \th
@itemx \TH
-@findex \th (@th{})
-@findex \TH (@TH{})
+@findex \th @r{(@th{})}
+@findex \TH @r{(@TH{})}
@cindex Icelandic thorn
@cindex thorn, Icelandic letter
Icelandic letter thorn: @th{} and @TH{}. Not available with @sc{OT1}
@@ -18455,7 +18928,7 @@ In a computer file, the characters are stored according to a scheme
called the @dfn{encoding}. There are many different encodings. The
simplest is ASCII, which supports 95 printable characters, not enough
for most of the world's languages. For instance, to typeset the
-a-umlaut character @"{a} in an ASCII-encoded @LaTeX{} source file, the
+a-umlaut character @samp{@"{a}} in an ASCII-encoded @LaTeX{} source file, the
sequence @code{\"a} is used. This would make source files for anything
but English hard to read; even for English, often a more extensive
encoding is more convenient.
@@ -18489,6 +18962,8 @@ is a left single quote from a web page using @code{latin1} inside a
replace the non-UTF-8 character with its UTF-8 equivalent, or use a
@LaTeX{} equivalent command or character.
+@findex \inputencoding
+@anchor{\inputencoding}
In some documents, such as a collection of journal articles from a
variety of authors, changing the encoding in mid-document may be
necessary. Use the command
@@ -18523,7 +18998,7 @@ or just ``qed'', often used to mark the end of a proof:
@PkgIndex{amsthm}
@noindent
-The @file{amsthm} package includes this command, with a somewhat
+The @package{amsthm} package includes this command, with a somewhat
different-looking symbol.
The mandatory arguments give the horizontal @var{width} and vertical
@@ -18566,7 +19041,7 @@ Produce today's date in the format @samp{@var{month} @var{dd},
@PkgIndex{babel}
@PkgIndex{polyglossia}
-Multilingual packages such as @file{babel} or @file{polyglossia}, or
+Multilingual packages such as @package{babel} or @package{polyglossia}, or
classes such as @file{lettre}, will localize @code{\today}. For example,
the following will output @samp{4 juillet 1976}:
@@ -18584,7 +19059,7 @@ the following will output @samp{4 juillet 1976}:
@code{\year} (@pxref{\day & \month & \year}).
@PkgIndex{datetime}
-A number of package on CTAN work with dates. One is @file{datetime} package
+A number of package on CTAN work with dates. One is @package{datetime} package
which can produce a wide variety of date formats, including ISO standards.
The date is not updated as the @LaTeX{} process runs, so in principle the
@@ -18795,6 +19270,7 @@ should avoid spaces in the file names. The tradition is to instead use
dashes or underscores. Nevertheless, for the name @samp{amo amas amat},
this works under @TeX{} Live on GNU/Linux:
+@findex \space
@example
\documentclass@{book@}
\includeonly@{
@@ -18873,6 +19349,7 @@ should avoid spaces in the file names. The tradition is to instead use
dashes or underscores. Nevertheless, for the name @samp{amo amas amat},
this works under @TeX{} Live on GNU/Linux:
+@findex \space
@example
\input@{"amo\space amas\space amat"@}
@end example
@@ -18893,9 +19370,9 @@ and this works under MiK@TeX{} on Windows:
* Glossaries:: Generate a glossary.
@end menu
-
+@c no comma in the node name because Texinfo doesn't support that well.
@node Table of contents etc.
-@section Table of contents etc.
+@section Table of contents, list of figures, list of tables
@cindex table of contents, creating
@@ -19031,9 +19508,9 @@ inside a box of width @code{\@@pnumwidth}. By default
@PkgIndex{tocloft}
@PkgIndex{tocbibbind}
CTAN has many packages for the table of contents and lists of figures
-and tables (@pxref{CTAN}). The package @file{tocloft} is convenient for
+and tables (@pxref{CTAN}). The package @package{tocloft} is convenient for
adjusting some aspects of the default such as spacing. And,
-@file{tocbibbind} will automatically add the bibliography, index,
+@package{tocbibbind} will automatically add the bibliography, index,
etc. to the table of contents.
To change the header for the table of contents page, do something like
@@ -19048,7 +19525,7 @@ these commands before you call @code{\tableofcontents}, etc.
@noindent
@PkgIndex{babel}
@PkgIndex{polyglossia}
-Internationalization packages such as @file{babel} or @file{polyglossia}
+Internationalization packages such as @package{babel} or @package{polyglossia}
will change these headers depending on the chosen base language.
@menu
@@ -19091,19 +19568,19 @@ file contains these definitions:
In this example, @code{\@@dottedcline} appears to have been given only
three arguments. But tracing the internal code shows that it picks up
the final @var{text} and @var{pagenumber} arguments in the synopsis
-from a call to @code{\contentsline}.
+from a call to @code{\contentsline} (@pxref{\contentsline}).
@cindex leaders, dots in table of contents
Between the box for the title text of a section and the right margin
box, these @code{\@@dottedtocline} commands insert @dfn{leaders}, that
is, evenly-spaced dots. The dot-to-dot space is given by the command
-@code{\@@dotsep}. By default it is 4.5 (it is in math units, which
-are @code{1/18}@tie{}em. Change it using @code{\renewcommand}, as
-in @code{\renewcommand@{\@@dotsep@}@{3.5@}}.
+@code{\@@dotsep}. By default it is 4.5 (it is in math units, aka.@:
+@code{mu}, which are @code{1/18}@tie{}em. Change it using
+@code{\renewcommand}, as in @code{\renewcommand@{\@@dotsep@}@{3.5@}}.
-In the default book class, @LaTeX{} does not use dotted leaders for
-the Part and Chapter table entries, and in the default article class
-it does not use dotted leaders for Section entries.
+In the standard @file{book} class, @LaTeX{} does not use dotted leaders
+for the Part and Chapter table entries, and in the standard
+@file{article} class it does not use dotted leaders for Section entries.
@node \addcontentsline
@@ -19131,22 +19608,24 @@ contents.
@noindent
It will appear at the same indentation level as the sections, will be in
boldface, and will be assigned the page number associated with the point
-where it appears in the input file.
+where the command appears in the input file.
The @code{\addcontentsline} command writes information to the file
-@file{@var{root-name}.@var{ext}}. It writes that information as the
-text of the command
+@file{@var{root-name}.@var{ext}}, where @var{root-name} is the file name
+of the root file (@pxref{Splitting the input}). It writes that
+information as the text of the command
@code{\contentsline@{@var{unit}@}@{@var{text}@}@{@var{num}@}}, where
@code{@var{num}} is the current value of counter @code{@var{unit}}
(@pxref{\contentsline}). The most common case is the table of contents
and there @var{num} is the page number of the first page of @var{unit}.
This command is invoked by the sectioning commands @code{\chapter},
-etc., and also by @code{\caption} inside a float environment. But it is
-also used by authors. For example, an author writing a book whose style
-is to have an unnumbered preface may use the starred @code{\chapter*}.
-But that command leaves out table of contents information, which can be
-entered manually, as here.
+etc. (@pxref{Sectioning}), and also by @code{\caption} inside a float
+environment (@pxref{Floats}). But it is also directly used by authors.
+For example, an author writing a book whose style is to have an
+unnumbered preface may use the starred @code{\chapter*}. But that
+command leaves out table of contents information, which can be entered
+manually, as here.
@example
\chapter*@{Preface@}
@@ -19154,9 +19633,10 @@ entered manually, as here.
@end example
@noindent
-In the @file{.toc} file @LaTeX{} will put the line @code{\contentsline
-@{chapter@}@{\numberline @{@}Preface@}@{3@}}; note that the page number
-@samp{3} is automatically generated by the system, not entered manually.
+In the @file{@var{root-name}.toc} file @LaTeX{} will put the line
+@code{\contentsline @{chapter@}@{\numberline @{@}Preface@}@{3@}}; note
+that the page number @samp{3} is automatically generated by the system,
+not entered manually.
All of the arguments for @code{\addcontentsline} are required.
@@ -19167,7 +19647,8 @@ Typically one of the strings @code{toc} for the table of contents,
tables. The filename extension of the information file.
@item unit
-A string that depends on the value of the @var{ext} argument:
+A string that depends on the value of the @var{ext} argument, typically
+one of:
@table @code
@item toc
@@ -19182,8 +19663,8 @@ For the list of tables: @code{table}.
@end table
@item text
-The text of the entry. You must @code{\protect} any commands that are
-fragile (@pxref{\protect}).
+The text of the entry. You must @code{\protect} any fragile commands
+(@pxref{\protect}) used in it.
@end table
The @code{\addcontentsline} command has an interaction with
@@ -19193,7 +19674,8 @@ the same level, as with
in the table of contents can come out in the wrong order. The solution
is to move @code{\addcontentsline} into the file being included.
-If you use a @var{unit} that @LaTeX{} does not recognize, as here
+If you use a @var{unit} that @LaTeX{} does not recognize, as with the
+typo here
@example
\addcontentsline@{toc@}@{setcion@}@{\protect\textbf@{Appendices@}@}
@@ -19308,7 +19790,7 @@ Usually adding material to these lists is done automatically by the
commands @code{\chapter}, @code{\section}, etc. for the table of
contents, or by the @code{\caption} command inside of a @code{\figure}
or @code{\table} environment (@pxref{figure} and @pxref{table}). Thus,
-where the base file is @file{thesis.tex}, and contains the declaration
+where the root file is @file{thesis.tex}, and contains the declaration
@code{\tableofcontents}, the command @code{\chapter@{Chapter One@}}
produces something like this in the file @file{thesis.toc}.
@@ -19329,15 +19811,18 @@ To manually add material, use
where @var{filetype} is @code{toc}, @code{lof}, or @code{lot}
(@pxref{\addcontentsline}).
+@PkgIndex{tocloft}
For manipulating how the @code{\contentline} material is typeset, see
-the @file{tocloft} package.
+the @package{tocloft} package.
-Note that the @code{hyperref} package changes the definition of
+@PkgIndex{hyperref}
+Note that the @package{hyperref} package changes the definition of
@code{\contentsline} (and @code{\addcontentsline}) to add more
arguments, to make hyperlinks. This is the source of the error
-@code{Argument of \contentsline has an extra @}}. Fix this error by
-deleting the @file{.toc} or @file{.lof} or @file{.lot} file, and running
-@LaTeX{} again.
+@code{Argument of \contentsline has an extra @}} when one adds/remove
+the use of package @package{hyperref} and a compilation was already run.
+Fix this error by deleting the @file{.toc} or @file{.lof} or @file{.lot}
+file, and running @LaTeX{} again.
@node \nofiles
@@ -19389,7 +19874,7 @@ Typeset its argument flush left in a box. This is used in a
@code{\contentsline} command to typeset the section number
(@pxref{\contentsline}).
-For example, this line in a @file{.toc} file causes the @code{1} to be
+For example, this line in a @file{.toc} file causes the @code{1.1} to be
typeset flush left.
@example
@@ -19400,16 +19885,22 @@ By default, @LaTeX{} typesets the section numbers in a box of length
@code{\@@tempdima}. That length is set by the commands
@code{\l@@section}, @code{\l@@subsection}, etc. Put section numbers
inside a natural-width box with
-@code{\renewcommand@{\numberline@}[1]@{#1~@}}.
+@code{\renewcommand@{\numberline@}[1]@{#1~@}} before
+@code{\tableofcontents}.
-This command is fragile, so you may need to precede it with
+This command is fragile so you may need to precede it with
@code{\protect} (@pxref{\protect}). An example is the use of
-@code{\protect} in the command
+@code{\protect} in this command,
+
+@example
@code{\addcontentsline@{toc@}@{section@}@{\protect\numberline@{@}Summary@}}
-to get the @code{\numberline} into this command in the @file{.toc} file:
-@code{\contentsline @{section@}@{\numberline @{@}Summary@}@{6@}} (the
-page number @samp{6} is automatically added by @LaTeX{};
-@pxref{\addcontentsline}).
+@end example
+
+@noindent
+to get the @code{\numberline} into the @code{\contentsline}
+command in the @file{.toc} file: @code{\contentsline
+@{section@}@{\numberline @{@}Summary@}@{6@}} (the page number @samp{6}
+is automatically added by @LaTeX{}; @pxref{\addcontentsline}).
@node Indexes
@@ -19421,55 +19912,114 @@ page number @samp{6} is automatically added by @LaTeX{};
@findex \index
@cindex @file{.idx} file
-This document has an index.
+If you tell @LaTeX{} what terms you want to appear in an index then it
+can produce that index, alphabetized and with the page numbers
+automatically maintained. This illustrates the basics.
@example
\documentclass@{article@}
-\usepackage@{makeidx@} \makeindex
+\usepackage@{makeidx@} % Provide indexing commands
+ \makeindex
+% \usepackage@{showidx@} % Show marginal notes of index entries
...
\begin@{document@}
...
-Recall Wilson's Theorem: \index@{Wilson's Theorem@}
-a number \( n>1 \) is prime if and only if the factorial of \( n-1 \)
-is congruent to \( -1 \) modulo~\( n \).
+Wilson's Theorem\index@{Wilson's Theorem@}
+says that a number $n>1$ is prime if and only if the factorial
+of $n-1$ is congruent to $-1$
+modulo~$n$.\index@{congruence!and Wilson's Theorem@}
...
\printindex
- ...
+\end@{document@}
@end example
@noindent
-The @code{\usepackage@{makeidx@}} and @code{\makeindex} in the preamble
-bring in the relevant commands.
-
-Producing an index is a three stage process. First, in the document
-body you declare index entries with the @code{\index} command
+As that shows, declare index entries with the @code{\index} command
(@pxref{\index}). When you run @LaTeX{}, the @code{\index} writes its
-information to an auxiliary file @file{@var{root-name}.idx}. Next, to
-alphabetize and to do other manipulations you run an external command,
-typically @command{makeindex} or @command{xindy} (@pxref{makeindex}).
-These output a file @file{@var{root-name}.ind}. Finally, you bring the
-information back into your document and typeset it with the
-@code{\printindex} command (@pxref{\printindex}).
+information, such as @samp{Wilson's Theorem} and the page number, to an
+auxiliary file whose name ends in @file{.idx}. Next, to alphabetize and
+do other manipulations, run an external command, typically
+@command{makeindex} (@pxref{makeindex}), which writes a file whose name
+ends in @file{.ind}. Finally, @code{\printindex} brings this
+manipulated information into the output (@pxref{\printindex}).
+
+Thus, if the above example is in the file @file{numth.tex} then running
+@samp{pdflatex numth} will save index entry and page number information
+to @file{numth.idx}. Then running @samp{makeindex numth} will
+alphabetize and save the results to @file{numth.ind}. Finally, again
+running @samp{pdflatex numth} will show the desired index, at the place
+where the @code{\printindex} command is in the source file.
+
+There are many options for the output. An example is that the
+exclamation point in @code{\index@{congruence!and Wilson's Theorem@}}
+produces a main entry of @samp{congruence} with a subentry of @samp{and
+Wilson's Theorem}. For more, @pxref{makeindex}.
+
+The @code{\makeindex} and @code{\printindex} commands are independent.
+Leaving out the @code{\makeindex} will stop @LaTeX{} from saving the
+index entries to the auxiliary file. Leaving out the @code{\printindex}
+will cause @LaTeX{} to not show the index in the document output.
@PkgIndex{showidx}
@PkgIndex{multind}
@cindex index, multiple
@cindex multiple indexes
-There are many packages in the area of indexing. The @code{showidx}
+There are many packages in the area of indexing. The @package{showidx}
package causes each index entries to be shown in the margin on the
-page where the entry appears. This can help in preparing the index.
-The @code{multind} package, among others, supports multiple indexes.
+page where the @code{\index} appears. This can help in preparing the index.
+The @package{multind} package, among others, supports multiple indexes.
See also the @TeX{} FAQ entry on this topic,
@url{https://www.texfaq.org/FAQ-multind}, and the CTAN topic,
@url{https://ctan.org/topic/index-multi}.
@menu
+* Produce the index manually:: Alphabetize entries yourself.
* \index:: Declare an index entry.
-* makeindex:: Alphabetize index entries.
+* makeindex:: Alphabetize index entries automatically.
* \printindex:: Put the index here.
@end menu
+@node Produce the index manually
+@subsection Produce the index manually
+
+@cindex index, producing manually
+@findex theindex
+
+Documents that are small and static can have a manually produced index.
+This will make a separate page labeled @samp{Index}, in twocolumn
+format.
+
+@EnvIndex{theindex}
+@example
+\begin@{theindex@}
+\item acorn squash, 1
+\subitem maple baked, 2
+\indexspace
+\item bacon, 3
+\subitem maple baked, 4
+\end@{theindex@}
+@end example
+
+Note that the author must enter the page numbers, which is tedious and
+which will result in wrong numbers if the document changes. This is why
+in most cases automated methods such as @command{makeindex} are best.
+@xref{Indexes}.
+
+@findex \item
+@findex \subitem
+@findex \subsubitem
+@findex \indexspace
+However we cover the commands for completeness, and because the
+automated methods are based on these commands. There are three levels
+of entries. As the example shows, a main entry uses @code{\item},
+subentries use @code{\subitem}, and the lowest level uses
+@code{\subsubitem}. Blank lines between entries have no effect. The
+example above includes @code{\indexspace} to produce vertical space in
+the output that some index styles use before the first entry starting
+with a new letter.
+
+
@node \index
@subsection @code{\index}
@@ -19491,6 +20041,8 @@ process the index entries with @code{makeindex test}, and then compile
again with @code{pdflatex test}.
@example
+% file test.tex
+ ...
W~Ackermann (1896--1962).\index@{Ackermann@}
...
Ackermann function\index@{Ackermann!function@}
@@ -19498,6 +20050,7 @@ Ackermann function\index@{Ackermann!function@}
rate of growth\index@{Ackermann!function!growth rate@}
@end example
+@cindex index entries, subentries
@noindent
All three index entries will get a page number, such as @samp{Ackermann,
22}. @LaTeX{} will format the second as a subitem of the first, on the
@@ -19505,7 +20058,8 @@ line below it and indented, and the third as a subitem of the second.
Three levels deep is as far as you can nest subentries. (If you add
@code{\index@{Ackermann!function!growth rate!comparison@}} then
@command{makeindex} says @samp{Scanning input file test.idx....done (4
-entries accepted, 1 rejected)} and nothing appears in the index).
+entries accepted, 1 rejected)} and the fourth level is silently missing
+from the index.)
If you enter a second @code{\index} with the same
@var{index-entry-string} then you will get a single index entry with two
@@ -19522,14 +20076,14 @@ Get a page range in the output, like @samp{Hilbert, 23--27}, as here.
@example
W~Ackermann (1896--1962).\index@{Ackermann@}
...
-D~Hilbert (1862--1943)\index@{Ackermann!Hilbert\(@}
+D~Hilbert (1862--1943)\index@{Ackermann!Hilbert|(@}
...
-disapproved of his marriage.\index@{Ackermann!Hilbert\)@}
+disapproved of his marriage.\index@{Ackermann!Hilbert|)@}
@end example
@noindent
If the beginning and ending of the page range are equal then the system
-just gives a single page entry, not a range.
+just gives a single page number, not a range.
If you index subentries but not a main entry, as with
@code{\index@{Jones!program@}} and @code{\index@{Jones!results@}}, then
@@ -19543,16 +20097,15 @@ followed by two subitems, like @samp{program, 50} and @samp{results,
@findex \alsoname
@PkgIndex{babel} @PkgIndex{polyglossia}
-Generate a index entry that says @samp{See} by using a vertical bar
+Generate a index entry that says @samp{see} by using a vertical bar
character: @code{\index@{Ackermann!function|see@{P\'eter's
-function@}@}}. You can instead get @samp{See also} with @code{seealso}.
-(The text @samp{See} is defined by @code{\seename}, and @samp{See also}
+function@}@}}. You can instead get @samp{see also} with @code{seealso}.
+(The text @samp{see} is defined by @code{\seename}, and @samp{see also}
by @code{\alsoname}. You can redefine these either by using an
-internationalization package such as @file{babel} or @file{polyglossia},
-or directly as with @code{\renewcommand@{\alsoname@}[1]@{Also see
-#1@}}.)
+internationalization package such as @package{babel} or @package{polyglossia},
+or directly as with @code{\renewcommand@{\alsoname@}@{Also see@}}.)
-The @samp{See} feature is part of a more general functionality. After
+The @samp{see} feature is part of a more general functionality. After
the vertical bar you can put the name of a one-input command, as in
@code{\index@{group|textit@}} (note the missing backslash on the
@code{\textit} command) and the system will apply that command to the
@@ -19594,13 +20147,13 @@ then @var{pos} gives the alphabetical position of the entry while
@samp{SMC} alphabetized into a different location than its spelling
would naturally give it.
-To put a @code{!}, or @code{@@}, or @code{|} character in an index
-entry, preceding it with a double quote, @code{"}. (The double quote
-gets deleted before alphabetization.)
+To put a @code{!}, or @code{@@}, or @code{|}, or @code{"} character in
+an index entry, escape it by preceding it with a double quote, @code{"}.
+(The double quote gets deleted before alphabetization.)
@PkgIndex{index}
A number of packages on CTAN have additional functionality beyond that
-provided by @file{makeidx}. One is @file{index}, which allows for
+provided by @package{makeidx}. One is @package{index}, which allows for
multiple indices and contains a command
@code{\index*@{@var{index-entry-string}@}} that prints the
@var{index-entry-string} as well as indexing it.
@@ -19628,7 +20181,7 @@ Runaway argument? @{Ackermann!function
@subsection @command{makeindex}
@cindex index, processing
-@findex makeindex
+@findex makeindex, @r{program}
@cindex @command{makeindex} program
@cindex @file{.ind} file
@cindex @file{.idx} file
@@ -19678,7 +20231,7 @@ on CTAN.
A style file consists of a list of pairs: @var{specifier} and
@var{attribute}. These can appear in the file in any order. All of the
-@var{attributes} are strings, except where noted. Strings are
+@var{attribute}s are strings, except where noted. Strings are
surrounded with double quotes, @code{"}, and the maximum length of a
string is 144 characters. The @code{\n} is for a newline and @code{\t}
is for a tab. Backslashes are escaped with another backslash,
@@ -19688,21 +20241,21 @@ comment.
@ftable @code
@anchor{makeindex preamble}
@item preamble
-Preamble of the output file. Defines the context in which the index is
+Preamble of the output index file. Defines the context in which the index is
formatted. Default: @code{"\\begin@{theindex@}\n"}.
@anchor{makeindex postamble}
@item postamble
-Postamble of the output file. Default: @code{"\n\n\\end@{theindex@}\n"}.
+Postamble of the output index file. Default: @code{"\n\n\\end@{theindex@}\n"}.
@anchor{makeindex group skip}
@item group_skip
@findex \indexspace
Traditionally index items are broken into groups, typically a group for
-entries starting with @samp{a}, etc. This specifier gives what is
-inserted when a new group begins. Default: @code{"\n\n \\indexspace\n"}
-(@code{\indexspace} is a command inserting a rubber length, by default
-@code{10pt plus5pt minus3pt}).
+entries starting with letter @samp{a}, etc. This specifier gives what
+is inserted when a new group begins. Default: @code{"\n\n
+\\indexspace\n"} (@code{\indexspace} is a command inserting a rubber
+length, by default @code{10pt plus5pt minus3pt}).
@anchor{makeindex letheadflag}
@item lethead_flag
@@ -19816,7 +20369,7 @@ roman @code{R}, and uppercase alphabetic @code{A}. Default:
@findex xindy @r{program}
There are a number of other programs that do the job
@command{makeindex} does. One is @command{xindy}
-(https://ctan.org/pkg/xindy), which does internationalization and can
+(@uref{https://ctan.org/pkg/xindy}), which does internationalization and can
process indexes for documents marked up using @LaTeX{} and a number of
other languages. It is written in Lisp, highly configurable, both in
markup terms and in terms of the collating order of the text, as
@@ -19839,9 +20392,9 @@ Synopsis:
\printindex
@end example
-@findex \printindex
Place the index into the output.
+@PkgIndex{makeidx}
To get an index you must first include
@code{\usepackage@{makeidx@}\makeindex} in the document preamble and
compile the document, then run the system command @command{makeindex},
@@ -20310,7 +20863,7 @@ The first column contains the return address twice. The second column
contains the address for each recipient.
@PkgIndex{envlab}
-The package @code{envlab} makes formatting the labels easier, with
+The package @package{envlab} makes formatting the labels easier, with
standard sizes already provided. The preamble lines
@code{\usepackage[personalenvelope]@{envlab@}} and @code{\makelabels}
are all that you need to print envelopes.
@@ -20479,9 +21032,9 @@ or:
\openout @var{number}=@var{filename}
@end example
-Open a file for reading material, or for writing it. The @var{number}
-must be between 0 and 15, as in @code{\openin3} (in Lua@LaTeX{}
-@var{number} can be between 0 and 255).
+Open a file for reading material, or for writing it. In most engines,
+the @var{number} must be between 0 and 15, as in @code{\openin3}; in
+Lua@LaTeX{}, @var{number} can be between 0 and 127.
Here @TeX{} opens the file @file{presidents.tex} for reading.
@@ -20584,7 +21137,7 @@ To read an entire file as additional @LaTeX{} source, use
@PkgIndex{datatool}
@cindex mail merges
A common reason to want to read from a data file is to do mail merges.
-CTAN has a number of packages for that; one is @file{datatool}.
+CTAN has a number of packages for that; one is @package{datatool}.
@node \typein
@@ -20675,11 +21228,12 @@ outputs @samp{Recommendation for John Dee}. Like what happens here with
@code{\renewcommand} (among others) are replaced by their definitions
before being printed.
+@findex \space
@LaTeX{}'s usual rules for treating multiple spaces as a single space
-and ignoring spaces after a command name apply to @code{msg}. As above,
-use the command @code{\space} to get a single space, independent of
-surrounding spaces. Use @code{^^J} to get a newline. Get a percent
-character with @code{\csname @@percentchar\endcsname}.
+and ignoring spaces after a command name apply to @code{msg}. Use the
+command @code{\space} to get a single space, independent of surrounding
+spaces. Use @code{^^J} to get a newline. Get a percent character with
+@code{\csname @@percentchar\endcsname}.
This command can be useful for simple debugging, as here:
@@ -20840,7 +21394,7 @@ file:
A common case where authors need to write their own file is for
answers to exercises, or another situation where you want to write
out verbatim, without expanding the macros. CTAN has a number of
-packages for this; one is @file{answers}.
+packages for this; one is @package{answers}.
@menu
* \write and security:: Security.
@@ -21018,7 +21572,7 @@ in which case this is the option argument.
You sometimes need to do a multi-step process to get the information
that you want. This will insert into the input a list of all PDF files
-in the current directory (but see @file{texosquery} below):
+in the current directory (but see @package{texosquery} below):
@example
\immediate\write18@{ls *.pdf > tmp.dat@}
@@ -21064,19 +21618,19 @@ the @code{SHELL} environment variable, is ignored.
@cindex directory listings, from system
If what you need is system information, such as the operating system
name, locale information, or directory contents, take a look at the
-@file{texosquery} package, which provides a convenient and secure
+@package{texosquery} package, which provides a convenient and secure
interface for this, unlike the above examples using the raw
@code{\write18}: @url{https://ctan.org/pkg/texosquery}.
@PkgIndex{shellesc}
@findex \ShellEscape
@findex \DelayedShellEscape
-@LaTeX{} provides a package @code{shellesc} on top of the primitive
+@LaTeX{} provides a package @package{shellesc} on top of the primitive
@code{\write18} command. Its primary purpose is to provide a command
@code{\ShellEscape} which works identically on all @TeX{} engines;
Lua@TeX{} intentionally did not retain @code{\write18} as a way to
invoke a shell command, so some engine-specific code is needed. The
-@code{shellesc} package also provides a command
+@package{shellesc} package also provides a command
@code{\DelayedShellEscape}, executed at @code{\output} time, for the
same reason.
@@ -21282,7 +21836,7 @@ As part of the command line invocation
allows you to do some special effects.
@PkgIndex{hyperref} For example, this file (which uses the
-@file{hyperref} package for hyperlinks) can produce two kinds of
+@package{hyperref} package for hyperlinks) can produce two kinds of
output, one to be read on physical paper and one to be read online.
@example
@@ -21323,20 +21877,33 @@ pdflatex -jobname=teachers "\def\teachers@{@}\input@{main@}"
@noindent
The @code{jobname} option is there because otherwise both files would be
-called @file{main.pdf} and the second would overwrite the first. (See
-the next section.)
+called @file{main.pdf} and the second would overwrite the
+first. (@pxref{Jobname}.)
-In this example, we pass the @code{draft} option to the
-@file{graphicx} package:
+In this example we use the command line to select which parts of a
+document to include. For a book named @file{mybook.tex} and structured
+like this.
@example
-pdflatex "\PassOptionsToPackage@{draft@}@{graphicx@}\input@{aa.tex@}"
+\documentclass@{book@}
+\begin@{document@}
+ ...
+\include@{chap1@}
+\include@{chap2@}
+ ...
+\end@{document@}
+@end example
+
+@noindent
+the command line
+
+@example
+pdflatex "\includeonly@{chap1@}\input@{mybook@}"
@end example
@noindent
-so the graphic files are read for their bounding box size information
-but replaced in the PDF by a box with same size and that contains only
-the file name, which speeds up compilation time and saves printer ink.
+will give output that has the first chapter but no other
+chapter. @xref{Splitting the input}.
@node Jobname
@@ -21346,6 +21913,8 @@ the file name, which speeds up compilation time and saves printer ink.
@cindex jobname
@cindex document root name
@cindex name of document root
+@cindex root file
+@cindex file, root
Running @LaTeX{} creates a number of files, including the main PDF (or
DVI) output but also including others. These files are named with the
@@ -21357,13 +21926,14 @@ Here the job name is @code{thesis}.
In general, @LaTeX{} is invoked as @code{@var{latex-engine}
@var{options} @var{argument}}, where @var{latex-engine} is
@command{pdflatex}, @command{lualatex}, etc.@: (@pxref{@TeX{} engines}).
-If @var{argument} does not start with a backslash, as is the case
-above with @code{thesis}, then @TeX{} considers it to be the name of
-the file to input as the main document. The name of that root file,
-without the @file{.tex} extension, is the jobname. If @var{argument}
-does start with a backslash, or if @TeX{} is in interactive mode, then
-it waits for the first @code{\input} command, and the jobname is the
-argument to @code{\input}.
+If @var{argument} does not start with a backslash, as is the case above
+with @code{thesis}, then @TeX{} considers it to be the name of the file
+to input as the main document. This file is referred to as the @dfn{root
+file} (@pxref{Splitting the input}, and@tie{}@ref{\input}). The name of
+that root file, without the @file{.tex} extension if any, is the
+jobname. If @var{argument} does start with a backslash, or if @TeX{} is
+in interactive mode, then it waits for the first @code{\input} command,
+and the jobname is the argument to @code{\input}.
There are two more possibilities for the jobname. It can be directly
specified with the @code{-jobname} option, as in @code{pdflatex
@@ -21372,10 +21942,10 @@ specified with the @code{-jobname} option, as in @code{pdflatex
@findex texput@r{, jobname default}
@cindex fallback jobname
The final possibility is @file{texput}, which is the final fallback
-default if no other name is available to @TeX{}. For example, if no
+default if no other name is available to @TeX{}. That is, if no
@code{-jobname} option was specified, and the compilation stops before
-there is any output, then the log file will be named
-@file{texput.log}.
+any input file is met, then the log file will be named
+@file{texput.log}.
@findex \documentclass@r{, and @code{texput} jobname}
@findex \RequirePackage@r{, and @code{texput} jobname}
@@ -21500,13 +22070,13 @@ be useful. Additional template resources are listed at
@node beamer template
-@section @code{beamer} template
+@section @package{beamer} template
-@cindex @code{beamer} template and class
-@cindex template, @code{beamer}
+@cindex @package{beamer} template and class
+@cindex template, @package{beamer}
@PkgIndex{beamer}
-The @code{beamer} class creates presentation slides. It has a vast
+The @package{beamer} class creates presentation slides. It has a vast
array of features, but here is a basic template:
@verbatim