<?xml version="1.0"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
  <!ENTITY tex "TeX">
  <!ENTITY latex "LaTeX">
]>
<book id="latex2e.dbk" lang="en">
<title>&latex;2e unofficial reference manual (November 2016)</title>
<!-- %**end of header (This is for running Texinfo on a region.) -->

<!-- latex 2.09 commands should all be present now, -->
<!-- xx but latex2e stuff is missing. -->
<!-- xx random list of a few of the missing items is at the end of this file -->
<!-- -->
<!-- xx misc commands from clsguide.pdf -->
<!-- xx ending a run with errors -->
<!-- xx ctan, distributions, components of TeX -->
<!-- xx classes and packages - required, additional, useful; oberdiek; fonts -->
<!-- -->
<!-- xx merge http://ctan.org/pkg/latex-info (CTAN package latex-info) -->
<!-- xx merge http://ctan.org/pkg/latex2e-reference -->
<!-- xx merge permuted-index -->
<!-- xx merge latex-manual from savannah -->
<!-- xx merge display style math -->
<!-- xx vertical mode, horizontal mode -->
<!-- -->
<!-- xx The typeset source2e has an index with all kernel -->
<!-- xx commands, though some are internal and shouldn't be included. -->
<!-- xx classes.dtx et al. define additional commands. -->
<!-- xx See also http://ctan.org/pkg/macros2e. -->

<bookinfo><legalnotice><para>This document is an unofficial reference manual for &latex;, a
document preparation system, version of November 2016.
</para>
<para>This manual was originally translated from <filename>LATEX.HLP</filename> v1.0a in
the VMS Help Library.  The pre-translation version was written by
George&#160;D. Greenwade of Sam Houston State University.  The
&latex;&#160;2.09 version was written by Stephen Gilmore.  The
&latex;2e version was adapted from this by Torsten Martinsen.  Karl
Berry made further updates and additions, and gratefully acknowledges
using <citetitle>Hypertext Help with &latex;</citetitle>, by Sheldon Green, and
<citetitle>&latex; Command Summary</citetitle> (for &latex;&#160;2.09) by
L.&#160;Botway and C.&#160;Biemesderfer (published by the &tex; Users
Group as <citetitle>&tex;niques</citetitle> number 10), as reference material (no
text was directly copied).
</para>
<para>Copyright 2007, 2008, 2009, 2010, 2011, 2012, 2013,
2014, 2015, 2016 Karl Berry.

Copyright 1988, 1994, 2007 Stephen Gilmore.

Copyright 1994, 1995, 1996 Torsten Martinsen.
</para>
<!-- start of License -->
<para>Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
are preserved on all copies.
</para>

<para>Permission is granted to copy and distribute modified versions of this
manual under the conditions for verbatim copying, provided that the entire
resulting derived work is distributed under the terms of a permission
notice identical to this one.
</para>
<para>Permission is granted to copy and distribute translations of this manual
into another language, under the above conditions for modified versions.
<!-- end of License -->
</para></legalnotice></bookinfo>


<para>This document is an unofficial reference manual for &latex;, a
document preparation system, version of November 2016.
</para>
<para>This manual was originally translated from <filename>LATEX.HLP</filename> v1.0a in
the VMS Help Library.  The pre-translation version was written by
George&#160;D. Greenwade of Sam Houston State University.  The
&latex;&#160;2.09 version was written by Stephen Gilmore.  The
&latex;2e version was adapted from this by Torsten Martinsen.  Karl
Berry made further updates and additions, and gratefully acknowledges
using <citetitle>Hypertext Help with &latex;</citetitle>, by Sheldon Green, and
<citetitle>&latex; Command Summary</citetitle> (for &latex;&#160;2.09) by
L.&#160;Botway and C.&#160;Biemesderfer (published by the &tex; Users
Group as <citetitle>&tex;niques</citetitle> number 10), as reference material (no
text was directly copied).
</para>
<para>Copyright 2007, 2008, 2009, 2010, 2011, 2012, 2013,
2014, 2015, 2016 Karl Berry.

Copyright 1988, 1994, 2007 Stephen Gilmore.

Copyright 1994, 1995, 1996 Torsten Martinsen.
</para>
<!-- start of License -->
<para>Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
are preserved on all copies.
</para>

<para>Permission is granted to copy and distribute modified versions of this
manual under the conditions for verbatim copying, provided that the entire
resulting derived work is distributed under the terms of a permission
notice identical to this one.
</para>
<para>Permission is granted to copy and distribute translations of this manual
into another language, under the above conditions for modified versions.
<!-- end of License -->
</para>


<!-- Best Effort Symbol -->



<chapter label="" id="Top">
<title>&latex;2e: An unofficial reference manual</title>

<para>This document is an unofficial reference manual (version of
November 2016) for &latex;2e, a document preparation system.
</para>


</chapter>
<chapter label="1" id="About-this-document">
<title>About this document</title>

<indexterm role="cp"><primary>bug reporting</primary></indexterm>
<indexterm role="cp"><primary>reporting bugs</primary></indexterm>
<indexterm role="fn"><primary><ulink url="http://home.gna.org/latexrefman">http://home.gna.org/latexrefman</ulink> home page</primary></indexterm>
<para>This is an unofficial reference manual for the &latex;2e document
preparation system, which is a macro package for the &tex;
typesetting program (see <link linkend="Overview">Overview</link>).  This document&#8217;s home page is
<ulink url="http://home.gna.org/latexrefman">http://home.gna.org/latexrefman</ulink>.  That page has links to the
current output in various formats, sources, mailing list archives and
subscriptions, and other infrastructure.
</para>
<indexterm role="cp"><primary>&latex; vs. &latex;2e</primary></indexterm>
<para>In this document, we will mostly just use &#8216;&latex;&#8217; rather than
&#8216;&latex;2e&#8217;, since the previous version of &latex;&#160;(2.09) was
retired many years ago.
</para>
<indexterm role="cp"><primary>unofficial nature of this manual</primary></indexterm>
<indexterm role="cp"><primary>&latex; Project team</primary></indexterm>
<indexterm role="fn"><primary><email>latexrefman-discuss@gna.org</email> email address</primary></indexterm>
<para>&latex; is currently maintained by a group of volunteers
(<ulink url="http://latex-project.org">http://latex-project.org</ulink>).  The official documentation written by
the &latex; project is available from their web site.  This document is
completely unofficial and has not been reviewed by the &latex;
maintainers.  Do not send bug reports or anything else about this
document to them.  Instead, please send all comments to
<email>latexrefman-discuss@gna.org</email>.
</para>
<para>This document is a reference.  There is a vast array of other sources
of information about &latex;, at all levels.  Here are a few
introductions.
</para>
<variablelist><varlistentry><term><ulink url="http://ctan.org/pkg/latex-doc-ptr">http://ctan.org/pkg/latex-doc-ptr</ulink>
</term><listitem><indexterm role="fn"><primary>latex-doc-ptr document</primary></indexterm>
<para>Two pages of recommended references to &latex; documentation.
</para>
</listitem></varlistentry><varlistentry><term><ulink url="http://ctan.org/pkg/first-latex-doc">http://ctan.org/pkg/first-latex-doc</ulink>
</term><listitem><indexterm role="fn"><primary>first-latex-doc document</primary></indexterm>
<para>Writing your first document, with a bit of both text and math.
</para>
</listitem></varlistentry><varlistentry><term><ulink url="http://ctan.org/pkg/usrguide">http://ctan.org/pkg/usrguide</ulink>
</term><listitem><indexterm role="fn"><primary>usrguide official documentation</primary></indexterm>
<para>The guide for document authors that is maintained as part of &latex;;
there are plenty of others available elsewhere.
</para>
</listitem></varlistentry><varlistentry><term><ulink url="http://ctan.org/pkg/lshort">http://ctan.org/pkg/lshort</ulink>
</term><listitem><indexterm role="fn"><primary>lshort document</primary></indexterm>
<para>A short introduction to &latex;, translated to many languages.
</para>
</listitem></varlistentry><varlistentry><term><ulink url="http://tug.org/begin.html">http://tug.org/begin.html</ulink>
</term><listitem><para>Introduction to the &tex; system, including &latex;, with further
references.
</para>
</listitem></varlistentry></variablelist>

</chapter>
<chapter label="2" id="Overview">
<title>Overview of &latex;</title>

<indexterm role="cp"><primary>overview of &latex;</primary></indexterm>
<indexterm role="cp"><primary>basics of &latex;</primary></indexterm>
<indexterm role="cp"><primary>Knuth, Donald E.</primary></indexterm>
<indexterm role="cp"><primary>Lamport, Leslie</primary></indexterm>
<indexterm role="cp"><primary>&latex; overview</primary></indexterm>

<para>&latex; is a system for typesetting documents.  It was originally
created by Leslie Lamport and is now maintained by a group of volunteers
(<ulink url="http://latex-project.org">http://latex-project.org</ulink>).  It is widely used, particularly for
complex and technical documents, such as those involving mathematics.
</para>
<indexterm role="cp"><primary>macro package, &latex; as</primary></indexterm>
<para>A &latex; user writes an input file containing text along with
interspersed commands, for instance commands describing how the text
should be formatted.  It is implemented as a set of related commands
that interface with Donald&#160;E. Knuth&#8217;s &tex; typesetting program
(the technical term is that &latex; is a <firstterm>macro package</firstterm> for the
&tex; engine).  The user produces the output document by giving that
input file to the &tex; engine.
</para>
<para>The term &latex; is also sometimes used to mean the language in which
the document is marked up, that is, to mean the set of commands
available to a &latex; user.
</para>
<indexterm role="cp"><primary>Lamport &tex;</primary></indexterm>
<indexterm role="cp"><primary>pronunciation</primary></indexterm>
<para>The name &latex; is short for &#8220;Lamport &tex;&#8221;.  It is pronounced
LAH-teck or LAY-teck, or sometimes LAY-tecks.  Inside a document,
produce the logo with <literal>\LaTeX</literal>.  Where use of the logo is not
sensible, such as in plain text, write it as &#8216;<literal>LaTeX</literal>&#8217;.
</para>


<sect1 label="2.1" id="Starting-and-ending">
<title>Starting and ending</title>

<anchor id="Starting-_0026-ending"/><!-- old name -->
<indexterm role="cp"><primary>starting and ending</primary></indexterm>
<indexterm role="cp"><primary>ending and starting</primary></indexterm>
<indexterm role="cp"><primary>hello, world</primary></indexterm>

<para>&latex; files have a simple global structure, with a standard beginning
and ending.  Here is a &#8220;hello, world&#8221; example:
</para>
<screen>\documentclass{article}
\begin{document}
Hello, \LaTeX\ world.
\end{document}
</screen>
<indexterm role="cp"><primary>document class, defined</primary></indexterm>
<para>Here, the &#8216;<literal>article</literal>&#8217; is the so-called <firstterm>document class</firstterm>,
implemented in a file <filename>article.cls</filename>.  Any document class can be
used.  A few document classes are defined by &latex; itself, and vast
array of others are widely available.  See <link linkend="Document-classes">Document classes</link>.
</para>
<indexterm role="cp"><primary>preamble, defined</primary></indexterm>
<para>You can include other &latex; commands between the
<literal>\documentclass</literal> and the <literal>\begin{document}</literal> commands.
This area is called the <firstterm>preamble</firstterm>.
</para>
<para>The <literal>\begin{document} ... \end{document}</literal> is a so-called
<indexterm role="cp"><primary>environment</primary></indexterm>
<firstterm>environment</firstterm>; the &#8216;<literal>document</literal>&#8217; environment (and no others) is
required in all &latex; documents (see <link linkend="document">document</link>).  &latex;
provides many environments itself, and many more are defined separately.
See <link linkend="Environments">Environments</link>.
</para>
<para>The following sections discuss how to produce PDF or other output from
a &latex; input file.
</para>

</sect1>
<sect1 label="2.2" id="Output-files">
<title>Output files</title>

<para>&latex; produces a main output file and at least two accessory files.
The main output file&#8217;s name ends in either <filename>.dvi</filename> or <filename>.pdf</filename>.
</para>
<variablelist><varlistentry><term><literal>.dvi</literal>
</term><listitem><indexterm role="fn"><primary>.dvi file</primary></indexterm>
<indexterm role="fn"><primary>latex command</primary></indexterm>
<indexterm role="fn"><primary>xdvi command</primary></indexterm>
<indexterm role="fn"><primary>dvips command</primary></indexterm>
<indexterm role="fn"><primary>dvipdfmx command</primary></indexterm>
<indexterm role="fn"><primary>dvitype command</primary></indexterm>
<para>If &latex; is invoked with the system command <command>latex</command> then it
produces a DeVice Independent file, with extension <filename>.dvi</filename>.  You
can view this file with a command such as <command>xdvi</command>, or convert
it to a PostScript <literal>.ps</literal> file with <command>dvips</command> or to a
Portable Document Format <literal>.pdf</literal> file with <command>dvipdfmx</command>.
The contents of the file can be dumped in human-readable form with
<command>dvitype</command>.  A vast array of other DVI utility programs are
available (<ulink url="http://mirror.ctan.org/dviware">http://mirror.ctan.org/dviware</ulink>).
</para>
</listitem></varlistentry><varlistentry><term><literal>.pdf</literal>
</term><listitem><indexterm role="fn"><primary>.pdf file</primary></indexterm>
<indexterm role="cp"><primary>pdf&tex;</primary></indexterm>
<indexterm role="fn"><primary>pdflatex command</primary></indexterm>
<para>If &latex; is invoked via the system command <command>pdflatex</command>,
among other commands (see <link linkend="TeX-engines">&tex; engines</link>), then the main output is
a Portable Document Format (PDF) file.  Typically this is a
self-contained file, with all fonts and images included.
</para>
</listitem></varlistentry></variablelist>
<para>&latex; also produces at least two additional files.
</para>
<variablelist><varlistentry><term><literal>.log</literal>
</term><listitem><indexterm role="cp"><primary>transcript file</primary></indexterm>
<indexterm role="cp"><primary>log file</primary></indexterm>
<indexterm role="fn"><primary>.log file</primary></indexterm>
<para>This transcript file contains summary information such as a list of
loaded packages.  It also includes diagnostic messages and perhaps
additional information for any errors.
</para>
</listitem></varlistentry><varlistentry><term><literal>.aux</literal>
</term><listitem><indexterm role="cp"><primary>auxiliary file</primary></indexterm>
<indexterm role="fn"><primary>.aux file</primary></indexterm>
<indexterm role="cp"><primary>cross references, resolving</primary></indexterm>
<indexterm role="cp"><primary>forward references, resolving</primary></indexterm>
<indexterm role="cp"><primary>references, resolving forward</primary></indexterm>
<para>Auxiliary information is used by &latex; for things such as
cross references.  For example, the first time that &latex; finds a
forward reference&#8212;a cross reference to something that has not yet
appeared in the source&#8212;it will appear in the output as a doubled
question mark <literal>??</literal>.  When the referred-to spot does eventually
appear in the source then &latex; writes its location information to
this <literal>.aux</literal> file.  On the next invocation, &latex; reads the
location information from this file and uses it to resolve the
reference, replacing the double question mark with the remembered
location.
</para>
</listitem></varlistentry></variablelist>
<indexterm role="fn"><primary>.lof file</primary></indexterm>
<indexterm role="cp"><primary>list of figures file</primary></indexterm>
<indexterm role="fn"><primary>.lot file</primary></indexterm>
<indexterm role="cp"><primary>list of tables file</primary></indexterm>
<indexterm role="fn"><primary>.toc file</primary></indexterm>
<indexterm role="cp"><primary>table of contents file</primary></indexterm>
<indexterm role="cp"><primary>contents file</primary></indexterm>
<para>&latex; may produce yet more files, characterized by the filename
ending.  These include a <literal>.lof</literal> file that is used to make a list
of figures, a <literal>.lot</literal> file used to make a list of tables, and a
<literal>.toc</literal> file used to make a table of contents.  A particular class
may create others; the list is open-ended.
</para>

</sect1>
<sect1 label="2.3" id="TeX-engines">
<title>&tex; engines</title>

<indexterm role="cp"><primary>engines, &tex;</primary></indexterm>
<indexterm role="cp"><primary>implementations of &tex;</primary></indexterm>
<indexterm role="cp"><primary>UTF-8</primary></indexterm>
<indexterm role="cp"><primary>Unicode input, native</primary></indexterm>
<indexterm role="cp"><primary>TrueType fonts</primary></indexterm>
<indexterm role="cp"><primary>OpenType fonts</primary></indexterm>

<para>&latex; is defined to be a set of commands that are run by a &tex;
implementation (see <link linkend="Overview">Overview</link>).  This section gives a terse
overview of the main programs.
</para>
<variablelist><varlistentry><term><literal>latex</literal>
</term><term><literal>pdflatex</literal>
</term><listitem><indexterm role="cp"><primary>pdf&tex; engine</primary></indexterm>
<indexterm role="fn"><primary>etex command</primary></indexterm>
<indexterm role="cp"><primary>e-&tex;</primary></indexterm>
<para>In &tex; Live (<ulink url="http://tug.org/texlive">http://tug.org/texlive</ulink>), if &latex; is invoked
via either the system command <command>latex</command> or <command>pdflatex</command>,
then the pdf&tex; engine is run (<ulink url="http://ctan.org/pkg/pdftex">http://ctan.org/pkg/pdftex</ulink>).
When invoked as <command>latex</command>, the main output is a <filename>.dvi</filename>
file; as <command>pdflatex</command>, the main output is a <filename>.pdf</filename> file.
</para>
<para>pdf&tex; incorporates the e-&tex; extensions to Knuth&#8217;s original
program (<ulink url="http://ctan.org/pkg/etex">http://ctan.org/pkg/etex</ulink>), including additional
programming features and bi-directional typesetting, and has plenty of
extensions of its own.  e-&tex; is available on its own as the system
command <command>etex</command>, but this is plain &tex; (and produces
<filename>.dvi</filename>).
</para>
<para>In other &tex; distributions, <command>latex</command> may invoke e-&tex;
rather than pdf&tex;.  In any case, the e-&tex; extensions can be
assumed to be available in &latex;.
</para>
</listitem></varlistentry><varlistentry><term><literal>lualatex</literal>
</term><listitem><indexterm role="fn"><primary>lualatex command</primary></indexterm>
<indexterm role="cp"><primary>Lua&tex;</primary></indexterm>
<para>If &latex; is invoked via the system command <command>lualatex</command>, the
Lua&tex; engine is run (<ulink url="http://ctan.org/pkg/luatex">http://ctan.org/pkg/luatex</ulink>).  This
program allows code written in the scripting language Lua
(<ulink url="http://luatex.org">http://luatex.org</ulink>) to interact with &tex;&#8217;s typesetting.
Lua&tex; handles UTF-8 Unicode input natively, can handle OpenType
and TrueType fonts, and produces a <filename>.pdf</filename> file by default.
There is also <command>dvilualatex</command> to produce a <filename>.dvi</filename> file,
but this is rarely used.
</para>
</listitem></varlistentry><varlistentry><term><literal>xelatex</literal>
</term><listitem><indexterm role="fn"><primary>xelatex command</primary></indexterm>
<indexterm role="cp"><primary>Xe&tex;</primary></indexterm>
<indexterm role="fn"><primary>.xdv file</primary></indexterm>
<indexterm role="fn"><primary>xdvipdfmx</primary></indexterm>
<para>If &latex; is invoked with the system command <command>xelatex</command>, the
Xe&tex; engine is run (<ulink url="http://tug.org/xetex">http://tug.org/xetex</ulink>).  Like Lua&tex;,
Xe&tex; natively supports UTF-8 Unicode and TrueType and OpenType
fonts, though the implementation is completely different, mainly using
external libraries instead of internal code.  Xe&tex; produces a
<filename>.pdf</filename> file as output; it does not support DVI output.
</para>
<para>Internally, Xe&tex; creates an <literal>.xdv</literal> file, a variant of DVI,
and translates that to PDF using the (<literal>x</literal>)<literal>dvipdfmx</literal>
program, but this process is automatic.  The <literal>.xdv</literal> file is only
useful for debugging.
</para>
</listitem></varlistentry></variablelist>
<para>Other variants of &latex; and &tex; exist, e.g., to provide
additional support for Japanese and other languages ([u]p&tex;,
<ulink url="http://ctan.org/pkg/ptex">http://ctan.org/pkg/ptex</ulink>, <ulink url="http://ctan.org/pkg/uptex">http://ctan.org/pkg/uptex</ulink>).
</para>

</sect1>
<sect1 label="2.4" id="LaTeX-command-syntax">
<title>&latex; command syntax</title>

<indexterm role="cp"><primary>command syntax</primary></indexterm>
<indexterm role="fn"><primary>\ character starting commands</primary></indexterm>
<indexterm role="fn"><primary>[...] for optional arguments</primary></indexterm>
<indexterm role="fn"><primary>{...} for required arguments</primary></indexterm>
<para>In the &latex; input file, a command name starts with a backslash
character, <literal>\</literal>.  The name itself then consists of either
(a)&#160;a string of letters or (b)&#160;a single non-letter.
</para>
<para>&latex; commands names are case sensitive so that <literal>\pagebreak</literal>
differs from <literal>\Pagebreak</literal> (the latter is not a standard command).
Most commands are lowercase, but in any event you must enter all
commands in the same case as they are defined.
</para>
<para>A command may be followed by zero, one, or more arguments. These
arguments may be either required or optional.  Required arguments are
contained in curly braces, <literal>{...}</literal>.  Optional arguments are
contained in square brackets, <literal>[...]</literal>.  Generally, but not
universally, if the command accepts an optional argument, it comes
first, before any required arguments.
</para>
<para>Inside of an optional argument, to use the character close square
bracket&#160;(<literal>]</literal>) hide it inside curly braces, as
in&#160;<literal>\item[closing bracket {]}]</literal>.  Similarly, if an optional
argument comes last, with no required argument after it, then to make
the first character of the following text be an open square bracket,
hide it inside curly braces.
</para>
<para>&latex; has the convention that some commands have a <literal>*</literal> form that
is related to the form without a <literal>*</literal>, such as <literal>\chapter</literal> and
<literal>\chapter*</literal>.  The exact difference in behavior varies from command
to command.
</para>
<para>This manual describes all accepted options and <literal>*</literal>-forms for the
commands it covers (barring unintentional omissions, a.k.a. bugs).
</para>


<anchor id="Environment"/>

<para>Synopsis:
</para>
<screen>\begin{<replaceable>environment name</replaceable>}
  ...
\end{<replaceable>environment name</replaceable>}
</screen>
<para>An area of &latex; source, inside of which there is a distinct
behavior.  For instance, for poetry in &latex; put the lines between
<literal>\begin{verse}</literal> and <literal>\end{verse}</literal>.
</para>
<screen>\begin{verse}
  There once was a man from Nantucket \\
  ...
\end{verse}
</screen>
<para>See&#160;<link linkend="Environments">Environments</link> for a list of environments. 
</para>
<para>The <replaceable>environment name</replaceable> at the beginning must exactly match that at
the end.  This includes the case where <replaceable>environment name</replaceable> ends in a
star&#160;(<literal>*</literal>); both the <literal>\begin</literal> and <literal>\end</literal> texts must
include the star.
</para>
<para>Environments may have arguments, including optional arguments.  This
example produces a table.  The first argument is optional (and causes
the table to be aligned on its top row) while the second argument is
required (it specifies the formatting of columns).
</para>
<screen>\begin{tabular}[t]{r|l}
  ... rows of table ...
\end{tabular}
</screen>

<anchor id="Declaration"/>

<para>A command that changes the value, or changes the meaning, of some other
command or parameter.  For instance, the <literal>\mainmatter</literal> command
changes the setting of page numbers from roman numerals to arabic.
</para>

<anchor id="_005cmakeatletter-and-_005cmakeatother"/>

<para>Synopsis:
</para>
<screen>\makeatletter
  ... definition of commands with @ in their name ..
\makeatother
</screen>
<para>Used to redefine internal &latex; commands.  <literal>\makeatletter</literal> makes
the at-sign character&#160;<literal>@</literal> have the category code of a letter,
11.  <literal>\makeatother</literal> sets the category code of&#160;<literal>@</literal> to 12,
its original value.
</para>
<para>As each character is read by &tex; for &latex;, it is assigned a
character category code, or 
<indexterm role="cp"><primary>catcode</primary></indexterm>
<indexterm role="cp"><primary>character category code</primary></indexterm>
<indexterm role="cp"><primary>category code, character</primary></indexterm>
<firstterm>catcode</firstterm> for shorter. For instance, the backslash&#160;<literal>\</literal> is
assigned the catcode 0, for characters that start a command.  These two
commands alter the catcode assigned to <literal>@</literal>.
</para>
<para>The alteration is needed because many of &latex;&#8217;s commands use
<literal>@</literal> in their name, to prevent users from accidentally defining a
command that replaces one of &latex;&#8217;s own.  Command names consist of a
category&#160;0 character, ordinarily backslash, followed by letters,
category&#160;11 characters (except that a command name can also consist
of a category&#160;0 character followed by a single non-letter symbol).
So under the default category codes, user-defined commands cannot
contain an <literal>@</literal>.  But <literal>\makeatletter</literal> and <literal>\makeatother</literal>
allow users to define or redefine commands named with <literal>@</literal>.
</para>
<para>Use these inside a <filename>.tex</filename> file, in the preamble.  Don&#8217;t use them
inside <filename>.sty</filename> or <filename>.cls</filename> files since the <literal>\usepackage</literal>
and <literal>\documentclass</literal> commands set the at sign to have the character
code of a letter.
</para>
<indexterm role="cp"><primary>package, <literal>macros2e</literal></primary></indexterm>
<indexterm role="cp"><primary><literal>macros2e</literal> package For a comprehensive list of macros with an at-sign</primary></indexterm>
<para>in their names, see document
<ulink url="http://ctan.org/pkg/macros2e">http://ctan.org/pkg/macros2e</ulink>. These macros are mainly useful
to package or class authors; examples that may be useful to document
authors are provided hereinafter.
</para>
<para>The example code below, if put in the preamble, redefines the
section command to center the section title, put it in bold type,
and adjust the spacing.
</para>
<!-- xxx TODO, make \@startsection a separate node, see latex2e-fr.texi -->
<!-- From http://zoonek.free.fr/LaTeX/LaTeX_samples_section/0.html -->
<screen>\makeatletter
\renewcommand\section{%
  \@startsection{section}% Name
  {1}% Level: 0=part, 1=chapter, etc.
  {0pt}% Heading indent
  {-3.5ex plus -1ex minus -.2ex}% Beforeskip (if neg, no head indent)
  {2.3ex plus.2ex}% Afterskip (if neg, run-in heading)
  {\centering\normalfont\Large\bfseries}} % Style of head
\makeatother
</screen>
<!-- xx TODO document \@ifstar, see latex2e-fr.texi -->

</sect1>
</chapter>
<chapter label="3" id="Document-classes">
<title>Document classes</title>

<indexterm role="cp"><primary>document classes</primary></indexterm>
<indexterm role="cp"><primary>classes of documents</primary></indexterm>
<indexterm role="fn"><primary>\documentclass</primary></indexterm>

<para>The document&#8217;s overall class is defined with this command, which is
normally the first command in a &latex; source file.
</para>
<screen>\documentclass[<replaceable>options</replaceable>]{<replaceable>class</replaceable>}
</screen>
<indexterm role="fn"><primary>article class</primary></indexterm>
<indexterm role="fn"><primary>report class</primary></indexterm>
<indexterm role="fn"><primary>book class</primary></indexterm>
<indexterm role="fn"><primary>letter class</primary></indexterm>
<indexterm role="fn"><primary>slides class</primary></indexterm>
<para>The following document <replaceable>class</replaceable> names are built into &latex;.
(Many other document classes are available as separate packages;
see <link linkend="Overview">Overview</link>.)
</para>
<variablelist><varlistentry><term><literal>article</literal>
</term><listitem><para>For a journal article, a presentation, and miscellaneous general use.
</para>
</listitem></varlistentry><varlistentry><term><literal>book</literal>
</term><listitem><para>Full-length books, including chapters and possibly including front
matter, such as a preface, and back matter, such as an appendix
(see <link linkend="Front_002fback-matter">Front/back matter</link>).
</para>
</listitem></varlistentry><varlistentry><term><literal>letter</literal>
</term><listitem><para>Mail, optionally including mailing labels 
(see <link linkend="Letters">Letters</link>).
</para>
</listitem></varlistentry><varlistentry><term><literal>report</literal>
</term><listitem><para>For documents of length between an <literal>article</literal> and a <literal>book</literal>,
such as technical reports or theses, which may contain several chapters.
</para>
</listitem></varlistentry><varlistentry><term><literal>slides</literal>
</term><listitem><para>For slide presentations&#8212;rarely used today.  In its place the
<literal>beamer</literal> package is perhaps the most prevalent (see <link linkend="beamer-template">beamer
template</link>).
</para>
</listitem></varlistentry></variablelist>
<para>Standard <replaceable>options</replaceable> are described in the next section.
</para>


<sect1 label="3.1" id="Document-class-options">
<title>Document class options</title>

<indexterm role="cp"><primary>document class options</primary></indexterm>
<indexterm role="cp"><primary>options, document class</primary></indexterm>
<indexterm role="cp"><primary>class options</primary></indexterm>
<indexterm role="cp"><primary>global options</primary></indexterm>

<para>You can specify so-called <firstterm>global options</firstterm> or <firstterm>class options</firstterm> to
the <literal>\documentclass</literal> command by enclosing them in square brackets.
To specify more than one <replaceable>option</replaceable>, separate them with a comma, as in:
</para>
<screen>\documentclass[<replaceable>option1</replaceable>,<replaceable>option2</replaceable>,...]{<replaceable>class</replaceable>}
</screen>
<para>Here is the list of the standard class options.
</para>
<indexterm role="fn"><primary>10pt option</primary></indexterm>
<indexterm role="fn"><primary>11pt option</primary></indexterm>
<indexterm role="fn"><primary>12pt option</primary></indexterm>
<para>All of the standard classes except <literal>slides</literal> accept the following
options for selecting the typeface size (default is <literal>10pt</literal>):
</para>
<screen>10pt  11pt  12pt
</screen>
<indexterm role="fn"><primary>a4paper option</primary></indexterm>
<indexterm role="fn"><primary>a5paper option</primary></indexterm>
<indexterm role="fn"><primary>b5paper option</primary></indexterm>
<indexterm role="fn"><primary>executivepaper option</primary></indexterm>
<indexterm role="fn"><primary>legalpaper option</primary></indexterm>
<indexterm role="fn"><primary>letterpaper option</primary></indexterm>
<para>All of the standard classes accept these options for selecting the paper
size (these show height by width):
</para>
<variablelist><varlistentry><term><literal>a4paper</literal>
</term><listitem><para>210 by 297mm (about 8.25 by 11.75&#160;inches)
</para>
</listitem></varlistentry><varlistentry><term><literal>a5paper</literal>
</term><listitem><para>148 by 210mm (about 5.8 by 8.3&#160;inches)
</para>
</listitem></varlistentry><varlistentry><term><literal>b5paper</literal>
</term><listitem><para>176 by 250mm (about 6.9 by 9.8&#160;inches)
</para> 
</listitem></varlistentry><varlistentry><term><literal>executivepaper</literal>
</term><listitem><para>7.25 by 10.5&#160;inches
</para> 
</listitem></varlistentry><varlistentry><term><literal>legalpaper</literal>
</term><listitem><para>8.5 by 14&#160;inches
</para> 
</listitem></varlistentry><varlistentry><term><literal>letterpaper</literal>
</term><listitem><para>8.5 by 11&#160;inches (the default)
</para></listitem></varlistentry></variablelist>
<indexterm role="fn"><primary>\pdfpagewidth</primary></indexterm>
<indexterm role="fn"><primary>\pdfpageheight</primary></indexterm>
<indexterm role="cp"><primary>package, <literal>geometry</literal></primary></indexterm>
<indexterm role="cp"><primary><literal>geometry</literal> package</primary></indexterm>
<para>When using one of the engines pdf&latex;, Lua&latex;, or Xe&latex;
(see <link linkend="TeX-engines">&tex; engines</link>), options other than <literal>letterpaper</literal> set
the print area but you must also set the physical paper size.  One way
to do that is to put <literal>\pdfpagewidth=\paperwidth</literal> and
<literal>\pdfpageheight=\paperheight</literal> in your document&#8217;s preamble.  The
<literal>geometry</literal> package provides flexible ways of setting the print
area and physical page size.
</para>
<indexterm role="fn"><primary>draft option</primary></indexterm>
<indexterm role="fn"><primary>final option</primary></indexterm>
<indexterm role="fn"><primary>fleqn option</primary></indexterm>
<indexterm role="fn"><primary>landscape option</primary></indexterm>
<indexterm role="fn"><primary>leqno option</primary></indexterm>
<indexterm role="fn"><primary>openbib option</primary></indexterm>
<indexterm role="fn"><primary>titlepage option</primary></indexterm>
<indexterm role="fn"><primary>notitlepage option</primary></indexterm>
<para>Miscellaneous other options:
</para>
<variablelist><varlistentry><term><literal>draft</literal>
</term><term><literal>final</literal>
</term><listitem><indexterm role="cp"><primary>black boxes, omitting</primary></indexterm>
<para>Mark (<literal>draft</literal>) or do not mark (<literal>final</literal>) overfull boxes with a
black box in the margin; default is <literal>final</literal>.
</para>
</listitem></varlistentry><varlistentry><term><literal>fleqn</literal>
</term><listitem><indexterm role="cp"><primary>flush left equations</primary></indexterm>
<indexterm role="cp"><primary>centered equations</primary></indexterm>
<indexterm role="cp"><primary>equations, flush left vs. centered</primary></indexterm>
<para>Put displayed formulas flush left; default is centered.
</para>
</listitem></varlistentry><varlistentry><term><literal>landscape</literal>
</term><listitem><indexterm role="cp"><primary>landscape orientation</primary></indexterm>
<indexterm role="cp"><primary>portrait orientation</primary></indexterm>
<para>Selects landscape format; default is portrait.
</para>
</listitem></varlistentry><varlistentry><term><literal>leqno</literal>
</term><listitem><indexterm role="cp"><primary>left-hand equation numbers</primary></indexterm>
<indexterm role="cp"><primary>right-hand equation numbers</primary></indexterm>
<indexterm role="cp"><primary>equation numbers, left vs. right</primary></indexterm>
<para>Put equation numbers on the left side of equations; default is the right side.
</para>
</listitem></varlistentry><varlistentry><term><literal>openbib</literal>
</term><listitem><indexterm role="cp"><primary>bibliography format, open</primary></indexterm>
<para>Use &#8220;open&#8221; bibliography format.
</para>
</listitem></varlistentry><varlistentry><term><literal>titlepage</literal>
</term><term><literal>notitlepage</literal>
</term><listitem><indexterm role="cp"><primary>title page, separate or run-in</primary></indexterm>
<para>Specifies whether there is a separate page for the title information and
for the abstract also, if there is one.  The default for the
<literal>report</literal> class is <literal>titlepage</literal>, for the other classes it is
<literal>notitlepage</literal>.
</para></listitem></varlistentry></variablelist>
<para>The following options are not available with the <literal>slides</literal> class.
</para>
<indexterm role="fn"><primary>onecolumn option</primary></indexterm>
<indexterm role="fn"><primary>twocolumn option</primary></indexterm>
<indexterm role="fn"><primary>oneside option</primary></indexterm>
<indexterm role="fn"><primary>twoside option</primary></indexterm>
<indexterm role="fn"><primary>openright option</primary></indexterm>
<indexterm role="fn"><primary>openany option</primary></indexterm>
<variablelist><varlistentry><term><literal>onecolumn</literal>
</term><term><literal>twocolumn</literal>
</term><listitem><para>Typeset in one or two columns; default is <literal>onecolumn</literal>.
</para>
</listitem></varlistentry><varlistentry><term><literal>oneside</literal>
</term><term><literal>twoside</literal>
</term><listitem><indexterm role="fn"><primary>\evensidemargin</primary></indexterm>
<indexterm role="fn"><primary>\oddsidemargin</primary></indexterm>
<para>Selects one- or two-sided layout; default is <literal>oneside</literal>, except
that in the <literal>book</literal> class the default is <literal>twoside</literal>.
</para>
<para>For one-sided printing, the text is centered on the page.  For two-sided
printing, the <literal>\evensidemargin</literal> (<literal>\oddsidemargin</literal>) parameter
determines the distance on even (odd) numbered pages between the left
side of the page and the text&#8217;s left margin, with <literal>\oddsidemargin</literal>
being 40% of the difference between <literal>\paperwidth</literal> and
<literal>\textwidth</literal>, and <literal>\evensidemargin</literal> is the remainder.
</para>
</listitem></varlistentry><varlistentry><term><literal>openright</literal>
</term><term><literal>openany</literal>
</term><listitem><para>Determines if a chapter should start on a right-hand page; default is
<literal>openright</literal> for <literal>book</literal>, and <literal>openany</literal> for <literal>report</literal>.
</para></listitem></varlistentry></variablelist>
<indexterm role="fn"><primary>clock option to <literal>slides</literal> class</primary></indexterm>
<para>The <literal>slides</literal> class offers the option <literal>clock</literal> for printing
the time at the bottom of each note.
</para>

</sect1>
<sect1 label="3.2" id="Additional-packages">
<title>Additional packages</title>

<indexterm role="cp"><primary>loading additional packages</primary></indexterm>
<indexterm role="cp"><primary>packages, loading additional</primary></indexterm>
<indexterm role="cp"><primary>additional packages, loading</primary></indexterm>
<indexterm role="fn"><primary>\usepackage</primary></indexterm>
<para>Load a package <replaceable>pkg</replaceable>, with the package options given in the comma-separated
list <replaceable>options</replaceable>, as here.
</para>
<screen>\usepackage[<replaceable>options</replaceable>]{<replaceable>pkg</replaceable>}.
</screen>
<para>To specify more than one package you can separate them with a comma,
as in <literal>\usepackage{<replaceable>pkg1</replaceable>,<replaceable>pkg2</replaceable>,...}</literal>, or use multiple
<literal>\usepackage</literal> commands.
</para>
<indexterm role="cp"><primary>global options</primary></indexterm>
<indexterm role="cp"><primary>options, global</primary></indexterm>
<para>Any options given in the <literal>\documentclass</literal> command that are unknown
to the selected document class are passed on to the packages loaded with
<literal>\usepackage</literal>.
</para>

</sect1>
<sect1 label="3.3" id="Class-and-package-construction">
<title>Class and package construction</title>

<indexterm role="cp"><primary>document class commands</primary></indexterm>
<indexterm role="cp"><primary>commands, document class</primary></indexterm>
<indexterm role="cp"><primary>new class commands</primary></indexterm>

<para>You can create new document classes and new packages.  For instance, if
your memos must satisfy some local requirements, such as a
standard header for each page, then you could create a new class
<literal>smcmemo.cls</literal> and begin your documents with
<literal>\documentclass{smcmemo}</literal>.
</para>
<para>What separates a package from a document class is that the commands in a
package are useful across classes while those in a document class are
specific to that class.  Thus, a command to set page headers is for a
package while a command to make the page headers say <literal>Memo from the
SMC Math Department</literal> is for a class.
<indexterm role="cp"><primary>class and package difference</primary></indexterm>
<indexterm role="cp"><primary>difference between class and package</primary></indexterm>
</para>
<para>Inside of a class or package file you can use the at-sign <literal>@</literal> as a
character in command names without having to surround that command with
<literal>\makeatletter</literal> and <literal>\makeatother</literal>.  See <link linkend="_005cmakeatletter-and-_005cmakeatother">\makeatletter and
\makeatother</link>. This allow you to create commands that users will not
accidentally redefine.  Another technique is to preface class- or
package-specific commands with some string to prevent your class or
package from interacting with others. For instance, the class
<literal>smcmemo</literal> might have commands <literal>\smc@tolist</literal>,
<literal>\smc@fromlist</literal>, etc.
</para>



<sect2 label="3.3.1" id="Class-and-package-structure">
<title>Class and package structure</title>

<indexterm role="cp"><primary>class and package structure</primary></indexterm>
<indexterm role="cp"><primary>class file layout</primary></indexterm>
<indexterm role="cp"><primary>package file layout</primary></indexterm>
<indexterm role="cp"><primary>options, document class</primary></indexterm>
<indexterm role="cp"><primary>options, package</primary></indexterm>
<indexterm role="cp"><primary>class options</primary></indexterm>
<indexterm role="cp"><primary>package options</primary></indexterm>

<para>A class file or package file typically has four parts.  (1)&#160;In the
identification part, the file says that it is a &latex; package or
class and describes itself, using the <literal>\NeedsTeXFormat</literal> and
<literal>\ProvidesClass</literal> or <literal>\ProvidesPackage</literal> commands.  (2)&#160;The
preliminary declarations part declares some commands and can also load
other files. Usually these commands will be those needed for the code
used in the next part.  For example, an <literal>smcmemo</literal> class might be
called with an option to read in a file with a list of people for the
to-head, as <literal>\documentclass[mathto]{smcmemo}</literal>, and therefore
needs to define a command
<literal>\newcommand{\setto}[1]{\def\@tolist{#1}}</literal> used in that
file.  (3)&#160;In the handle options part the class or package declares
and processes its options.  Class options allow a user to start their
document as <literal>\documentclass[<replaceable>option list</replaceable>]{<replaceable>class
name</replaceable>}</literal>, to modify the behavior of the class.  An example is when you
declare <literal>\documentclass[11pt]{article}</literal> to set the default
document font size.  Finally, (4)&#160;in the more declarations part the
class or package usually does most of its work: declaring new variables,
commands and fonts, and loading other files.
</para>
<para>Here is a starting class file, which should be saved as <literal>stub.cls</literal>
where &latex; can find it, for example in the same directory as the
<literal>.tex</literal> file.
</para>
<screen>\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{stub}[2017/07/06 stub to start building classes from]
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
\ProcessOptions\relax
\LoadClass{article}
</screen><indexterm role="cp"><primary>class file example</primary></indexterm>

<para>It identifies itself, handles the class options via the default of
passing them all to the <literal>article</literal> class, and then loads the
<literal>article</literal> class to provide the basis for this class&#8217;s code.
</para>
<para>For more, see the official guide for class and package writers, the
Class Guide, at
<ulink url="http://www.latex-project.org/help/documentation/clsguide.pdf">http://www.latex-project.org/help/documentation/clsguide.pdf</ulink> (much
of the descriptions here derive from this document), or the tutorial
<ulink url="https://www.tug.org/TUGboat/tb26-3/tb84heff.pdf">https://www.tug.org/TUGboat/tb26-3/tb84heff.pdf</ulink>.
</para>
</sect2>
<sect2 label="3.3.2" id="Class-and-package-commands">
<title>Class and package commands</title>
<indexterm role="cp"><primary>class and package commands</primary></indexterm>
<indexterm role="cp"><primary>commands, class and package</primary></indexterm>

<para>These are the commands designed to help writers of classes or packages.
</para>
<variablelist><varlistentry><term><literal>\AtBeginDvi{specials}</literal>
</term><listitem><indexterm role="fn"><primary>\AtBeginDvi</primary></indexterm>
<para>Save in a box register things that are written to the <literal>.dvi</literal> file
at the beginning of the shipout of the first page of the document.
</para>
</listitem></varlistentry><varlistentry><term><literal>\AtEndOfClass{<replaceable>code</replaceable>}</literal>
</term></varlistentry><varlistentry><term><literal>\AtEndOfPackage{<replaceable>code</replaceable>}</literal>
</term><listitem><indexterm role="fn"><primary>\AtEndOfClass</primary></indexterm>
<indexterm role="fn"><primary>\AtEndOfPackage</primary></indexterm>
<para>Hook to insert <replaceable>code</replaceable> to be executed when &latex; finishes
processing the current class or package.  You can use these hooks
multiple times; the <literal>code</literal> will be executed in the order that you
called it.  See also <link linkend="_005cAtBeginDocument">\AtBeginDocument</link>.
</para>
</listitem></varlistentry><varlistentry><term><literal>\ClassError{<replaceable>class name</replaceable>}{<replaceable>error text</replaceable>}{<replaceable>help text</replaceable>}</literal>
</term></varlistentry><varlistentry><term><literal>\PackageError{<replaceable>package name</replaceable>}{<replaceable>error text</replaceable>}{<replaceable>help text</replaceable>}</literal>
</term></varlistentry><varlistentry><term><literal>\ClassWarning{<replaceable>class name</replaceable>}{<replaceable>warning text</replaceable>}</literal>
</term></varlistentry><varlistentry><term><literal>\PackageWarning{<replaceable>package name</replaceable>}{<replaceable>warning text</replaceable>}</literal>
</term></varlistentry><varlistentry><term><literal>\ClassWarningNoLine{<replaceable>class name</replaceable>}{<replaceable>warning text</replaceable>}</literal>
</term></varlistentry><varlistentry><term><literal>\PackageWarningNoLine{<replaceable>package name</replaceable>}{<replaceable>warning text</replaceable>}</literal>
</term></varlistentry><varlistentry><term><literal>\ClassInfo{<replaceable>class name</replaceable>}{<replaceable>info text</replaceable>}</literal>
</term></varlistentry><varlistentry><term><literal>\PackageInfo{<replaceable>package name</replaceable>}{<replaceable>info text</replaceable>}</literal>
</term></varlistentry><varlistentry><term><literal>\ClassInfoNoLine{<replaceable>class name</replaceable>}{<replaceable>info text</replaceable>}</literal>
</term></varlistentry><varlistentry><term><literal>\PackageInfoNoLine{<replaceable>package name</replaceable>}{<replaceable>info text</replaceable>}</literal>
</term><listitem><indexterm role="fn"><primary>\ClassError</primary></indexterm>
<indexterm role="fn"><primary>\PackageError</primary></indexterm>
<indexterm role="fn"><primary>\ClassWarning</primary></indexterm>
<indexterm role="fn"><primary>\PackageWarning</primary></indexterm>
<indexterm role="fn"><primary>\ClassWarningNoLine</primary></indexterm>
<indexterm role="fn"><primary>\PackageWarningNoLine</primary></indexterm>
<indexterm role="fn"><primary>\ClassInfo</primary></indexterm>
<indexterm role="fn"><primary>\PackageInfo</primary></indexterm>
<indexterm role="fn"><primary>\ClassInfoNoLine</primary></indexterm>
<indexterm role="fn"><primary>\PackageInfoNoLine</primary></indexterm>
<para>Produce an error message, or warning or informational messages.
</para>
<para>For <literal>\ClassError</literal> and <literal>\PackageError</literal> the message is
<replaceable>error text</replaceable>, followed by &tex;&#8217;s <literal>?</literal> error prompt. If the
user then asks for help by typing <literal>h</literal>, they see the <replaceable>help
text</replaceable>.
</para>
<para>The four warning commands are similar except that they write
<replaceable>warning text</replaceable> on the screen with no error prompt.  The four info
commands write <replaceable>info text</replaceable> only in the transcript file.  The
<literal>NoLine</literal> versions do not show the number of the line generating the
message, while the other versions do show that number.
</para>
<para>To format the messages, including the <replaceable>help text</replaceable>: use
<literal>\protect</literal> to stop a command from expanding, get a line break with
<literal>\MessageBreak</literal>, and get a space with <literal>\space</literal>.  Note that
&latex; appends a period to the messages.
</para>
</listitem></varlistentry><varlistentry><term><literal>\CurrentOption</literal>
</term><listitem><indexterm role="fn"><primary>\CurrentOption</primary></indexterm>
<para>Expands to the name of the currently-being-processed option.  Can only
be used within the <replaceable>code</replaceable> argument of either <literal>\DeclareOption</literal>
or <literal>\DeclareOption*</literal>.
</para>
</listitem></varlistentry><varlistentry><term><literal>\DeclareOption{<replaceable>option</replaceable>}{<replaceable>code</replaceable>}</literal>
</term></varlistentry><varlistentry><term><literal>\DeclareOption*{<replaceable>option</replaceable>}{<replaceable>code</replaceable>}</literal>
</term><listitem><indexterm role="fn"><primary>\DeclareOption</primary></indexterm>
<indexterm role="fn"><primary>\DeclareOption*</primary></indexterm>
<indexterm role="cp"><primary>class options</primary></indexterm>
<indexterm role="cp"><primary>package options</primary></indexterm>
<indexterm role="cp"><primary>options, class</primary></indexterm>
<indexterm role="cp"><primary>options, package</primary></indexterm>
<para>Make an option available to a user, for invoking in their
<literal>\documentclass</literal> command.  For example, the <literal>smcmemo</literal> class
could have an option allowing users to put the institutional logo on the
first page with <literal>\documentclass[logo]{smcmemo}</literal>.  The class file
must contain <literal>\DeclareOption{logo}{<replaceable>code</replaceable>}</literal> (and later,
<literal>\ProcessOptions</literal>).
</para>
<para>If you request an option that has not been declared, by default this
will produce a warning like <literal>Unused global option(s): [badoption].</literal>
Change this behaviour with the starred version
<literal>\DeclareOption*{<replaceable>code</replaceable>}</literal>.  For example, many classes extend
an existing class, using a declaration such as
<literal>\LoadClass{article}</literal>, and for passing extra options to the
underlying class use code such as this.
</para>
<screen>\DeclareOption*{%
\PassOptionsToClass{\CurrentOption}{article}%
}
</screen>
<para>Another example is that the class <literal>smcmemo</literal> may allow users to keep
lists of memo recipients in external files.  Then the user could invoke
<literal>\documentclass[math]{smcmemo}</literal> and it will read the file
<literal>math.memo</literal>.  This code handles the file if it exists and otherwise
passes the option to the <literal>article</literal> class.
</para>
<screen>\DeclareOption*{\InputIfFileExists{\CurrentOption.memo}{}{%
    \PassOptionsToClass{\CurrentOption}{article}}}
</screen>
</listitem></varlistentry><varlistentry><term><literal>\IfFileExists{<replaceable>file name</replaceable>}{<replaceable>true code</replaceable>}{<replaceable>false code</replaceable>}</literal>
</term></varlistentry><varlistentry><term><literal>\InputIfFileExists{<replaceable>file name</replaceable>}{<replaceable>true code</replaceable>}{<replaceable>false code</replaceable>}</literal>
</term><listitem><indexterm role="fn"><primary>\IfFileExists</primary></indexterm>
<indexterm role="fn"><primary>\InputIfFileExists</primary></indexterm>
<para>Execute <replaceable>true code</replaceable> if &latex; can find the file and <replaceable>false
code</replaceable> otherwise.  In the second case it inputs the file immediately
after executing <replaceable>true code</replaceable>.  Thus
<literal>\IfFileExists{img.pdf}{\includegraphics{img.pdf}}{\typeout{WARNING:
img.pdf not found}}</literal> will include the graphic if it is found but
otherwise just give a warning.
</para>
<para>This command looks for the file in all search paths that &latex; uses,
not only in the current directory.  To look only in the current
directory do something like <literal>\IfFileExists{./filename}{<replaceable>true
code</replaceable>}{<replaceable>false code</replaceable>}</literal>.  If you ask for a filename without a
<literal>.tex</literal> extension then &latex; will first look for the file by
appending the <literal>.tex</literal>; for more on how &latex; handles file
extensions see <link linkend="_005cinput">\input</link>.
</para>
</listitem></varlistentry><varlistentry><term><literal>\LoadClass[<replaceable>options list</replaceable>]{<replaceable>class name</replaceable>}[<replaceable>release date</replaceable>]</literal>
</term></varlistentry><varlistentry><term><literal>\LoadClassWithOptions{<replaceable>class name</replaceable>}[<replaceable>release date</replaceable>]</literal>
</term><listitem><indexterm role="fn"><primary>\LoadClass</primary></indexterm>
<indexterm role="fn"><primary>\LoadClassWithOptions</primary></indexterm>
<para>Load a class, as with <literal>\documentclass[<replaceable>options
list</replaceable>]{<replaceable>class name</replaceable>}[<replaceable>release info</replaceable>]</literal>.  An example is
<literal>\LoadClass[twoside]{article}</literal>.
</para>
<para>The <replaceable>options list</replaceable>, if present, is a comma-separated list.  The
<replaceable>release date</replaceable> is optional.  If present it must have the form
<replaceable>YYYY/MM/DD</replaceable>.  If you request a <replaceable>release date</replaceable> and the date of
the package installed on your system is earlier, then you get a warning
on the screen and in the log like <literal>You have requested, on input
line 4, version `2038/01/19' of document class article, but only version
`2014/09/29 v1.4h Standard LaTeX document class' is available.</literal>
</para>
<para>The command version <literal>\LoadClassWithOptions</literal> uses the list of
options for the current class.  This means it ignores any options passed
to it via <literal>\PassOptionsToClass</literal>.  This is a convenience command
that lets you build classes on existing ones, such as the standard
<literal>article</literal> class, without having to track which options were passed.
</para>
</listitem></varlistentry><varlistentry><term><literal>\ExecuteOptions{<replaceable>options-list</replaceable>}</literal>
</term><listitem><indexterm role="fn"><primary>\ExecuteOptions</primary></indexterm>
<para>For each option in the <replaceable>options-list</replaceable>, in order, this command
executes the command <literal>\ds@</literal><replaceable>option</replaceable>.  If this command is not
defined then that option is silently ignored.
</para>
<para>It can be used to provide a default option list before
<literal>\ProcessOptions</literal>.  For example, if in a class file you want the
default to be 11pt fonts then you could specify
<literal>\ExecuteOptions{11pt}\ProcessOptions\relax</literal>.
</para>
</listitem></varlistentry><varlistentry><term><literal>\NeedsTeXFormat{<replaceable>format</replaceable>}[<replaceable>format date</replaceable>]</literal>
</term><listitem><indexterm role="fn"><primary>\NeedsTeXFormat</primary></indexterm>
<para>Specifies the format that this class should be run under.  Often issued
as the first line of a class file, and most often used as:
<literal>\NeedsTeXFormat{LaTeX2e}</literal>.  The format that you specify must
exactly match the one installed on your system that you invoked,
including that the string is case sensitive.  If it does not match then
execution stops with an error like &#8216;<literal>This file needs format `xxx'
but this is `LaTeX2e'.</literal>&#8217;
</para>
<para>To specify a version of the format that you know to have certain
features, include the optional <replaceable>format date</replaceable> on which those features
were implemented.  If present it must be in the form <literal>YYYY/MM/DD</literal>.
If the format version installed on your system is earlier than
<replaceable>format date</replaceable> then you get a warning like &#8216;<literal>You have requested
release `2038/01/20' of LaTeX, but only release `2016/02/01' is
available.</literal>&#8217;  (The &latex; kernel has been frozen for many years so you
probably do not not need to specify the format date.)
</para>
</listitem></varlistentry><varlistentry><term><literal>\OptionNotUsed</literal>
</term><listitem><indexterm role="fn"><primary>\OptionNotUsed</primary></indexterm>
<para>Adds the current option to the list of unused options.  Can only be used
within the <replaceable>code</replaceable> argument of either <literal>\DeclareOption</literal> or
<literal>\DeclareOption*</literal>.
</para>
<!-- I cannot reproduce this behavior as it is documented in clsguide. -->
<!-- In the absence of a @code{\DeclareOption*} declaration, @LaTeX{} issues -->
<!-- on the console a warning like @code{LaTeX Warning: Unused global -->
<!-- option(s): [unusedoption].} with the list of not-used options when it -->
<!-- reaches @code{\begin@{document@}}. -->

</listitem></varlistentry><varlistentry><term><literal>\PassOptionsToClass{<replaceable>options list</replaceable>}{<replaceable>class name</replaceable>}</literal>
</term></varlistentry><varlistentry><term><literal>\PassOptionsToPackage{<replaceable>options list</replaceable>}{<replaceable>package name</replaceable>}</literal>
</term><listitem><indexterm role="fn"><primary>\PassOptionsToClass</primary></indexterm>
<indexterm role="fn"><primary>\PassOptionsToPackage</primary></indexterm>
<para>Adds the options in the comma-separated list <replaceable>option list</replaceable> to the
options used by any future <literal>\RequirePackage</literal> or <literal>\usepackage</literal>
command for package <replaceable>package name</replaceable> or the class <replaceable>class name</replaceable>.
</para>
<para>The reason for these commands is: you may load a package any number of
times with no options but if you want options then you may only supply
them when you first load the package.  Loading a package with options
more than once will get you an error like <literal>Option clash for package
foo.</literal> (&latex; throws an error even if there is no conflict between the
options.)
</para>
<para>If your code is bringing in a package twice then you can collapse that
to once, for example replacing the two
<literal>\RequirePackage[landscape]{geometry}\RequirePackage[margins=1in]{geometry}</literal>
with the single
<literal>\RequirePackage[landscape,margins=1in]{geometry}</literal>.  But if you
are loading a package that in turn loads another package then you need
to queue up the options you desire.  For instance, suppose the package
<literal>foo</literal> loads the package <literal>geometry</literal>.  Instead of <literal>
\RequirePackage{foo}\RequirePackage[draft]{graphics}</literal> you must write
<literal>\PassOptionsToPackage{draft}{graphics}
\RequirePackage{foo}</literal>.  (If <literal>foo.sty</literal> loads an option in conflict
with what you want then you may have to look into altering its source.)
</para>
<para>These commands are useful for general users as well as class and package
writers.  For instance, suppose a user wants to load the <literal>graphicx</literal>
package with the option <literal>draft</literal> and also wants to use a class
<literal>foo</literal> that loads the <literal>graphicx</literal> package, but without that
option. The user could start their &latex; file with
<literal>\PassOptionsToPackage{draft}{graphicx}\documentclass{foo}</literal>.
</para>
</listitem></varlistentry><varlistentry><term><literal>\ProcessOptions</literal>
</term></varlistentry><varlistentry><term><literal>\ProcessOptions*<replaceable>\@options</replaceable></literal>
</term><listitem><indexterm role="fn"><primary>\ProcessOptions</primary></indexterm>
<indexterm role="fn"><primary>\ProcessOptions*</primary></indexterm>
<para>Execute the code for each option that the user has invoked.  Include it
in the class file as <literal>\ProcessOptions\relax</literal> (because of the
existence of the starred command).
</para>
<para>Options come in two types.  &#8216;Local&#8217; options have been specified for this
particular package in the <replaceable>options</replaceable> argument of
<literal>\PassOptionsToPackage{<replaceable>options</replaceable>}</literal>,
<literal>\usepackage[<replaceable>options</replaceable>]</literal>, or
<literal>\RequirePackage[<replaceable>options</replaceable>]</literal>.  &#8216;Global&#8217; options are those given
by the class user in <literal>\documentclass[<replaceable>options</replaceable>]</literal> (If an option
is specified both locally and globally then it is local.)
</para>
<para>When <literal>\ProcessOptions</literal> is called for a package <literal>pkg.sty</literal>, the
following happens.  (1) For each option <replaceable>option</replaceable> so far declared
with <literal>\DeclareOption</literal>, it looks to see if that option is either a
global or a local option for <literal>pkg</literal>. If so then it executes the
declared code.  This is done in the order in which these options were
given in <literal>pkg.sty</literal>.  (2) For each remaining local option, it
executes the command <literal>\ds@</literal><replaceable>option</replaceable> if it has been defined
somewhere (other than by a <literal>\DeclareOption</literal>); otherwise, it
executes the default option code given in <literal>\DeclareOption*</literal>. If no
default option code has been declared then it gives an error message.
This is done in the order in which these options were specified.
</para>
<para>When <literal>\ProcessOptions</literal> is called for a class it works in the same
way except that all options are local, and the default value for
<literal>\DeclareOption*</literal> is <literal>\OptionNotUsed</literal> rather than an error.
</para>
<para>The starred version <literal>\ProcessOptions*</literal><replaceable>\@options</replaceable> executes the
options in the order specified in the calling commands, rather than in
the order of declaration in the class or package. For a package this
means that the global options are processed first.
</para>

</listitem></varlistentry><varlistentry><term><literal>\ProvidesClass{<replaceable>class name</replaceable>}[<replaceable>&lt;release date&gt;</replaceable> <replaceable>&lt;brief additional information&gt;</replaceable>]</literal>
</term></varlistentry><varlistentry><term><literal>\ProvidesPackage{<replaceable>package name</replaceable>}[<replaceable>&lt;release date&gt;</replaceable> <replaceable>&lt;brief additional information&gt;</replaceable>]</literal>
</term><listitem><indexterm role="fn"><primary>\ProvidesClass</primary></indexterm>
<indexterm role="fn"><primary>\ProvidesPackage</primary></indexterm>
<para>Identifies the class or package, printing a message to the screen and the log file.
</para>
<para>When a user writes <literal>\documentclass{smcmemo}</literal> then &latex; loads
the file <literal>smcmemo.cls</literal>.  Similarly, a user writing
<literal>\usepackage{test}</literal> prompts &latex; to load the file
<literal>test.sty</literal>.  If the name of the file does not match the declared
class or package name then you get a warning.  Thus, if you invoke
<literal>\documentclass{smcmemo}</literal>, and the file <literal>smcmemo.cls</literal> has
the statement <literal>\ProvidesClass{xxx}</literal> then you get a warning like
<literal>You have requested document class `smcmemo', but the document
class provides 'xxx'.</literal>  This warning does not prevent &latex; from
processing the rest of the class file normally.
</para>
<para>If you include the optional part then you must include the date, before
the first space, and it must have the form <literal>YYYY/MM/DD</literal>.  The rest
of the optional part is free-form, although it traditionally identifies
the class, and is written to the screen during compilation and to the
log file.  Thus, if your file <literal>smcmem.cls</literal> contains the line
<literal>\ProvidesClass{smcmem}[2008/06/01 SMC memo class]</literal> and your
document&#8217;s first line is <literal>\documentclass{smcmem}</literal> then you will
see <literal>Document Class: smcmemo 2008/06/01 SMC memo class</literal>.
</para>
<para>The date in the optional portion allows class and package users to ask
to be warned if the version of the class or package installed on their
system is earlier than <replaceable>release date</replaceable>, by using the optional calls
such as <literal>\documentclass{smcmem}[2018/10/12]</literal> or
<literal>\usepackage{foo}[[2017/07/07]]</literal>.  (Note that package users only
rarely include a date, and class users almost never do.)
</para>
</listitem></varlistentry><varlistentry><term><literal>\ProvidesFile{<replaceable>file name</replaceable>}[<replaceable>additional information</replaceable>]</literal>
</term><listitem><indexterm role="fn"><primary>\ProvidesFile</primary></indexterm>
<para>Declare a file other than the main class and package files, such as
configuration files or font definition files.  Put this command in that
file and you get in the log a string like <literal>File: test.config
2017/10/12 config file for test.cls</literal>.
</para>
</listitem></varlistentry><varlistentry><term><literal>\RequirePackage[<replaceable>options list</replaceable>]{<replaceable>package name</replaceable>}[<replaceable>release date</replaceable>]</literal>
</term></varlistentry><varlistentry><term><literal>\RequirePackageWithOptions{<replaceable>package name</replaceable>}[<replaceable>release date</replaceable>]</literal>
</term><listitem><indexterm role="fn"><primary>\RequirePackage</primary></indexterm>
<indexterm role="fn"><primary>\RequirePackageWithOptions</primary></indexterm>
<para>Load a package, like the author command <literal>\usepackage</literal>.
See <link linkend="Additional-packages">Additional packages</link>. An example is
<literal>\RequirePackage[landscape,margin=1in]{geometry}</literal>.  Note that the
&latex; development team strongly recommends use of these commands over
Plain&#160;&tex;&#8217;s <literal>\input</literal>; see the Class Guide.
</para>
<para>The <replaceable>options list</replaceable>, if present, is a comma-separated list.  The
<replaceable>release date</replaceable>, if present, must have the form <replaceable>YYYY/MM/DD</replaceable>.  If
the release date of the package as installed on your system is earlier
than <replaceable>release date</replaceable> then you get a warning like <literal>You have
requested, on input line 9, version `2017/07/03' of package jhtest, but
only version `2000/01/01' is available</literal>.
</para>
<para>The <literal>\RequirePackageWithOptions</literal> version uses the list of options
for the current class.  This means it ignores any options passed to it
via <literal>\PassOptionsToClass</literal>.  This is a convenience command to allow
easily building classes on existing ones without having to track which
options were passed.
</para>
<para>The difference between <literal>\usepackage</literal> and <literal>\RequirePackage</literal> is
small.  The <literal>\usepackage</literal> command is intended for the document file
while <literal>\RequirePackage</literal> is intended for package and class files.
Thus, using <literal>\usepackage</literal> before the <literal>\documentclass</literal> command
causes &latex; to give error like <literal>\usepackage before
\documentclass</literal>, but you can use <literal>\RequirePackage</literal> there.
</para></listitem></varlistentry></variablelist>

</sect2>
</sect1>
</chapter>
<chapter label="4" id="Fonts">
<title>Fonts</title>
<anchor id="Typefaces"/><!-- old name -->

<indexterm role="cp"><primary>typefaces</primary></indexterm>
<indexterm role="cp"><primary>fonts</primary></indexterm>

<para>Two important aspects of selecting a <firstterm>font</firstterm> are specifying a size
and a style.  The &latex; commands for doing this are described here.
</para>


<sect1 label="4.1" id="Font-styles">
<title>Font styles</title>

<indexterm role="cp"><primary>font styles</primary></indexterm>
<indexterm role="cp"><primary>type styles</primary></indexterm>
<indexterm role="cp"><primary>styles of text</primary></indexterm>

<para>The following type style commands are supported by &latex;.
</para>
<para>This first group of commands is typically used with an argument, as in
<literal>\textit{<replaceable>text</replaceable>}</literal>.  In the table below, the corresponding
command in parenthesis is the &#8220;declaration form&#8221;, which takes no
arguments, as in <literal>{\itshape <replaceable>text</replaceable>}</literal>.  The scope of the
declaration form lasts until the next type style command or the end of
the current group.
</para>
<para>These commands, in both the argument form and the declaration form,
are cumulative; e.g., you can say either <literal>\sffamily\bfseries</literal> or
<literal>\bfseries\sffamily</literal> to get bold sans serif.
</para>
<para>You can alternatively use an environment form of the declarations; for
instance, <literal>\begin{ttfamily}...\end{ttfamily}</literal>.
</para>
<indexterm role="fn"><primary>\nocorrlist</primary></indexterm>
<indexterm role="fn"><primary>\nocorr</primary></indexterm>
<para>These font-switching commands automatically insert italic corrections
if needed.  (See <link linkend="_005c_002f">\/</link>, for the details of italic corrections.)
Specifically, they insert the italic correction unless the following
character is in the list <literal>\nocorrlist</literal>, which by default consists
of a period and a comma.  To suppress the automatic insertion of
italic correction, use <literal>\nocorr</literal> at the start or end of the
command argument, such as <literal>\textit{\nocorr text}</literal> or
<literal>\textsc{text \nocorr}</literal>.
</para>
<variablelist><varlistentry><term><literal>\textrm (\rmfamily)</literal>
</term><listitem><indexterm role="fn"><primary>\textrm</primary></indexterm>
<indexterm role="fn"><primary>\rmfamily</primary></indexterm>
<para>Roman.
</para>
</listitem></varlistentry><varlistentry><term><literal>\textit (\itshape)</literal>
</term><listitem><indexterm role="fn"><primary>\textit</primary></indexterm>
<indexterm role="fn"><primary>\itshape</primary></indexterm>
<para>Italics.
</para>
</listitem></varlistentry><varlistentry><term><literal>\textmd (\mdseries)</literal>
</term><listitem><indexterm role="fn"><primary>\textmd</primary></indexterm>
<indexterm role="fn"><primary>\mdseries</primary></indexterm>
<para>Medium weight (default).
</para>
</listitem></varlistentry><varlistentry><term><literal>\textbf (\bfseries)</literal>
</term><listitem><indexterm role="fn"><primary>\textbf</primary></indexterm>
<indexterm role="fn"><primary>\bfseries</primary></indexterm>
<para>Boldface.
</para>
</listitem></varlistentry><varlistentry><term><literal>\textup (\upshape)</literal>
</term><listitem><indexterm role="fn"><primary>\textup</primary></indexterm>
<indexterm role="fn"><primary>\upshape</primary></indexterm>
<para>Upright (default).
</para>
</listitem></varlistentry><varlistentry><term><literal>\textsl (\slshape)</literal>
</term><listitem><indexterm role="fn"><primary>\textsl</primary></indexterm>
<indexterm role="fn"><primary>\slshape</primary></indexterm>
<para>Slanted.
</para>
</listitem></varlistentry><varlistentry><term><literal>\textsf (\sffamily)</literal>
</term><listitem><indexterm role="fn"><primary>\textsf</primary></indexterm>
<indexterm role="fn"><primary>\sffamily</primary></indexterm>
<para>Sans serif.
</para>
</listitem></varlistentry><varlistentry><term><literal>\textsc (\scshape)</literal>
</term><listitem><indexterm role="fn"><primary>\textsc</primary></indexterm>
<indexterm role="fn"><primary>\scshape</primary></indexterm>
<para>Small caps.
</para>
</listitem></varlistentry><varlistentry><term><literal>\texttt (\ttfamily)</literal>
</term><listitem><indexterm role="fn"><primary>\texttt</primary></indexterm>
<indexterm role="fn"><primary>\ttfamily</primary></indexterm>
<para>Typewriter.
</para>
</listitem></varlistentry><varlistentry><term><literal>\textnormal (\normalfont)</literal>
</term><listitem><indexterm role="fn"><primary>\textnormal</primary></indexterm>
<indexterm role="fn"><primary>\normalfont</primary></indexterm>
<para>Main document font.
</para>
</listitem></varlistentry></variablelist>
<indexterm role="cp"><primary>emphasis</primary></indexterm>
<indexterm role="fn"><primary>\emph</primary></indexterm>
<para>Although it also changes fonts, the <literal>\emph{<replaceable>text</replaceable>}</literal> command
is semantic, for text to be emphasized, and should not be used as a
substitute for <literal>\textit</literal>.  For example, <literal>\emph{<replaceable>start
text</replaceable> \emph{<replaceable>middle text</replaceable>} <replaceable>end text</replaceable>}</literal> will result in the
<replaceable>start text</replaceable> and <replaceable>end text</replaceable> in italics, but <replaceable>middle text</replaceable>
will be in roman.
</para>
<para>&latex; also provides the following commands, which unconditionally
switch to the given style, that is, are <emphasis>not</emphasis> cumulative.  Also,
they are used differently than the above commands:
<literal>{\<replaceable>cmd</replaceable>...}</literal> instead of <literal>\<replaceable>cmd</replaceable>{...}</literal>.  These
are two unrelated constructs.
</para>
<variablelist><varlistentry><term><indexterm role="fn"><primary>\bf</primary></indexterm><literal>\bf</literal>
</term><listitem><indexterm role="cp"><primary>bold font</primary></indexterm>
<para>Switch to bold face.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\cal</primary></indexterm><literal>\cal</literal>
</term><listitem><indexterm role="cp"><primary>script letters for math</primary></indexterm>
<indexterm role="cp"><primary>calligraphic letters for math</primary></indexterm>
<para>Switch to calligraphic letters for math.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\it</primary></indexterm><literal>\it</literal>
</term><listitem><indexterm role="cp"><primary>italic font</primary></indexterm>
<para>Italics.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\rm</primary></indexterm><literal>\rm</literal>
</term><listitem><indexterm role="cp"><primary>roman font</primary></indexterm>
<para>Roman.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\sc</primary></indexterm><literal>\sc</literal>
</term><listitem><indexterm role="cp"><primary>small caps font</primary></indexterm>
<para>Small caps.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\sf</primary></indexterm><literal>\sf</literal>
</term><listitem><indexterm role="cp"><primary>sans serif font</primary></indexterm>
<para>Sans serif.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\sl</primary></indexterm><literal>\sl</literal>
</term><listitem><indexterm role="cp"><primary>slanted font</primary></indexterm>
<indexterm role="cp"><primary>oblique font</primary></indexterm>
<para>Slanted (oblique).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\tt</primary></indexterm><literal>\tt</literal>
</term><listitem><indexterm role="cp"><primary>typewriter font</primary></indexterm>
<indexterm role="cp"><primary>monospace font</primary></indexterm>
<indexterm role="cp"><primary>fixed-width font</primary></indexterm>
<para>Typewriter (monospace, fixed-width).
</para>
</listitem></varlistentry></variablelist>
<para>The <literal>\em</literal> command is the unconditional version of <literal>\emph</literal>.
</para>
<para>(Some people consider the unconditional font-switching commands, such
as <literal>\tt</literal>, obsolete and that only the cumulative commands
(<literal>\texttt</literal>) should be used.  Others think that both sets of
commands have their place and sometimes an unconditional font switch
is precisely what you want; for one example,
see <link linkend="description"><literal>description</literal></link>.)
</para>
<para>The following commands are for use in math mode.  They are not
cumulative, so <literal>\mathbf{\mathit{<replaceable>symbol</replaceable>}}</literal> does not
create a boldface and italic <replaceable>symbol</replaceable>; instead, it will just be in
italics.  This is because typically math symbols need consistent
typographic treatment, regardless of the surrounding environment.
</para>
<variablelist><varlistentry><term><literal>\mathrm</literal>
</term><listitem><indexterm role="fn"><primary>\mathrm</primary></indexterm>
<para>Roman, for use in math mode.
</para>
</listitem></varlistentry><varlistentry><term><literal>\mathbf</literal>
</term><listitem><indexterm role="fn"><primary>\mathbf</primary></indexterm>
<para>Boldface, for use in math mode.
</para>
</listitem></varlistentry><varlistentry><term><literal>\mathsf</literal>
</term><listitem><indexterm role="fn"><primary>\mathsf</primary></indexterm>
<para>Sans serif, for use in math mode.
</para>
</listitem></varlistentry><varlistentry><term><literal>\mathtt</literal>
</term><listitem><indexterm role="fn"><primary>\mathtt</primary></indexterm>
<para>Typewriter, for use in math mode.
</para>
</listitem></varlistentry><varlistentry><term><literal>\mathit</literal>
</term><term><literal>(\mit)</literal>
</term><listitem><para>Italics, for use in math mode.
</para>
</listitem></varlistentry><varlistentry><term><literal>\mathnormal</literal>
</term><listitem><indexterm role="fn"><primary>\mathnormal</primary></indexterm>
<para>For use in math mode, e.g., inside another type style declaration.
</para>
</listitem></varlistentry><varlistentry><term><literal>\mathcal</literal>
</term><listitem><indexterm role="fn"><primary>\mathcal</primary></indexterm>
<para>Calligraphic letters, for use in math mode.
</para>
</listitem></varlistentry></variablelist>
<indexterm role="fn"><primary>\mathversion</primary></indexterm>
<indexterm role="cp"><primary>math, bold</primary></indexterm>
<indexterm role="cp"><primary>bold math</primary></indexterm>
<para>In addition, the command <literal>\mathversion{bold}</literal> can be used for
switching to bold letters and symbols in
formulas. <literal>\mathversion{normal}</literal> restores the default.
</para>
<indexterm role="fn"><primary>\oldstylenums</primary></indexterm>
<indexterm role="cp"><primary>numerals, old-style</primary></indexterm>
<indexterm role="cp"><primary>old-style numerals</primary></indexterm>
<indexterm role="cp"><primary>lining numerals</primary></indexterm>
<indexterm role="cp"><primary>package, <literal>textcomp</literal></primary></indexterm>
<indexterm role="cp"><primary><literal>textcomp</literal> package</primary></indexterm>
<para>Finally, the command <literal>\oldstylenums{<replaceable>numerals</replaceable>}</literal> will typeset
so-called &#8220;old-style&#8221; numerals, which have differing heights and
depths (and sometimes widths) from the standard &#8220;lining&#8221; numerals,
which all have the same height as upper-case letters.  &latex;&#8217;s
default fonts support this, and will respect <literal>\textbf</literal> (but not
other styles; there are no italic old-style numerals in Computer
Modern).  Many other fonts have old-style numerals also; sometimes the
<literal>textcomp</literal> package must be loaded, and sometimes package options
are provided to make them the default.  FAQ entry:
<ulink url="http://www.tex.ac.uk/cgi-bin/texfaq2html?label=osf">http://www.tex.ac.uk/cgi-bin/texfaq2html?label=osf</ulink>.
</para>

</sect1>
<sect1 label="4.2" id="Font-sizes">
<title>Font sizes</title>

<indexterm role="cp"><primary>font sizes</primary></indexterm>
<indexterm role="cp"><primary>typeface sizes</primary></indexterm>
<indexterm role="cp"><primary>sizes of text</primary></indexterm>

<para>The following standard type size commands are supported by &latex;.
The table shows the command name and the corresponding actual font
size used (in points) with the &#8216;<literal>10pt</literal>&#8217;, &#8216;<literal>11pt</literal>&#8217;, and
&#8216;<literal>12pt</literal>&#8217; document size options, respectively (see <link linkend="Document-class-options">Document class
options</link>).
</para>
<indexterm role="fn"><primary>\tiny</primary></indexterm>
<indexterm role="fn"><primary>\scriptsize</primary></indexterm>
<indexterm role="fn"><primary>\footnotesize</primary></indexterm>
<indexterm role="fn"><primary>\small</primary></indexterm>
<indexterm role="fn"><primary>\normalsize</primary></indexterm>
<indexterm role="fn"><primary>\large</primary></indexterm>
<indexterm role="fn"><primary>\Large</primary></indexterm>
<indexterm role="fn"><primary>\LARGE</primary></indexterm>
<indexterm role="fn"><primary>\huge</primary></indexterm>
<indexterm role="fn"><primary>\Huge</primary></indexterm>

<informaltable><tgroup cols="4"><colspec colwidth="21*"></colspec><colspec colwidth="5*"></colspec><colspec colwidth="5*"></colspec><colspec colwidth="5*"></colspec><thead><row><entry><para>Command  </para></entry><entry><para><literal>10pt</literal>  </para></entry><entry><para><literal>11pt</literal>  </para></entry><entry><para><literal>12pt</literal>
</para></entry></row></thead><tbody><row><entry><para><literal>\tiny</literal>
</para></entry><entry><para>5          </para></entry><entry><para>6          </para></entry><entry><para>6
</para></entry></row><row><entry><para><literal>\scriptsize</literal>
</para></entry><entry><para>7          </para></entry><entry><para>8          </para></entry><entry><para>8
</para></entry></row><row><entry><para><literal>\footnotesize</literal>
</para></entry><entry><para>8          </para></entry><entry><para>9          </para></entry><entry><para>10
</para></entry></row><row><entry><para><literal>\small</literal>
</para></entry><entry><para>9          </para></entry><entry><para>10         </para></entry><entry><para>10.95
</para></entry></row><row><entry><para><literal>\normalsize</literal> (default)
</para></entry><entry><para>10         </para></entry><entry><para>10.95      </para></entry><entry><para>12
</para></entry></row><row><entry><para><literal>\large</literal>
</para></entry><entry><para>12         </para></entry><entry><para>12         </para></entry><entry><para>14.4
</para></entry></row><row><entry><para><literal>\Large</literal>
</para></entry><entry><para>14.4       </para></entry><entry><para>14.4       </para></entry><entry><para>17.28
</para></entry></row><row><entry><para><literal>\LARGE</literal>
</para></entry><entry><para>17.28      </para></entry><entry><para>17.28      </para></entry><entry><para>20.74
</para></entry></row><row><entry><para><literal>\huge</literal>
</para></entry><entry><para>20.74      </para></entry><entry><para>20.74      </para></entry><entry><para>24.88
</para></entry></row><row><entry><para><literal>\Huge</literal>
</para></entry><entry><para>24.88      </para></entry><entry><para>24.88      </para></entry><entry><para>24.88
</para></entry></row></tbody></tgroup></informaltable>
<para>The commands as listed here are &#8220;declaration forms&#8221;. The scope of
the declaration form lasts until the next type style command or the
end of the current group.  You can also use the environment form of
these commands; for instance, <literal>\begin{tiny}...\end{tiny}</literal>.
</para>

</sect1>
<sect1 label="4.3" id="Low_002dlevel-font-commands">
<title>Low-level font commands</title>

<indexterm role="cp"><primary>low-level font commands</primary></indexterm>
<indexterm role="cp"><primary>font commands, low-level</primary></indexterm>

<para>These commands are primarily intended for writers of macros and
packages.  The commands listed here are only a subset of the available
ones.
<!-- xx but it should be complete -->
<!-- xx something about ultimately reading ENCFAM.fd? -->
</para>
<variablelist><varlistentry><term><literal>\fontencoding{<replaceable>encoding</replaceable>}</literal>
</term><listitem><indexterm role="fn"><primary>\fontencoding</primary></indexterm>
<para>Select the font encoding, the encoding of the output font. There are a
large number of valid encodings.  The most common are <literal>OT1</literal>,
Knuth&#8217;s original encoding for Computer Modern (the default), and
<literal>T1</literal>, also known as the Cork encoding, which has support for the
accented characters used by the most widespread European languages
(German, French, Italian, Polish and others), which allows &tex; to
hyphenate words containing accented letters.
</para>
</listitem></varlistentry><varlistentry><term><literal>\fontfamily{<replaceable>family</replaceable>}</literal>
</term><listitem><indexterm role="fn"><primary>\fontfamily</primary></indexterm>
<indexterm role="cp"><primary>families, of fonts</primary></indexterm>
<indexterm role="cp"><primary>font catalogue</primary></indexterm>
<para>Select the font family.  The web page
<ulink url="http://www.tug.dk/FontCatalogue/">http://www.tug.dk/FontCatalogue/</ulink> provides one way to browse
through many of the fonts easily used with &latex;.  Here are
examples of some common families:
</para>
<!-- Sorry about the ugly @t{@ }.  The idea is to make the lists line up -->
<!-- in Info.  Since the items are so short, it seems nice to have them -->
<!-- on the same line instead of using @table. -->

<itemizedlist><listitem><para><!-- /@w --> <literal>pag</literal><literal>&#160;</literal> Avant Garde
</para></listitem><listitem><para><!-- /@w --> <literal>fvs</literal><literal>&#160;</literal> Bitstream Vera Sans
</para></listitem><listitem><para><!-- /@w --> <literal>pbk</literal><literal>&#160;</literal> Bookman
</para></listitem><listitem><para><!-- /@w --> <literal>bch</literal><literal>&#160;</literal> Charter
</para></listitem><listitem><para><!-- /@w --> <literal>ccr</literal><literal>&#160;</literal> Computer Concrete
</para></listitem><listitem><para><!-- /@w --> <literal>cmr</literal><literal>&#160;</literal> Computer Modern
</para></listitem><listitem><para><!-- /@w --> <literal>pcr</literal><literal>&#160;</literal> Courier
</para></listitem><listitem><para><!-- /@w --> <literal>phv</literal><literal>&#160;</literal> Helvetica
</para></listitem><listitem><para><!-- /@w --> <literal>fi4</literal><literal>&#160;</literal> Inconsolata
</para></listitem><listitem><para><!-- /@w --> <literal>lmr</literal><literal>&#160;</literal> Latin Modern
</para></listitem><listitem><para><!-- /@w --> <literal>lmss</literal> Latin Modern Sans
</para></listitem><listitem><para><!-- /@w --> <literal>lmtt</literal> Latin Modern Typewriter
</para></listitem><listitem><para><!-- /@w --> <literal>pnc</literal><literal>&#160;</literal> New Century Schoolbook
</para></listitem><listitem><para><!-- /@w --> <literal>ppl</literal><literal>&#160;</literal> Palatino
</para></listitem><listitem><para><!-- /@w --> <literal>ptm</literal><literal>&#160;</literal> Times
</para></listitem><listitem><para><!-- /@w --> <literal>uncl</literal> Uncial
</para></listitem><listitem><para><!-- /@w --> <literal>put</literal><literal>&#160;</literal> Utopia
</para></listitem><listitem><para><!-- /@w --> <literal>pzc</literal><literal>&#160;</literal> Zapf Chancery
</para></listitem></itemizedlist>
</listitem></varlistentry><varlistentry><term><literal>\fontseries{<replaceable>series</replaceable>}</literal>
</term><listitem><indexterm role="fn"><primary>\fontseries</primary></indexterm>
<indexterm role="cp"><primary>series, of fonts</primary></indexterm>
<para>Select the font series.  A <firstterm>series</firstterm> combines a <firstterm>weight</firstterm> and a
<firstterm>width</firstterm>.  Typically, a font supports only a few of the possible
combinations.  Some common combined series values include:
</para>
<itemizedlist><listitem><para><!-- /@w --> <literal>m</literal><literal>&#160;</literal> Medium (normal)
</para></listitem><listitem><para><!-- /@w --> <literal>b</literal><literal>&#160;</literal> Bold
</para></listitem><listitem><para><!-- /@w --> <literal>c</literal><literal>&#160;</literal> Condensed
</para></listitem><listitem><para><!-- /@w --> <literal>bc</literal> Bold condensed
</para></listitem><listitem><para><!-- /@w --> <literal>bx</literal> Bold extended
</para></listitem></itemizedlist>
<indexterm role="cp"><primary>weights, of fonts</primary></indexterm>
<para>The possible values for weight, individually, are:
</para>
<itemizedlist><listitem><para><!-- /@w --> <literal>ul</literal> Ultra light
</para></listitem><listitem><para><!-- /@w --> <literal>el</literal> Extra light
</para></listitem><listitem><para><!-- /@w --> <literal>l</literal><literal>&#160;</literal> Light
</para></listitem><listitem><para><!-- /@w --> <literal>sl</literal> Semi light
</para></listitem><listitem><para><!-- /@w --> <literal>m</literal><literal>&#160;</literal> Medium (normal)
</para></listitem><listitem><para><!-- /@w --> <literal>sb</literal> Semi bold
</para></listitem><listitem><para><!-- /@w --> <literal>b</literal><literal>&#160;</literal> Bold
</para></listitem><listitem><para><!-- /@w --> <literal>eb</literal> Extra bold
</para></listitem><listitem><para><!-- /@w --> <literal>ub</literal> Ultra bold
</para></listitem></itemizedlist> 
<indexterm role="cp"><primary>widths, of fonts</primary></indexterm>
<para>The possible values for width, individually, are (the percentages
are just guides and are not followed precisely by all fonts):
</para>
<itemizedlist><listitem><para><!-- /@w --> <literal>uc</literal> Ultra condensed, 50%
</para></listitem><listitem><para><!-- /@w --> <literal>ec</literal> Extra condensed, 62.5%
</para></listitem><listitem><para><!-- /@w --> <literal>c</literal><literal>&#160;</literal> Condensed, 75%
</para></listitem><listitem><para><!-- /@w --> <literal>sc</literal> Semi condensed, 87.5%
</para></listitem><listitem><para><!-- /@w --> <literal>m</literal><literal>&#160;</literal> Medium, 100%
</para></listitem><listitem><para><!-- /@w --> <literal>sx</literal> Semi expanded, 112.5%
</para></listitem><listitem><para><!-- /@w --> <literal>x</literal><literal>&#160;</literal> Expanded, 125%
</para></listitem><listitem><para><!-- /@w --> <literal>ex</literal> Extra expanded, 150%
</para></listitem><listitem><para><!-- /@w --> <literal>ux</literal> Ultra expanded, 200%
</para></listitem></itemizedlist>
<para>When forming the <replaceable>series</replaceable> string from the weight and width, drop the
<literal>m</literal> that stands for medium weight or medium width, unless both
weight and width are <literal>m</literal>, in which case use just one
(&#8216;<literal><literal>m</literal></literal>&#8217;).
</para> 
</listitem></varlistentry><varlistentry><term><literal>\fontshape{<replaceable>shape</replaceable>}</literal>
</term><listitem><indexterm role="fn"><primary>\fontshape</primary></indexterm>
<indexterm role="cp"><primary>shapes, of fonts</primary></indexterm>
<para>Select font shape. Valid shapes are:
</para>
<itemizedlist><listitem><para><!-- /@w --> <literal>n</literal><literal>&#160;</literal> Upright (normal)
</para></listitem><listitem><para><!-- /@w --> <literal>it</literal> Italic
</para></listitem><listitem><para><!-- /@w --> <literal>sl</literal> Slanted (oblique)
</para></listitem><listitem><para><!-- /@w --> <literal>sc</literal> Small caps
</para></listitem><listitem><para><!-- /@w --> <literal>ui</literal> Upright italics
</para></listitem><listitem><para><!-- /@w --> <literal>ol</literal> Outline
</para></listitem></itemizedlist>
<para>The two last shapes are not available for most font families, and
small caps are often missing as well.
</para>
</listitem></varlistentry><varlistentry><term><literal>\fontsize{<replaceable>size</replaceable>}{<replaceable>skip</replaceable>}</literal>
</term><listitem><indexterm role="fn"><primary>\fontsize</primary></indexterm>
<indexterm role="cp"><primary>font size</primary></indexterm>
<indexterm role="fn"><primary>\baselineskip</primary></indexterm>
<para>Set the font size and the line spacing.  The unit of both parameters
defaults to points (<literal>pt</literal>).  The line spacing is the nominal
vertical space between lines, baseline to baseline.  It is stored in the
parameter <literal>\baselineskip</literal>.  The default <literal>\baselineskip</literal> for
the Computer Modern typeface is 1.2 times the <literal>\fontsize</literal>.
Changing <literal>\baselineskip</literal> directly is inadvisable since its value is
reset every time a size change happens; see <literal>\baselinestretch</literal>, next.
</para>
</listitem></varlistentry><varlistentry><term><literal>\baselinestretch</literal>
</term><listitem><indexterm role="fn"><primary>\baselinestretch</primary></indexterm>
<para>&latex; multiplies the line spacing by the value of the
<literal>\baselinestretch</literal> parameter; the default factor is 1.  A change
takes effect when <literal>\selectfont</literal> (see below) is called.  You can
make line skip changes happen for the entire document by doing
<literal>\renewcommand{\baselinestretch}{2.0}</literal> in the preamble.
</para>
<indexterm role="cp"><primary>package, <literal>setspace</literal></primary></indexterm>
<indexterm role="cp"><primary><literal>setspace</literal> package</primary></indexterm>
<indexterm role="cp"><primary>double spacing</primary></indexterm>
<para>However, the best way to double-space a document is to use the
<filename>setspace</filename> package.  In addition to offering a number of spacing
options, this package keeps the line spacing single-spaced in places
where that is typically desirable, such as footnotes and figure
captions.  See the package documentation.
</para>
</listitem></varlistentry><varlistentry><term><literal>\linespread{<replaceable>factor</replaceable>}</literal>
</term><listitem><indexterm role="fn"><primary>\linespread</primary></indexterm>
<para>Equivalent to
<literal>\renewcommand{\baselinestretch}{<replaceable>factor</replaceable>}</literal>, and
therefore must be followed by <literal>\selectfont</literal> to have any effect.
Best specified in the preamble, or use the <literal>setspace</literal> package, as
just described.
</para>
</listitem></varlistentry><varlistentry><term><literal>\selectfont</literal>
</term><listitem><indexterm role="fn"><primary>\selectfont</primary></indexterm>
<para>The effects of the font commands described above do not happen until
<literal>\selectfont</literal> is called, as in
<literal>\fontfamily{<replaceable>familyname</replaceable>}\selectfont</literal>.  It is often useful
to put this in a macro:

<literal>\newcommand*{\myfont}{\fontfamily{<replaceable>familyname</replaceable>}\selectfont}</literal>

(see <link linkend="_005cnewcommand-_0026-_005crenewcommand">\newcommand &amp; \renewcommand</link>).
</para>
</listitem></varlistentry><varlistentry><term><literal>\usefont{<replaceable>enc</replaceable>}{<replaceable>family</replaceable>}{<replaceable>series</replaceable>}{<replaceable>shape</replaceable>}</literal>
</term><listitem><indexterm role="fn"><primary>\usefont</primary></indexterm>
<para>The same as invoking <literal>\fontencoding</literal>, <literal>\fontfamily</literal>,
<literal>\fontseries</literal> and <literal>\fontshape</literal> with the given parameters,
followed by <literal>\selectfont</literal>.  For example:
</para>
<screen>\usefont{ot1}{cmr}{m}{n}
</screen>
</listitem></varlistentry></variablelist>

</sect1>
</chapter>
<chapter label="5" id="Layout">
<title>Layout</title>

<indexterm role="cp"><primary>layout commands</primary></indexterm>

<para>Commands for controlling the general page layout.
</para>


<sect1 label="5.1" id="_005conecolumn">
<title><literal>\onecolumn</literal></title>

<indexterm role="fn"><primary>\onecolumn</primary></indexterm>
<indexterm role="cp"><primary>one-column output</primary></indexterm>

<para>Start a new page and produce single-column output.  If the document is
given the class option <literal>onecolumn</literal> then this is the default
behavior (see <link linkend="Document-class-options">Document class options</link>).
</para>
<para>This command is fragile (see <link linkend="_005cprotect">\protect</link>).
</para>

</sect1>
<sect1 label="5.2" id="_005ctwocolumn">
<title><literal>\twocolumn</literal></title>

<indexterm role="fn"><primary>\twocolumn</primary></indexterm>
<indexterm role="cp"><primary>multicolumn text</primary></indexterm>
<indexterm role="cp"><primary>two-column output</primary></indexterm>

<para>Synopses:
</para>
<screen>\twocolumn
\twocolumn[<replaceable>prelim one column text</replaceable>]
</screen>
<para>Start a new page and produce two-column output. If the document is given
the class option <literal>twocolumn</literal> then this is the default
(see <link linkend="Document-class-options">Document class options</link>).
</para>
<para>If the optional <replaceable>prelim one column text</replaceable> argument
is present, it is typeset in one-column mode before the two-column
typesetting starts.
</para>
<para>This command is fragile (see <link linkend="_005cprotect">\protect</link>).
</para>
<para>These parameters control typesetting in two-column output:
</para>
<variablelist><varlistentry><term><indexterm role="fn"><primary>\columnsep</primary></indexterm><literal>\columnsep</literal>
</term><listitem><para>The distance between columns. The default is 35pt.  Change it with a
command such as <literal>\setlength{\columnsep}{40pt}</literal> You must change
it before the two column environment starts; in the preamble is a good
place.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\columnseprule</primary></indexterm><literal>\columnseprule</literal>
</term><listitem><para>The width of the rule between columns. The rule appears halfway between
the two columns.  The default is 0pt, meaning that there is no rule.
Change it with a command such as
<literal>\setlength{\columnseprule}{0.4pt}</literal>, before the two-column
environment starts.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\columnwidth</primary></indexterm><literal>\columnwidth</literal>
</term><listitem><para>The width of a single column.  In one-column mode this is equal to
<literal>\textwidth</literal>.  In two-column mode by default &latex; sets the
width of each of the two columns to be half of <literal>\textwidth</literal> minus
<literal>\columnsep</literal>.
</para>
</listitem></varlistentry></variablelist>
<para>In a two-column document, the starred environments <literal>table*</literal> and
<literal>figure*</literal> are two columns wide, whereas the unstarred environments
<literal>table</literal> and <literal>figure</literal> take up only one column (see <link linkend="figure">figure</link>
and see <link linkend="table">table</link>). &latex; places starred floats at the top of a page.
The following parameters control float behavior of two-column output.
</para>
<variablelist><varlistentry><term><indexterm role="fn"><primary>\dbltopfraction</primary></indexterm><literal>\dbltopfraction</literal>
</term><listitem><para>The maximum fraction at the top of a two-column page that may be
occupied by two-column wide floats.  The default is 0.7, meaning that
the height of a <literal>table*</literal> or <literal>figure*</literal> environment must not
exceed <literal>0.7\textheight</literal> .  If the height of your starred float
environment exceeds this then you can take one of the following actions
to prevent it from floating all the way to the back of the document:
</para>
<itemizedlist><listitem><para>Use the <literal>[tp]</literal> location specifier to tell LaTeX to try to put
the bulky float on a page by itself, as well as at the top of a page.
</para>
</listitem><listitem><para>Use the <literal>[t!]</literal> location specifier to override the effect of
<literal>\dbltopfraction</literal> for this particular float.
</para>
</listitem><listitem><para>Increase the value of <literal>\dbltopfraction</literal> to a suitably large number,
to avoid going to float pages so soon.
</para></listitem></itemizedlist>
<para>You can redefine it, for instance with
<literal>\renewcommand{\dbltopfraction}{0.9}</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\dblfloatpagefraction</primary></indexterm><literal>\dblfloatpagefraction</literal>
</term><listitem><para>For a float page of two-column wide floats, this is the minimum fraction
that must be occupied by floats, limiting the amount of blank space.
&latex;&#8217;s default is <literal>0.5</literal>.  Change it with <literal>\renewcommand</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\dblfloatsep</primary></indexterm><literal>\dblfloatsep</literal>
</term><listitem><para>On a float page of two-column wide floats, this length is the distance
between floats, at both the top and bottom of the page.  The default is
<literal>12pt plus2pt minus2pt</literal> for a document set at <literal>10pt</literal> or
<literal>11pt</literal>, and <literal>14pt plus2pt minus4pt</literal> for a document set at
<literal>12pt</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\dbltextfloatsep</primary></indexterm><literal>\dbltextfloatsep</literal>
</term><listitem><para>This length is the distance between a multi-column float at the top or
bottom of a page and the main text.  The default is <literal>20pt plus2pt
minus4pt</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\dbltopnumber</primary></indexterm><literal>\dbltopnumber</literal>
</term><listitem><para>On a float page of two-column wide floats, this counter gives the
maximum number of floats allowed at the top of the page.  The &latex;
default is <literal>2</literal>.
</para>
</listitem></varlistentry></variablelist>
<!-- From egreg at http://tex.stackexchange.com/a/142232/339 -->
<para>This example uses <literal>\twocolumn</literal>&#8217;s optional argument of to create a
title that spans the two-column article:
</para>
<screen>\documentclass[twocolumn]{article}
\newcommand{\authormark}[1]{\textsuperscript{#1}}
\begin{document}
\twocolumn[{% inside this optional argument goes one-column text
  \centering
  \LARGE The Title \\[1.5em]
  \large Author One\authormark{1},
         Author Two\authormark{2},
         Author Three\authormark{1} \\[1em]
  \normalsize
  \begin{tabular}{p{.2\textwidth}@{\hspace{2em}}p{.2\textwidth}}
    \authormark{1}Department one  &amp;\authormark{2}Department two \\ 
     School one                   &amp;School two 
  \end{tabular}\\[3em] % space below title part
  }]

Two column text here.
</screen>

</sect1>
<sect1 label="5.3" id="_005cflushbottom">
<title><literal>\flushbottom</literal></title>

<indexterm role="fn"><primary>\flushbottom</primary></indexterm>

<para>Make all pages in the documents after this declaration have the same
height, by stretching the vertical space where necessary to fill out the
page.  This is most often used when making two-sided documents since the
differences in facing pages can be glaring.
</para>
<para>If &tex; cannot satisfactorily stretch the vertical space in a page
then you get a message like &#8216;<literal>Underfull \vbox (badness 10000) has
occurred while \output is active</literal>&#8217;.  If you get that, one option is to
change to <literal>\raggedbottom</literal> (see <link linkend="_005craggedbottom">\raggedbottom</link>).  Alternatively,
you can adjust the <literal>textheight</literal> to make compatible pages, or you
can add some vertical stretch glue between lines or between paragraphs,
as in <literal>\setlength{\parskip}{0ex plus0.1ex}</literal>.  Your last option
is to, in a final editing stage, adjust the height of individual pages
(see <link linkend="_005cenlargethispage">\enlargethispage</link>).
</para>
<para>The <literal>\flushbottom</literal> state is the default only if you select the
<literal>twoside</literal> document class option (see <link linkend="Document-class-options">Document class options</link>).
</para>

</sect1>
<sect1 label="5.4" id="_005craggedbottom">
<title><literal>\raggedbottom</literal></title>

<indexterm role="fn"><primary>\raggedbottom</primary></indexterm>
<indexterm role="cp"><primary>stretch, omitting vertical</primary></indexterm>

<para>Make all later pages the natural height of the material on that page; no
rubber vertical lengths will be stretched.  Thus, in a two-sided
document the facing pages may be different heights.  This command can go
at any point in the document body.  See <link linkend="_005cflushbottom">\flushbottom</link>.
</para>
<para>This is the default unless you select the <literal>twoside</literal> document class
option (see <link linkend="Document-class-options">Document class options</link>).
</para>

</sect1>
<sect1 label="5.5" id="Page-layout-parameters">
<title>Page layout parameters</title>

<indexterm role="cp"><primary>page layout parameters</primary></indexterm>
<indexterm role="cp"><primary>parameters, page layout</primary></indexterm>
<indexterm role="cp"><primary>layout, page parameters for</primary></indexterm>
<indexterm role="cp"><primary>header, parameters for</primary></indexterm>
<indexterm role="cp"><primary>footer, parameters for</primary></indexterm>
<indexterm role="cp"><primary>running header and footer</primary></indexterm>

<variablelist><varlistentry><term><indexterm role="fn"><primary>\columnsep</primary></indexterm><literal>\columnsep</literal>
</term><term><indexterm role="fn"><primary>\columnseprule</primary></indexterm><literal>\columnseprule</literal>
</term><term><indexterm role="fn"><primary>\columnwidth</primary></indexterm><literal>\columnwidth</literal>
</term><listitem><indexterm role="fn"><primary>\columnsep</primary></indexterm>
<indexterm role="fn"><primary>\columnseprule</primary></indexterm>
<indexterm role="fn"><primary>\columnwidth</primary></indexterm>
<para>The distance between the two columns, the width of a rule between the
columns, and the width of the columns, when the document class option
<literal>twocolumn</literal> is in effect (see <link linkend="Document-class-options">Document class options</link>).
See <link linkend="_005ctwocolumn">\twocolumn</link>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\headheight</primary></indexterm><literal>\headheight</literal>
</term><listitem><indexterm role="fn"><primary>\headheight</primary></indexterm>
<para>Height of the box that contains the running head.  The default in the
<literal>article</literal>, <literal>report</literal>, and <literal>book</literal> classes is &#8216;<literal>12pt</literal>&#8217;,
at all type sizes.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\headsep</primary></indexterm><literal>\headsep</literal>
</term><listitem><indexterm role="fn"><primary>\headsep</primary></indexterm>
<para>Vertical distance between the bottom of the header line and the top of
the main text.  The default in the <literal>article</literal> and <literal>report</literal>
classes is &#8216;<literal>25pt</literal>&#8217;.  In the <literal>book</literal> class the default is: if the
document is set at 10pt then it is &#8216;<literal>0.25in</literal>&#8217;, and at 11pt and 12pt
it is &#8216;<literal>0.275in</literal>&#8217;.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\footskip</primary></indexterm><literal>\footskip</literal>
</term><listitem><indexterm role="fn"><primary>\footskip</primary></indexterm>
<para>Distance from the baseline of the last line of text to the baseline of
the page footer.  The default in the <literal>article</literal> and <literal>report</literal>
classes is &#8216;<literal>30pt</literal>&#8217;.  In the <literal>book</literal> class the default is: when
the type size is 10pt the default is &#8216;<literal>0.35in</literal>&#8217;, while at 11pt it is
&#8216;<literal>0.38in</literal>&#8217;, and at 12pt it is &#8216;<literal>30pt</literal>&#8217;.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\linewidth</primary></indexterm><literal>\linewidth</literal>
</term><listitem><indexterm role="fn"><primary>\linewidth</primary></indexterm>
<para>Width of the current line, decreased for each nested <literal>list</literal>
(see <link linkend="list">list</link>).  That is, the nominal value for <literal>\linewidth</literal> is to
equal <literal>\textwidth</literal> but for each nested list the <literal>\linewidth</literal>
is decreased by the sum of that list&#8217;s <literal>\leftmargin</literal> and
<literal>\rightmargin</literal> (see <link linkend="itemize">itemize</link>).
<!-- The default varies with the font size, paper width, two-column mode, -->
<!-- etc.  For an @code{article} document set in 10pt, the default is -->
<!-- @samp{345pt}, while in two-column mode that becomes @samp{229.5pt}. -->
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\marginparpush</primary></indexterm><literal>\marginparpush</literal>
</term><term><indexterm role="fn"><primary>\marginsep</primary></indexterm><literal>\marginsep</literal>
</term><term><indexterm role="fn"><primary>\marginparwidth</primary></indexterm><literal>\marginparwidth</literal>
</term><listitem><indexterm role="fn"><primary>\marginparpush</primary></indexterm>
<indexterm role="fn"><primary>\marginsep</primary></indexterm>
<indexterm role="fn"><primary>\marginparwidth</primary></indexterm>
<para>The minimum vertical space between two marginal notes, the horizontal
space between the text body and the marginal notes, and the horizontal
width of the notes.
</para>
<para>Normally marginal notes appear on the outside of the page, but the
declaration <literal>\reversemarginpar</literal> changes that (and
<literal>\normalmarginpar</literal> changes it back).
</para>
<para>The defaults for <literal>\marginparpush</literal> in both <literal>book</literal> and
<literal>article</literal> classes are: &#8216;<literal>7pt</literal>&#8217; if the document is set at 12pt,
and &#8216;<literal>5pt</literal>&#8217; if the document is set at 11pt or 10pt.
</para>
<para>For <literal>\marginsep</literal>, in <literal>article</literal> class the default is
&#8216;<literal>10pt</literal>&#8217; except if the document is set at 10pt and in two-column mode
where the default is &#8216;<literal>11pt</literal>&#8217;.
</para>
<para>For <literal>\marginsep</literal> in <literal>book</literal> class the default is &#8216;<literal>10pt</literal>&#8217; in
two-column mode and &#8216;<literal>7pt</literal>&#8217; in one-column mode.  
</para>
<para>For <literal>\marginparwidth</literal> in both <literal>book</literal> and <literal>article</literal>
classes, in two-column mode the default is 60% of <literal>\paperwidth
&#8722; \textwidth</literal>, while in one-column mode it is 50% of that
distance.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\oddsidemargin</primary></indexterm><literal>\oddsidemargin</literal>
</term><term><indexterm role="fn"><primary>\evensidemargin</primary></indexterm><literal>\evensidemargin</literal>
</term><listitem><indexterm role="fn"><primary>\oddsidemargin</primary></indexterm>
<indexterm role="fn"><primary>\evensidemargin</primary></indexterm>
<para>The <literal>\oddsidemargin</literal> is the extra distance between the left side of
the page and the text&#8217;s left margin, on odd-numbered pages when the
document class option <literal>twoside</literal> is chosen and on all pages when
<literal>oneside</literal> is in effect.  When <literal>twoside</literal> is in effect, on
even-numbered pages the extra distance on the left is
<literal>evensidemargin</literal>.
</para>
<para>&latex;&#8217;s default is that <literal>\oddsidemargin</literal> is 40% of the
difference between <literal>\paperwidth</literal> and <literal>\textwidth</literal>, and
<literal>\evensidemargin</literal> is the remainder.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\paperheight</primary></indexterm><literal>\paperheight</literal>
</term><listitem><indexterm role="fn"><primary>\paperheight</primary></indexterm>
<para>The height of the paper, as distinct from the height of the print area.
It is normally set with a document class option, as in
<literal>\documentclass[a4paper]{article}</literal> (see <link linkend="Document-class-options">Document class
options</link>).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\paperwidth</primary></indexterm><literal>\paperwidth</literal>
</term><listitem><indexterm role="fn"><primary>\paperwidth</primary></indexterm>
<para>The width of the paper, as distinct from the width of the print area.
It is normally set with a document class option, as in
<literal>\documentclass[a4paper]{article}</literal> (see <link linkend="Document-class-options">Document class
options</link>).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\textheight</primary></indexterm><literal>\textheight</literal>
</term><listitem><indexterm role="fn"><primary>\textheight</primary></indexterm>
<para>The normal vertical height of the page body.  If the document is set at
a nominal type size of 10pt then for an <literal>article</literal> or <literal>report</literal>
the default is &#8216;<literal>43\baselineskip</literal>&#8217;, while for a <literal>book</literal> it is
&#8216;<literal>41\baselineskip</literal>&#8217;.  At a type size of 11pt the default is
&#8216;<literal>38\baselineskip</literal>&#8217; for all document classes.  At 12pt it is
&#8216;<literal>36\baselineskip</literal>&#8217; for all classes.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\textwidth</primary></indexterm><literal>\textwidth</literal>
</term><listitem><indexterm role="fn"><primary>\textwidth</primary></indexterm>
<para>The full horizontal width of the entire page body.  For an
<literal>article</literal> or <literal>report</literal> document, the default is &#8216;<literal>345pt</literal>&#8217;
when the chosen type size is 10pt, the default is &#8216;<literal>360pt</literal>&#8217; at 11pt,
and it is &#8216;<literal>390pt</literal>&#8217; at 12pt.  For a <literal>book</literal> document, the default
is &#8216;<literal>4.5in</literal>&#8217; at a type size of 10pt, and &#8216;<literal>5in</literal>&#8217; at 11pt or 12pt.
</para>
<para>In multi-column output, <literal>\textwidth</literal> remains the width of the
entire page body, while <literal>\columnwidth</literal> is the width of one column
(see <link linkend="_005ctwocolumn">\twocolumn</link>).
</para>
<para>In lists (see <link linkend="list">list</link>), <literal>\textwidth</literal> remains the width of the
entire page body (and <literal>\columnwidth</literal> the width of the entire
column), while <literal>\linewidth</literal> may decrease for nested lists.
</para>
<para>Inside a minipage (see <link linkend="minipage">minipage</link>) or <literal>\parbox</literal>
(see <link linkend="_005cparbox">\parbox</link>), all the width-related parameters are set to the
specified width, and revert to their normal values at the end of the
<literal>minipage</literal> or <literal>\parbox</literal>.
</para>
<indexterm role="fn"><primary>\hsize</primary></indexterm>
<indexterm role="fn"><primary>\hsize</primary></indexterm>
<para>This entry is included for completeness: <literal>\hsize</literal> is the &tex;
primitive parameter used when text is broken into lines.  It should not
be used in normal &latex; documents.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\topmargin</primary></indexterm><literal>\topmargin</literal>
</term><listitem><indexterm role="fn"><primary>topmargin</primary></indexterm>
<para>Space between the top of the &tex; page (one inch from the top of the
paper, by default) and the top of the header.  The value is computed
based on many other parameters: <literal>\paperheight &#8722; 2in &#8722;
\headheight &#8722; \headsep &#8722; \textheight &#8722; \footskip</literal>,
and then divided by two.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\topskip</primary></indexterm><literal>\topskip</literal>
</term><listitem><indexterm role="fn"><primary>\topskip</primary></indexterm>
<para>Minimum distance between the top of the page body and the baseline of
the first line of text.  For the standard classes, the default is the
same as the font size, e.g., &#8216;<literal>10pt</literal>&#8217; at a type size of 10pt.
</para>
</listitem></varlistentry></variablelist>

</sect1>
<sect1 label="5.6" id="Floats">
<title>Floats</title>

<para>Some typographic elements, such as figures and tables, cannot be broken
across pages.  They must be typeset outside of the normal flow of text,
for instance floating to the top of a later page.
</para>
<para>&latex; can have a number of different classes of floating material.
The default is the two classes, <literal>figure</literal> (see <link linkend="figure">figure</link>) and
<literal>table</literal> (see <link linkend="table">table</link>), but you can create a new class with the
package <filename>float</filename>.
</para>
<para>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
figure.  However, &latex; may mix the classes, so it can happen that
while the first table appears in the source before the first figure, it
appears in the output after it.
</para>
<para>The placement of floats is subject to parameters, given below, that
limit the number of floats that can appear at the top of a page, and
the bottom, etc. If so many floats are queued that the limits prevent
them all from fitting on a page then &latex; places what it can and
defers the rest to the next page.  In this way, floats may end up
being typeset far from their place in the source.  In particular, a
float that is big may migrate to the end of the document. In which
event, because all floats in a class must appear in sequential order,
every following float in that class also appears at the end.
</para>
<indexterm role="cp"><primary>placement of floats</primary></indexterm>
<indexterm role="cp"><primary>specifier, float placement</primary></indexterm>
<para>In addition to changing the parameters, for each float you can tweak
where the float placement algorithm tries to place it by using its
<replaceable>placement</replaceable> argument.  The possible values are a sequence of the
letters below. The default for both <literal>figure</literal> and <literal>table</literal>, in
both <literal>article</literal> and <literal>book</literal> classes, is <literal>tbp</literal>.
</para>
<variablelist><varlistentry><term><literal>t</literal>
</term><listitem><para>(Top)&#8212;at the top of a text page.
</para>
</listitem></varlistentry><varlistentry><term><literal>b</literal>
</term><listitem><para>(Bottom)&#8212;at the bottom of a text page.  (However, <literal>b</literal> is not
allowed for full-width floats (<literal>figure*</literal>) with double-column
output.  To ameliorate this, use the <filename>stfloats</filename> or
<filename>dblfloatfix</filename> package, but see the discussion at caveats in the
FAQ: <ulink url="http://www.tex.ac.uk/cgi-bin/texfaq2html?label=2colfloat">http://www.tex.ac.uk/cgi-bin/texfaq2html?label=2colfloat</ulink>.
</para>
</listitem></varlistentry><varlistentry><term><literal>h</literal>
</term><listitem><para>(Here)&#8212;at the position in the text where the <literal>figure</literal> environment
appears.  However, <literal>h</literal> is not allowed by itself; <literal>t</literal> is
automatically added.
</para>
<indexterm role="cp"><primary>here, putting floats</primary></indexterm>
<indexterm role="cp"><primary>package, <literal>float</literal></primary></indexterm>
<indexterm role="cp"><primary><literal>float</literal> package</primary></indexterm>
<para>To absolutely force a float to appear &#8220;here&#8221;, you can
<literal>\usepackage{float}</literal> and use the <literal>H</literal> specifier which it
defines.  For further discussion, see the FAQ entry at
<ulink url="http://www.tex.ac.uk/cgi-bin/texfaq2html?label=figurehere">http://www.tex.ac.uk/cgi-bin/texfaq2html?label=figurehere</ulink>.
</para>
</listitem></varlistentry><varlistentry><term><literal>p</literal>
</term><listitem><indexterm role="cp"><primary>float page</primary></indexterm>
<para>(Page of floats)&#8212;on a separate <firstterm>float page</firstterm>, which is a page
containing no text, only floats.
</para>
</listitem></varlistentry><varlistentry><term><literal>!</literal>
</term><listitem><para>Used in addition to one of the above; for this float only, &latex;
ignores the restrictions on both the number of floats that can appear
and the relative amounts of float and non-float text on the page.
The <literal>!</literal> specifier does <emphasis>not</emphasis> mean &#8220;put the float here&#8221;;
see above.
</para>
</listitem></varlistentry></variablelist>
<para>Note: the order in which letters appear in the <replaceable>placement</replaceable> argument
does not change the order in which &latex; tries to place the float;
for instance, <literal>btp</literal> has the same effect as <literal>tbp</literal>.  All that
<replaceable>placement</replaceable> does is that if a letter is not present then the
algorithm does not try that location.  Thus, &latex;&#8217;s default of
<literal>tbp</literal> is to try every location except placing the float where it
occurs in the source.
</para>
<para>To prevent &latex; from moving floats to the end of the document or a
chapter you can use a <literal>\clearpage</literal> command to start a new page and
insert all pending floats. If a pagebreak is undesirable then you can
use the <filename>afterpage</filename> package and issue
<literal>\afterpage{\clearpage}</literal>.  This will wait until the current page
is finished and then flush all outstanding floats.
</para>
<para>&latex; can typeset a float before where it appears in the source
(although on the same output page) if there is a <literal>t</literal> specifier in
the <replaceable>placement</replaceable> parameter.  If this is not desired, and deleting
the <literal>t</literal> 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 <filename>flafter</filename> package or using the command
<indexterm role="fn"><primary>\suppressfloats</primary></indexterm>
<literal>\suppressfloats[t]</literal>, which causes floats for the top position on
this page to moved to the next page.
</para>
<para>Parameters relating to fractions of pages occupied by float and
non-float text (change them with
<literal>\renewcommand{<replaceable>parameter</replaceable>}{<replaceable>decimal between 0 and 1</replaceable>}</literal>):
</para>
<variablelist><varlistentry><term><indexterm role="fn"><primary>\bottomfraction</primary></indexterm><literal>\bottomfraction</literal>
</term><listitem><indexterm role="fn"><primary>\bottomfraction</primary></indexterm>
<para>The maximum fraction of the page allowed to be occupied by floats at
the bottom; default &#8216;<literal>.3</literal>&#8217;.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\floatpagefraction</primary></indexterm><literal>\floatpagefraction</literal>
</term><listitem><indexterm role="fn"><primary>\floatpagefraction</primary></indexterm>
<para>The minimum fraction of a float page that must be occupied by floats;
default &#8216;<literal>.5</literal>&#8217;.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\textfraction</primary></indexterm><literal>\textfraction</literal>
</term><listitem><indexterm role="fn"><primary>\textfraction</primary></indexterm>
<para>Minimum fraction of a page that must be text; if floats take up too
much space to preserve this much text, floats will be moved to a
different page.  The default is &#8216;<literal>.2</literal>&#8217;.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\topfraction</primary></indexterm><literal>\topfraction</literal>
</term><listitem><indexterm role="fn"><primary>\topfraction</primary></indexterm>
<para>Maximum fraction at the top of a page that may be occupied before
floats; default &#8216;<literal>.7</literal>&#8217;.
</para></listitem></varlistentry></variablelist>
<para>Parameters relating to vertical space around floats (change them with
<literal>\setlength{<replaceable>parameter</replaceable>}{<replaceable>length expression</replaceable>}</literal>):
</para>
<variablelist><varlistentry><term><indexterm role="fn"><primary>\floatsep</primary></indexterm><literal>\floatsep</literal>
</term><listitem><indexterm role="fn"><primary>\floatsep</primary></indexterm>
<para>Space between floats at the top or bottom of a page; default
&#8216;<literal>12pt plus2pt minus2pt</literal>&#8217;.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\intextsep</primary></indexterm><literal>\intextsep</literal>
</term><listitem><indexterm role="fn"><primary>\intextsep</primary></indexterm>
<para>Space above and below a float in the middle of the main text; default
&#8216;<literal>12pt plus2pt minus2pt</literal>&#8217; for 10 point and 11 point documents,
and &#8216;<literal>14pt plus4pt minus4pt</literal>&#8217; for 12 point documents.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\textfloatsep</primary></indexterm><literal>\textfloatsep</literal>
</term><listitem><indexterm role="fn"><primary>\textfloatsep</primary></indexterm>
<para>Space between the last (first) float at the top (bottom) of a page;
default &#8216;<literal>20pt plus2pt minus4pt</literal>&#8217;.
</para></listitem></varlistentry></variablelist>
<para>Counters relating to the number of floats on a page (change them with
<literal>\setcounter{<replaceable>ctrname</replaceable>}{<replaceable>natural number</replaceable>}</literal>):
</para>
<variablelist><varlistentry><term><indexterm role="fn"><primary>bottomnumber</primary></indexterm><literal>bottomnumber</literal>
</term><listitem><indexterm role="fn"><primary>bottomnumber</primary></indexterm>
<para>Maximum number of floats that can appear at the bottom of a text page;
default 1.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>dbltopnumber</primary></indexterm><literal>dbltopnumber</literal>
</term><listitem><indexterm role="fn"><primary>dbltopnumber</primary></indexterm>
<para>Maximum number of full-sized floats that can appear at the top of a
two-column page; default 2.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>topnumber</primary></indexterm><literal>topnumber</literal>
</term><listitem><indexterm role="fn"><primary>topnumber</primary></indexterm>
<para>Maximum number of floats that can appear at the top of a text page;
default 2.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>totalnumber</primary></indexterm><literal>totalnumber</literal>
</term><listitem><indexterm role="fn"><primary>totalnumber</primary></indexterm>
<para>Maximum number of floats that can appear on a text page; default 3.
</para></listitem></varlistentry></variablelist>
<para>The principal &tex;&#160;FAQ entry relating to floats
<ulink url="http://www.tex.ac.uk/cgi-bin/texfaq2html?label=floats">http://www.tex.ac.uk/cgi-bin/texfaq2html?label=floats</ulink> contains
suggestions for relaxing &latex;&#8217;s default parameters to reduce the
problem of floats being pushed to the end.  A full explanation of the
float placement algorithm is in Frank Mittelbach&#8217;s article &#8220;How to
influence the position of float environments like figure and table in
&latex;?&#8221;
(<ulink url="http://latex-project.org/papers/tb111mitt-float.pdf">http://latex-project.org/papers/tb111mitt-float.pdf</ulink>).
</para>

</sect1>
</chapter>
<chapter label="6" id="Sectioning">
<title>Sectioning</title>

<indexterm role="cp"><primary>sectioning commands</primary></indexterm>

<para>Sectioning commands provide the means to structure your text into units:
</para>
<variablelist><varlistentry><term><indexterm role="fn"><primary>\part</primary></indexterm><literal>\part</literal>
</term></varlistentry><varlistentry><term><indexterm role="fn"><primary>\chapter</primary></indexterm><literal>\chapter</literal>
</term><listitem><para>(<literal>report</literal> and <literal>book</literal> class only)
</para></listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\section</primary></indexterm><literal>\section</literal>
</term></varlistentry><varlistentry><term><indexterm role="fn"><primary>\subsection</primary></indexterm><literal>\subsection</literal>
</term></varlistentry><varlistentry><term><indexterm role="fn"><primary>\subsubsection</primary></indexterm><literal>\subsubsection</literal>
</term></varlistentry><varlistentry><term><indexterm role="fn"><primary>\paragraph</primary></indexterm><literal>\paragraph</literal>
</term></varlistentry><varlistentry><term><indexterm role="fn"><primary>\subparagraph</primary></indexterm><literal>\subparagraph</literal>
</term></varlistentry></variablelist>
<para>All sectioning commands take the same general form, e.g.,
</para>
<screen>\chapter[<replaceable>toctitle</replaceable>]{<replaceable>title</replaceable>}
</screen>
<para>In addition to providing the heading <replaceable>title</replaceable> in the main text, the
section title can appear in two other places:
</para>
<orderedlist numeration="arabic"><listitem><para>The table of contents.
</para></listitem><listitem><para>The running head at the top of the page.
</para></listitem></orderedlist>
<para>You may not want the same text in these places as in the main text.
To handle this, the sectioning commands have an optional argument
<replaceable>toctitle</replaceable> that, when given, specifies the text for these other
places.
</para>
<indexterm role="cp"><primary><literal>*</literal>-form of sectioning commands</primary></indexterm>
<para>Also, all sectioning commands have <literal>*</literal>-forms that print
<replaceable>title</replaceable> as usual, but do not include a number and do not make an
entry in the table of contents.  For instance:
</para>
<screen>\section*{Preamble}
</screen>
<indexterm role="fn"><primary>\appendix</primary></indexterm>
<indexterm role="cp"><primary>appendix, creating</primary></indexterm>
<para>The <literal>\appendix</literal> command changes the way following sectional units
are numbered.  The <literal>\appendix</literal> command itself generates no text
and does not affect the numbering of parts.  The normal use of this
command is something like
</para>
<screen>\chapter{A Chapter}
&#8230;
\appendix
\chapter{The First Appendix}
</screen>
<indexterm role="fn"><primary>secnumdepth counter</primary></indexterm>
<indexterm role="cp"><primary>section numbers, printing</primary></indexterm>
<para>The <literal>secnumdepth</literal> counter controls printing of section numbers.
The setting
</para>
<screen>\setcounter{secnumdepth}{<replaceable>level</replaceable>}
</screen>
<para>suppresses heading numbers at any depth <inlineequation><mathphrase>&gt; <replaceable>level</replaceable></mathphrase></inlineequation>, where
<literal>chapter</literal> is level zero.  (See <link linkend="_005csetcounter">\setcounter</link>.)
</para>

</chapter>
<chapter label="7" id="Cross-references">
<title>Cross references</title>

<indexterm role="cp"><primary>cross references</primary></indexterm>

<para>One reason for numbering things such as figures and equations is to
refer the reader to them, as in &#8220;See Figure~3 for more details.&#8221;
</para>
<indexterm role="cp"><primary>label</primary></indexterm>
<para>Including the figure number in the source is poor practice since if that
number changes as the document evolves then you must remember to update
this reference by hand.  Instead, &latex; has you write a <firstterm>label</firstterm>
like <literal>\label{eq:GreensThm}</literal> and refer to it with <literal>See
equation~\ref{eq:GreensThm}</literal>.
</para>
<para>&latex; writes the information from the labels to a file with the same
name as the file containing the <literal>\label{...}</literal> but with an
<filename>.aux</filename> extension.  (The information has the format
<literal>\newlabel{<replaceable>label</replaceable>}{{<replaceable>currentlabel</replaceable>}{<replaceable>pagenumber</replaceable>}}</literal>
where <replaceable>currentlabel</replaceable> is the current value of the macro
<literal>\@currentlabel</literal> that is usually updated whenever you call
<literal>\refstepcounter{<replaceable>counter</replaceable>}</literal>.)
</para>
<indexterm role="cp"><primary>forward reference</primary></indexterm>
<indexterm role="cp"><primary>reference, forward</primary></indexterm>
<para>The most common side effect of the prior paragraph happens when your
document has a <firstterm>forward reference</firstterm>, a <literal>\ref{<replaceable>key</replaceable>}</literal> that
appears earlier than the associated <literal>\label{<replaceable>key</replaceable>}</literal>; see the
example in the <literal>\pageref{...}</literal> description.  &latex; gets the
information for references from the <filename>.aux</filename> file.  If this is the
first time you are compiling the document then you will get a message
<literal>LaTeX Warning: Label(s) may have changed. Rerun to get
cross references right.</literal> and in the output the reference will appear as
two question marks&#160;&#8216;<literal>??</literal>&#8217;, in boldface.  Or, if you change some
things so the references change then you get the same warning and the
output contains the old reference information.  The solution in either
case is just to compile the document a second time.
</para>


<sect1 label="7.1" id="_005clabel">
<title><literal>\label</literal></title>

<indexterm role="fn"><primary>\label</primary></indexterm>

<para>Synopsis:
</para>
<screen>\label{<replaceable>key</replaceable>}
</screen>
<para>Assign a reference number to <replaceable>key</replaceable>.  In ordinary text
<literal>\label{<replaceable>key</replaceable>}</literal> assigns to <replaceable>key</replaceable> the number of the
current sectional unit. Inside an environment with numbering, such as a
<literal>table</literal> or <literal>theorem</literal> environment, <literal>\label{<replaceable>key</replaceable>}</literal>
assigns to <replaceable>key</replaceable> the number of that environment.  Retrieve the
assigned number with the <literal>\ref{<replaceable>key</replaceable>}</literal> command
(see <link linkend="_005cref">\ref</link>).
</para>
<para>A key name can consist of any sequence of letters, digits, or common
punctuation characters.  Upper and lowercase letters are
distinguished, as usual.
</para>
<para>A common convention is to use labels consisting of a prefix and a suffix
separated by a colon or period.  This helps to avoid accidentally
creating two labels with the same name, and makes your source more
readable.  Some commonly-used prefixes:
</para>
<variablelist><varlistentry><term><literal>ch</literal>
</term><listitem><para>for chapters
</para></listitem></varlistentry><varlistentry><term><literal>sec</literal>
</term><listitem><para>for lower-level sectioning commands
</para></listitem></varlistentry><varlistentry><term><literal>fig</literal>
</term><listitem><para>for figures
</para></listitem></varlistentry><varlistentry><term><literal>tab</literal>
</term><listitem><para>for tables
</para></listitem></varlistentry><varlistentry><term><literal>eq</literal>
</term><listitem><para>for equations
</para></listitem></varlistentry></variablelist>
<para>Thus, <literal>\label{fig:Euler}</literal> is a label for a figure with a portrait
of the great man.
</para>
<para>In this example below the key <literal>sec:test</literal> will get the number of the
current section and the key <literal>fig:test</literal> will get the number of the
figure.  (Incidentally, put labels after captions in figures and
tables.)
</para>
<screen>\section{section name}
\label{sec:test}
This is Section~\ref{sec:test}.
\begin{figure}
  ...
  \caption{caption text}
  \label{fig:test}
\end{figure}
See Figure~\ref{fig:test}.
</screen>

</sect1>
<sect1 label="7.2" id="_005cpageref">
<title><literal>\pageref{<replaceable>key</replaceable>}</literal></title>

<indexterm role="fn"><primary>\pageref</primary></indexterm>
<indexterm role="cp"><primary>cross referencing with page number</primary></indexterm>
<indexterm role="cp"><primary>page number, cross referencing</primary></indexterm>

<para>Synopsis:
</para>
<screen>\pageref{<replaceable>key</replaceable>}
</screen>
<para>Produce the page number of the place in the text where the corresponding
<literal>\label</literal>{<replaceable>key</replaceable>} command appears.
</para>
<para>In this example the <literal>\label{eq:main}</literal> is used both for the
formula number and for the page number.  (Note that the two references
are forward references, so this document would need to be compiled twice
to resolve those.)
</para>
<screen>The main result is formula~\ref{eq:main} on page~\pageref{eq:main}.
  ...
\begin{equation} \label{eq:main}
   \mathbf{P}=\mathbf{NP}
\end{equation}
</screen>

</sect1>
<sect1 label="7.3" id="_005cref">
<title><literal>\ref{<replaceable>key</replaceable>}</literal></title>

<indexterm role="fn"><primary>\ref</primary></indexterm>
<indexterm role="cp"><primary>cross referencing, symbolic</primary></indexterm>
<indexterm role="cp"><primary>section number, cross referencing</primary></indexterm>
<indexterm role="cp"><primary>equation number, cross referencing</primary></indexterm>
<indexterm role="cp"><primary>figure number, cross referencing</primary></indexterm>
<indexterm role="cp"><primary>footnote number, cross referencing</primary></indexterm>

<para>Synopsis:
</para>
<screen>\ref{<replaceable>key</replaceable>}
</screen>
<para>Produces the number of the sectional unit,
equation, footnote, figure, &#8230;, of the corresponding
<literal>\label</literal> command (see <link linkend="_005clabel">\label</link>).  It does not produce any text,
such as the word &#8216;Section&#8217; or &#8216;Figure&#8217;, just the bare number itself.
</para>
<para>In this example, the <literal>\ref{popular}</literal> produces &#8216;<literal>2</literal>&#8217;.  Note
that it is a forward reference since it comes before
<literal>\label{popular}</literal>.
</para>
<screen>The most widely-used format is item number~\ref{popular}.
\begin{enumerate}
\item Plain \TeX
\item \label{popular} \LaTeX
\item Con\TeX t
\end{enumerate}
</screen>

</sect1>
</chapter>
<chapter label="8" id="Environments">
<title>Environments</title>

<indexterm role="cp"><primary>environments</primary></indexterm>
<indexterm role="fn"><primary>\begin</primary></indexterm>
<indexterm role="fn"><primary>\end</primary></indexterm>

<para>&latex; provides many environments for delimiting certain behavior.
An environment begins with <literal>\begin</literal> and ends with <literal>\end</literal>,
like this:
</para>
<screen>\begin{<replaceable>environment-name</replaceable>}
  ...
\end{<replaceable>environment-name</replaceable>}
</screen>
<para>The <replaceable>environment-name</replaceable> at the beginning must exactly match that at
the end. For instance, the input
<literal>\begin{table*}...\end{table}</literal> will cause an error like:
&#8216;<literal>! LaTeX Error: \begin{table*} on input line 5 ended by
\end{table}.</literal>&#8217;
</para>
<indexterm role="cp"><primary>group, and environments</primary></indexterm>
<para>Environments are executed within a group.
</para>


<sect1 label="8.1" id="abstract">
<title><literal>abstract</literal></title>

<indexterm role="fn"><primary>environment, <literal>abstract</literal></primary></indexterm>
<indexterm role="fn"><primary><literal>abstract</literal> environment</primary></indexterm>
<indexterm role="cp"><primary>abstracts</primary></indexterm>

<para>Synopsis:
</para>
<screen>\begin{abstract}
...
\end{abstract}
</screen>
<para>Produce an abstract, possibly of multiple paragraphs.  This environment
is only defined in the <literal>article</literal> and <literal>report</literal> document classes
(see <link linkend="Document-classes">Document classes</link>).
</para>
<para>Using the example below in the <literal>article</literal> class produces a displayed
paragraph.  Document class option <literal>titlepage</literal> causes the abstract
to be on a separate page (see <link linkend="Document-class-options">Document class options</link>); this is the
default only in the <literal>report</literal> class.
</para>
<screen>\begin{abstract}
  We compare all known accounts of the proposal made by Porter Alexander 
  to Robert E Lee at the Appomattox Court House that the army continue
  in a guerrilla war, which Lee refused.
\end{abstract}
</screen>
<para>The next example produces a one column abstract in a two column document (for
a more flexible solution, use the package <filename>abstract</filename>).
</para>
<!-- Adopted from http://www.tex.ac.uk/FAQ-onecolabs.html -->
<screen>\documentclass[twocolumn]{article}
  ...
\begin{document}
\title{Babe Ruth as Cultural Progenitor: a Atavistic Approach}
\author{Smith \\ Jones \\ Robinson\thanks{Railroad tracking grant.}}
\twocolumn[
  \begin{@twocolumnfalse}
     \maketitle
     \begin{abstract}
       Ruth was not just the Sultan of Swat, he was the entire swat
       team.   
     \end{abstract}
   \end{@twocolumnfalse}
   ]
{   % by-hand insert a footnote at page bottom
 \renewcommand{\thefootnote}{\fnsymbol{footnote}}
 \footnotetext[1]{Thanks for all the fish.}
}
</screen>

</sect1>
<sect1 label="8.2" id="array">
<title><literal>array</literal></title>

<indexterm role="fn"><primary>environment, <literal>array</literal></primary></indexterm>
<indexterm role="fn"><primary><literal>array</literal> environment</primary></indexterm>
<indexterm role="cp"><primary>arrays, math</primary></indexterm>

<para>Synopsis:
</para>
<screen>\begin{array}{<replaceable>cols</replaceable>}
  <replaceable>column 1 entry</replaceable> &amp;<replaceable>column 2 entry</replaceable> ... &amp;<replaceable>column n entry</replaceable> \\
  ...
\end{array}
</screen>
<para>or
</para>
<screen>\begin{array}[<replaceable>pos</replaceable>]{<replaceable>cols</replaceable>}
  <replaceable>column 1 entry</replaceable> &amp;<replaceable>column 2 entry</replaceable> ... &amp;<replaceable>column n entry</replaceable> \\
  ...
\end{array}
</screen>
<para>Produce a mathematical array.  This environment can only be used in math
mode, and normally appears within a displayed mathematics environment
such as <literal>equation</literal> (see <link linkend="equation">equation</link>).  Column entries are
separated by an ampersand&#160;(<literal>&amp;</literal>).  Rows are terminated with
double-backslashes (see <link linkend="_005c_005c">\\</link>).  
</para>
<para>The required argument <replaceable>cols</replaceable> describes the number of columns, their
alignment, and the formatting of the intercolumn regions.  See
<link linkend="tabular">tabular</link> for the complete description of <replaceable>cols</replaceable>, and of the
other common features of the two environments, including the optional
<replaceable>pos</replaceable> argument.
</para>
<para>There are two ways that <literal>array</literal> diverges from <literal>tabular</literal>.  The
first is that <literal>array</literal> entries are typeset in math mode, in
textstyle (except if the <replaceable>cols</replaceable> definition specifies the column with
<literal>p{...}</literal>, which causes the entry to be typeset in text mode).
The second is that, instead of <literal>tabular</literal>&#8217;s parameter
<literal>\tabcolsep</literal>, &latex;&#8217;s intercolumn space in an <literal>array</literal> is governed
by
<indexterm role="fn"><primary>\arraycolsep</primary></indexterm>
<literal>\arraycolsep</literal>, which gives half the width between columns. The
default for this is &#8216;<literal>5pt</literal>&#8217;.
</para>
<para>To obtain arrays with braces the standard is to use the <filename>amsmath</filename>
package.  It comes with environments <literal>pmatrix</literal> for an array
surrounded by parentheses&#160;<literal>(...)</literal>, <literal>bmatrix</literal> for an array
surrounded by square brackets&#160;<literal>[...]</literal>, <literal>Bmatrix</literal> for an
array surrounded by curly braces&#160;<literal>{...}</literal>, <literal>vmatrix</literal> for
an array surrounded by vertical bars&#160;<literal>|...|</literal>, and
<literal>Vmatrix</literal> for an array surrounded by double vertical
bars&#160;<literal>||...||</literal>, along with a number of other array constructs.
</para>
<para>Here is an example of an array:
</para>
<screen>\begin{equation}
  \begin{array}{cr}
    \sqrt{y}  &amp;12.3 \\
    x^2       &amp;3.4       
  \end{array}
\end{equation}
</screen>
<para>The next example works if <literal>\usepackage{amsmath}</literal> is in the
preamble:
</para>
<screen>\begin{equation}
  \begin{vmatrix}{cc}
    a  &amp;b \\
    c  &amp;d       
  \end{vmatrix}=ad-bc
\end{equation}
</screen>

</sect1>
<sect1 label="8.3" id="center">
<title><literal>center</literal></title>

<indexterm role="fn"><primary>environment, <literal>center</literal></primary></indexterm>
<indexterm role="fn"><primary><literal>center</literal> environment</primary></indexterm>
<indexterm role="cp"><primary>centering text, environment for</primary></indexterm>

<para>Synopsis:
</para>
<screen>\begin{center}
  ... text ...
\end{center}
</screen>
<para>Create a new paragraph consisting of a sequence of lines that are
centered within the left and right margins on the current page.  Use
double-backslash to get a line break at a particular spot (see <link linkend="_005c_005c">\\</link>).
<indexterm role="fn"><primary>\\ (for <literal>center</literal>)</primary></indexterm>
If some text environment body is too long to fit on a line, &latex;
will insert line breaks that avoid hyphenation and avoid stretching or
shrinking any interword space.
</para>
<para>This environment inserts space above and below the text body.  See
<link linkend="_005ccentering">\centering</link> to avoid such space, for example inside a <literal>figure</literal>
environment.
</para>
<para>This example produces three centered lines.  There is extra vertical
space between the last two lines.
</para>
<screen>\begin{center}
  A Thesis Submitted in Partial Fufillment \\
  of the Requirements of \\[0.5ex]
  the School of Environmental Engineering
\end{center}
</screen>
<para>In this example, depending on the page&#8217;s line width, &latex; may choose
a line break for the part before the double backslash.  If so, it will
center each of the two lines and if not it will center the single line.
Then &latex; will break at the double backslash, and will center the
ending.
</para>
<screen>\begin{center}
  My father considered that anyone who went to chapel and didn't drink 
  alcohol was not to be tolerated.\\ 
  I grew up in that belief.  --Richard Burton 
\end{center}
</screen>
<para>A double backslash after the final line is optional.
</para>


<sect2 label="8.3.1" id="_005ccentering">
<title><literal>\centering</literal></title>

<indexterm role="fn"><primary>\centering</primary></indexterm>
<indexterm role="cp"><primary>centering text, declaration for</primary></indexterm>

<para>A declaration that causes material in its scope to be centered.  It is
most often used inside an environment such as <literal>figure</literal>, or in a
<literal>parbox</literal>.
</para>
<para>Unlike the <literal>center</literal> environment, the <literal>\centering</literal> command does
not add vertical space above and below the text.
</para>
<para>It also does not start a new paragraph; it simply changes how &latex;
formats paragraph units.  If <literal>ww {\centering xx \\ yy} zz</literal> is
surrounded by blank lines then &latex; will create a paragraph whose
first line &#8216;<literal>ww xx</literal>&#8217; is centered and whose second line, not centered,
contains &#8216;<literal>yy zz</literal>&#8217;.  Usually what is desired is for the scope of the
declaration to contain a blank line or the <literal>\end</literal> command of an
environment such as <literal>figure</literal> or <literal>table</literal> that ends the
paragraph unit.  Thus, if <literal>{\centering xx \\ yy\par} zz</literal> is
surrounded by blank lines then it makes a new paragraph with two
centered lines &#8216;<literal>xx</literal>&#8217; and &#8216;<literal>yy</literal>&#8217;, followed by a new paragraph with
&#8216;<literal>zz</literal>&#8217; that is formatted as usual.  See also the following example.
</para>
<para>This example&#8217;s <literal>\centering</literal> causes the graphic to be horizontally
centered.  
</para>
<screen>\begin{figure}
  \centering
  \includegraphics[width=0.6\textwidth]{ctan_lion.png}
  \caption{CTAN Lion}  \label{fig:CTANLion}
\end{figure}
</screen>
<para>The scope of the <literal>\centering</literal> ends with the <literal>\end{figure}</literal>.
</para>

</sect2>
</sect1>
<sect1 label="8.4" id="description">
<title><literal>description</literal></title>

<indexterm role="fn"><primary>environment, <literal>description</literal></primary></indexterm>
<indexterm role="fn"><primary><literal>description</literal> environment</primary></indexterm>
<indexterm role="cp"><primary>labelled lists, creating</primary></indexterm>
<indexterm role="cp"><primary>description lists, creating</primary></indexterm>

<para>Synopsis:
</para>
<screen>\begin{description}
\item [<replaceable>first label</replaceable>] text of first item
\item [<replaceable>second label</replaceable>] text of second item
  ...
\end{description}
</screen>
<para>Environment to make a labelled list of items.  Each item&#8217;s <replaceable>label</replaceable>
is typeset in bold, flush-left.  Each item&#8217;s text may contain multiple
paragraphs.  Although the labels on the items are optional there is no
sensible default, so all items should have labels.
</para>
<indexterm role="fn"><primary>\item</primary></indexterm>
<para>The list consists of at least one item, created with the <literal>\item</literal>
command (see <link linkend="_005citem">\item</link>).  Having no items causes the &latex; error
&#8216;<literal>Something's wrong--perhaps a missing \item</literal>&#8217;).
</para>
<indexterm role="cp"><primary>bold typewriter, avoiding</primary></indexterm>
<indexterm role="cp"><primary>typewriter labels in lists</primary></indexterm>
<para>Since the labels are in bold style, if the label text calls for a font
change given in argument style (see <link linkend="Font-styles">Font styles</link>) then it will
come out bold.  For instance, if the label text calls for typewriter
with <literal>\item[\texttt{label text}]</literal> then it will appear in bold
typewriter, if that is available. The simplest way to get non-bold
typewriter is to use declarative style: <literal>\item[{\tt label
text}]</literal>.  Similarly, to get the standard roman font, use
<literal>\item[{\rm label text}]</literal>.
</para>
<para>For other major &latex; labelled list environments, see <link linkend="itemize">itemize</link>
and <link linkend="enumerate">enumerate</link>.  For information about customizing list layout, see
<link linkend="list">list</link>; also, the package <filename>enumitem</filename> is useful for this.
</para>
<para>This example shows the environment used for a sequence of definitions.
</para>
<screen>\begin{definition}
  \item[lama] A priest.
  \item[llama] A beast.
\end{definition}
</screen>

</sect1>
<sect1 label="8.5" id="displaymath">
<title><literal>displaymath</literal></title>
<!-- http://tex.stackexchange.com/questions/40492/what-are-the-differences-between-align-equation-and-displaymath -->

<indexterm role="fn"><primary>environment, <literal>displaymath</literal></primary></indexterm>
<indexterm role="fn"><primary><literal>displaymath</literal> environment</primary></indexterm>

<para>Synopsis:
</para>
<screen>\begin{displaymath}
  ... math text ...
\end{displaymath}
</screen>
<para>Environment to typeset the math text on its own line, in display style
and centered.  To make the text be flush-left use the global option
<literal>fleqn</literal>; see <link linkend="Document-class-options">Document class options</link>.
</para>
<para>&latex; will not break the math text across lines.
</para>
<para>In the <literal>displaymath</literal> environment no equation number is added to the
math text. One way to get an equation number is to use the
<literal>equation</literal> environment (see <link linkend="equation">equation</link>).
</para>
<para>Note that the <filename>amsmath</filename> package has extensive displayed equation
facilities.  Those facilities are the best approach for such output in
new documents.  For example, there are a number of options in that
package for having math text broken across lines.
</para>
<para>The construct <literal>\[..math text..\]</literal> is essentially a synonym for
<literal>\begin{displaymath}..math text..\end{displaymath}</literal> but the
latter is easier to work with in the source file; for instance,
searching for a square bracket may get false positives but the word
<literal>displaymath</literal> will likely be unique.  (The construct <literal>$$..math
text..$$</literal> from Plain&#160;&tex; is sometimes mistakenly used as a
synonym for <literal>displaymath</literal>.  It is not a synonym, because the
<literal>displaymath</literal> environment checks that it isn&#8217;t started in math mode
and that it ends in math mode begun by the matching environment start,
because the <literal>displaymath</literal> environment has different vertical
spacing, and because the <literal>displaymath</literal> environment honors the
<literal>fleqn</literal> option.)
</para>
<para>The output from this example is centered and alone on its line. 
</para><screen>\begin{displaymath}
  \int_1^2 x^2\,dx=7/3
\end{displaymath}
</screen><para>Also, the integral sign is larger than the inline version  
<literal>\( \int_1^2 x^2\,dx=7/3 \)</literal> produces.
</para>

</sect1>
<sect1 label="8.6" id="document">
<title><literal>document</literal></title>

<indexterm role="fn"><primary>environment, <literal>document</literal></primary></indexterm>
<indexterm role="fn"><primary><literal>document</literal> environment</primary></indexterm>

<para>The <literal>document</literal> environment encloses the entire body of a document.
It is required in every &latex; document.  See <link linkend="Starting-and-ending">Starting and ending</link>.
</para>


<anchor id="_005cAtBeginDocument"/>

<indexterm role="fn"><primary>\AtBeginDocument</primary></indexterm>
<indexterm role="cp"><primary>beginning of document hook</primary></indexterm>

<para>Synopsis:
</para>
<screen>\AtBeginDocument{<replaceable>code</replaceable>}
</screen>
<para>Save <replaceable>code</replaceable> and execute it when <literal>\begin{document}</literal> is
executed, at the very end of the preamble.  The code is executed after
the font selection tables have been set up, so the normal font for the
document is the current font.  However, the code is executed as part of
the preamble so you cannot do any typesetting with it.
</para>
<para>You can issue this command more than once; the successive code lines
will be executed in the order that you gave them.
</para>

<anchor id="_005cAtEndDocument"/>

<indexterm role="fn"><primary>\AtEndDocument</primary></indexterm>
<indexterm role="cp"><primary>end of document hook</primary></indexterm>

<para>Synopsis:
</para>
<screen>\AtEndDocument{<replaceable>code</replaceable>}
</screen>
<para>Save <replaceable>code</replaceable> and execute it near the end of the document.
Specifically, it is executed when <literal>\end{document}</literal> is executed,
before the final page is finished and before any leftover floating
environments are processed. If you want some of the code to be executed
after these two processes then include a <literal>\clearpage</literal> at the
appropriate point in <replaceable>code</replaceable>.
</para>
<para>You can issue this command more than once; the successive code lines
will be executed in the order that you gave them.
</para>

</sect1>
<sect1 label="8.7" id="enumerate">
<title><literal>enumerate</literal></title>

<indexterm role="fn"><primary>environment, <literal>enumerate</literal></primary></indexterm>
<indexterm role="fn"><primary><literal>enumerate</literal> environment</primary></indexterm>
<indexterm role="cp"><primary>lists of items, numbered</primary></indexterm>

<para>Synopsis:
</para>
<screen>\begin{enumerate}
\item [<replaceable>first label</replaceable>] text of first item
\item [<replaceable>second label</replaceable>] text of second item
...
\end{enumerate}
</screen>
<para>Environment to produce a numbered list of items.  The format of the
label numbering depends on whether this environment is nested within
another; see below.
</para>
<indexterm role="fn"><primary>\item</primary></indexterm>
<para>The list consists of at least one item.  Having no items causes the
&latex; error &#8216;<literal>Something's wrong--perhaps a missing \item</literal>&#8217;.  Each
item is produced with an <literal>\item</literal> command.
</para>
<para>This example lists the top two finishers in the 1908 Olympic marathon.
</para>
<screen>\begin{enumerate}
 \item Johnny Hayes (USA)
 \item Charles Hefferon (RSA) 
\end{enumerate}
</screen>
<para>Enumerations may be nested within a paragraph-making environment,
including <literal>itemize</literal> (see <link linkend="itemize">itemize</link>), <literal>description</literal>
(see <link linkend="description">description</link>) and <literal>enumeration</literal>, up to four levels deep.
The format of the label produced depends on the place in the nesting.
This gives &latex;&#8217;s default for the format at each nesting level
(where 1 is the outermost level):
</para>
<orderedlist numeration="arabic"><listitem><para>arabic number followed by a period: &#8216;<literal>1.</literal>&#8217;, &#8216;<literal>2.</literal>&#8217;,&#160;&#8230;
</para></listitem><listitem><para>lower case letter inside parentheses: &#8216;<literal>(a)</literal>&#8217;, &#8216;<literal>(b)</literal>&#8217;&#160;&#8230;
</para></listitem><listitem><para>lower case roman numeral followed by a period: &#8216;<literal>i.</literal>&#8217;, &#8216;<literal>ii.</literal>&#8217;,&#160;&#8230;
</para></listitem><listitem><para>upper case letter followed by a period: &#8216;<literal>A.</literal>&#8217;, &#8216;<literal>B.</literal>&#8217;,&#160;&#8230;
</para></listitem></orderedlist>
<indexterm role="fn"><primary>\enumi</primary></indexterm>
<indexterm role="fn"><primary>\enumii</primary></indexterm>
<indexterm role="fn"><primary>\enumiii</primary></indexterm>
<indexterm role="fn"><primary>\enumiv</primary></indexterm>
<para>The <literal>enumerate</literal> environment uses the counters <literal>\enumi</literal> through
<literal>\enumiv</literal> counters (see <link linkend="Counters">Counters</link>).  If you use the optional
argument to <literal>\item</literal> then the counter is not incremented for that
item (see <link linkend="_005citem">\item</link>).
</para>
<indexterm role="fn"><primary>\labelenumi</primary></indexterm>
<indexterm role="fn"><primary>\labelenumii</primary></indexterm>
<indexterm role="fn"><primary>\labelenumiii</primary></indexterm>
<indexterm role="fn"><primary>\labelenumiv</primary></indexterm>
<para>To change the format of the label use <literal>\renewcommand</literal>
(see <link linkend="_005cnewcommand-_0026-_005crenewcommand">\newcommand &amp; \renewcommand</link>) on the commands <literal>\labelenumi</literal>
through <literal>\labelenumiv</literal>. For instance, this first level list will be
labelled with uppercase letters, in boldface, and without a trailing
period:
</para>
<indexterm role="fn"><primary>\Alph example</primary></indexterm>
<screen>\renewcommand{\labelenumi}{\textbf{\Alph{enumi}}}
\begin{enumerate}
  \item eI
  \item bi:
  \item si:
\end{enumerate}
</screen>
<para>For a list of counter-labelling commands like <literal>\Alph</literal> see
<link linkend="_005calph-_005cAlph-_005carabic-_005croman-_005cRoman-_005cfnsymbol">\alph \Alph \arabic \roman \Roman \fnsymbol</link>.
</para>
<para>For more on customizing the layout see <link linkend="list">list</link>.  Also, the package
<filename>enumitem</filename> is useful for this.
</para>


</sect1>
<sect1 label="8.8" id="eqnarray">
<title><literal>eqnarray</literal></title>

<indexterm role="fn"><primary>environment, <literal>eqnarray</literal></primary></indexterm>
<indexterm role="fn"><primary><literal>eqnarray</literal> environment</primary></indexterm>
<indexterm role="cp"><primary>equations, aligning</primary></indexterm>
<indexterm role="cp"><primary>aligning equations</primary></indexterm>

<indexterm role="cp"><primary>align environment, from <literal>amsmath</literal></primary></indexterm>
<indexterm role="cp"><primary>amsmath package, replacing <literal>eqnarray</literal></primary></indexterm>
<indexterm role="cp"><primary>Madsen, Lars</primary></indexterm>
<para>First, a caveat: the <literal>eqnarray</literal> environment is depreciated.  It has
infelicities that cannot be overcome, including spacing that is
inconsistent with other mathematics elements (see the article &#8220;Avoid
eqnarray!&#8221; by Lars Madsen
<ulink url="http://tug.org/TUGboat/tb33-1/tb103madsen.pdf">http://tug.org/TUGboat/tb33-1/tb103madsen.pdf</ulink>).  New documents
should include the <filename>amsmath</filename> package and use the displayed
mathematics environments provided there, such as the <literal>align</literal>
environment.
</para>
<para>Nevertheless, for completeness and for a reference when working with old
documents, a synopsis:
</para>
<screen>\begin{eqnarray} 
  <replaceable>first formula left</replaceable>  &amp;<replaceable>first formula middle</replaceable>  &amp;<replaceable>first formula right</replaceable> \\
  ...
\end{eqnarray}
</screen>
<para>or 
</para>
<screen>\begin{eqnarray*} 
  <replaceable>first formula left</replaceable>  &amp;<replaceable>first formula middle</replaceable>  &amp;<replaceable>first formula right</replaceable> \\
  ...
\end{eqnarray*}
</screen>
<indexterm role="fn"><primary>\\ (for <literal>eqnarray</literal>)</primary></indexterm>
<para>Display a sequence of equations or inequalities.  The left and right
sides are typeset in display mode, while the middle is typeset in text
mode.
</para>
<para>It is similar to a three-column <literal>array</literal> environment, with items
within a row separated by an ampersand&#160;(<literal>&amp;</literal>), and with rows
separated by double backslash&#160; <literal>\\</literal>).
<indexterm role="fn"><primary>\\* (for <literal>eqnarray</literal>)</primary></indexterm>
The starred form of line break (<literal>\\*</literal>) can also be used to separate
equations, and will disallow a page break there (see <link linkend="_005c_005c">\\</link>).
</para>
<indexterm role="fn"><primary>\nonumber</primary></indexterm>
<indexterm role="cp"><primary>equation numbers, omitting</primary></indexterm>
<para>The unstarred form <literal>eqnarray</literal> places an equation number on every
line (using the <literal>equation</literal> counter), unless that line contains a
<literal>\nonumber</literal> command.  The starred form <literal>eqnarray*</literal> omits
equation numbering, while otherwise being the same.
</para>
<indexterm role="fn"><primary>\lefteqn</primary></indexterm>
<para>The command <literal>\lefteqn</literal> is used for splitting long formulas across
lines. It typesets its argument in display style flush left in a box of
zero width.
</para>
<para>This example shows three lines.  The first two lines make an inequality,
while the third line has not entry on the left side.
</para>
<screen>\begin{eqnarray*}
  \lefteqn{x_1+x_2+\cdots+x_n}     \\
    &amp;\leq &amp;y_1+y_2+\cdots+y_n      \\
    &amp;=    &amp;z+y_3+\cdots+y_n
\end{eqnarray*}
</screen>

</sect1>
<sect1 label="8.9" id="equation">
<title><literal>equation</literal></title>

<indexterm role="fn"><primary>environment, <literal>equation</literal></primary></indexterm>
<indexterm role="fn"><primary><literal>equation</literal> environment</primary></indexterm>
<indexterm role="cp"><primary>equations, environment for</primary></indexterm>
<indexterm role="cp"><primary>formulas, environment for</primary></indexterm>

<para>Synopsis:
</para>
<screen>\begin{equation}
  math text
\end{equation}
</screen>
<para>Make a <literal>displaymath</literal> environment (see <link linkend="displaymath">displaymath</link>) with an
equation number in the right margin.
</para>
<para>The equation number is generated using the <literal>equation</literal> counter.
</para>
<para>Note that the <filename>amsmath</filename> package has extensive displayed equation
facilities.  Those facilities are the best approach for such output in
new documents.
</para>

</sect1>
<sect1 label="8.10" id="figure">
<title><literal>figure</literal></title>

<indexterm role="fn"><primary>environment, <literal>figure</literal></primary></indexterm>
<indexterm role="fn"><primary><literal>figure</literal> environment</primary></indexterm>
<indexterm role="cp"><primary>inserting figures</primary></indexterm>
<indexterm role="cp"><primary>figures, inserting</primary></indexterm>

<para>Synopsis:
</para>
<screen>\begin{figure}[<replaceable>placement</replaceable>]
  figure body
\caption[<replaceable>loftitle</replaceable>]{<replaceable>title</replaceable>}
\label{<replaceable>label}</replaceable>
\end{figure}
</screen>
<para>or
</para>
<screen>\begin{figure*}[<replaceable>placement</replaceable>]
  figure body
\caption[<replaceable>loftitle</replaceable>]{<replaceable>title</replaceable>}
\label{<replaceable>label}</replaceable>
\end{figure*}
</screen>
<para>A class of floats (see <link linkend="Floats">Floats</link>).  Because they cannot be split across
pages, they are not typeset in sequence with the normal text but instead
are &#8220;floated&#8221; to a convenient place, such as the top of a following
page.
</para>
<para>For the possible values of <replaceable>placement</replaceable> and their effect on the 
float placement algorithm, see <link linkend="Floats">Floats</link>.
</para>
<para>The starred form <literal>figure*</literal> is used when a document is in
double-column mode (see <link linkend="_005ctwocolumn">\twocolumn</link>).  It produces a figure that
spans both columns, at the top of the page.  To add the possibility of
placing at a page bottom see the discussion of <replaceable>placement</replaceable> <literal>b</literal>
in <link linkend="Floats">Floats</link>.
</para>
<para>The figure body is typeset in a <literal>parbox</literal> of width <literal>\textwidth</literal>
and so it can contain text, commands, etc.
</para>
<para>The label is optional; it is used for cross references (see <link linkend="Cross-references">Cross
references</link>).
<indexterm role="fn"><primary>\caption</primary></indexterm>
The optional <literal>\caption</literal> command specifies caption text for the
figure.  By default it is numbered.  If <replaceable>loftitle</replaceable> is present, it is
used in the list of figures instead of <replaceable>title</replaceable> (see <link linkend="Tables-of-contents">Tables of
contents</link>).
</para>
<para>This example makes a figure out of a graphic.  It requires one of the
packages <filename>graphics</filename> or <filename>graphicx</filename>.  The graphic, with its
caption, will be placed at the top of a page or, if it is pushed to the
end of the document, on a page of floats.
</para>
<screen>\begin{figure}[t]
  \centering
  \includegraphics[width=0.5\textwidth]{CTANlion.png}
  \caption{The CTAN lion, by Duane Bibby}
\end{figure}
</screen>

</sect1>
<sect1 label="8.11" id="filecontents">
<title><literal>filecontents</literal>: Write an external file</title>

<indexterm role="fn"><primary>environment, <literal>filecontents</literal></primary></indexterm>
<indexterm role="fn"><primary><literal>filecontents</literal> environment</primary></indexterm>
<indexterm role="fn"><primary>environment, <literal>filecontents*</literal></primary></indexterm>
<indexterm role="fn"><primary><literal>filecontents*</literal> environment</primary></indexterm>
<indexterm role="cp"><primary>external files, writing</primary></indexterm>
<indexterm role="cp"><primary>writing external files</primary></indexterm>

<para>Synopsis:
</para>
<screen>\begin{filecontents}{<replaceable>filename</replaceable>}
  <replaceable>text</replaceable>
\end{filecontents}
</screen>
<para>or
</para>
<screen>\begin{filecontents*}{<replaceable>filename</replaceable>}
  <replaceable>text</replaceable>
\end{filecontents*}
</screen>
<para>Create a file named <replaceable>filename</replaceable> and fill it with <replaceable>text</replaceable>.  The
unstarred version of the environment <literal>filecontents</literal> prefixes the
content of the created file with a header; see the example below.  The
starred version <literal>filecontents*</literal> does not include the header.
</para>
<para>This environment can be used anywhere in the preamble, although it often
appears before the <literal>\documentclass</literal> command.  It is typically used
when a source file requires a nonstandard style or class file.  The
environment will write that file to the directory containing the source
and thus make the source file self-contained.  Another use is to include
<literal>bib</literal> references in the file, again to make it self-contained.
</para>
<para>The environment checks whether a file of that name already exists and if
so, does not do anything.  There is a <filename>filecontents</filename> package that
redefines the <literal>filecontents</literal> environment so that instead of doing
nothing in that case, it will overwrite the existing file.
</para>
<para>For example, this document
</para>
<screen>\documentclass{article}
\begin{filecontents}{JH.sty}
\newcommand{\myname}{Jim Hef{}feron}
\end{filecontents}
\usepackage{JH}
\begin{document}
Article by \myname.
\end{document}
</screen>
<para>produces this file <filename>JH.sty</filename>.
</para>
<screen>%% LaTeX2e file `JH.sty'
%% generated by the `filecontents' environment
%% from source `test' on 2015/10/12.
%%
\newcommand{\myname}{Jim Hef{}feron}
</screen>

</sect1>
<sect1 label="8.12" id="flushleft">
<title><literal>flushleft</literal></title>

<indexterm role="fn"><primary>environment, <literal>flushleft</literal></primary></indexterm>
<indexterm role="fn"><primary><literal>flushleft</literal> environment</primary></indexterm>
<indexterm role="cp"><primary>left-justifying text, environment for</primary></indexterm>
<indexterm role="cp"><primary>ragged right text, environment for</primary></indexterm>

<screen>\begin{flushleft}
<replaceable>line1</replaceable> \\
<replaceable>line2</replaceable> \\
...
\end{flushleft}
</screen>
<indexterm role="fn"><primary>\\ for <literal>flushleft</literal></primary></indexterm>
<para>The <literal>flushleft</literal> environment allows you to create a paragraph
consisting of lines that are flush to the left-hand margin and ragged
right. Each line must be terminated with the string <literal>\\</literal>.
</para>


<sect2 label="8.12.1" id="_005craggedright">
<title><literal>\raggedright</literal></title>

<indexterm role="fn"><primary>\raggedright</primary></indexterm>
<indexterm role="cp"><primary>ragged right text</primary></indexterm>
<indexterm role="cp"><primary>left-justifying text</primary></indexterm>
<indexterm role="cp"><primary>justification, ragged right</primary></indexterm>

<para>The <literal>\raggedright</literal> declaration corresponds to the
<literal>flushleft</literal> environment.  This declaration can be used inside an
environment such as <literal>quote</literal> or in a <literal>parbox</literal>.
</para>
<para>Unlike the <literal>flushleft</literal> environment, the <literal>\raggedright</literal>
command does not start a new paragraph; it only changes how &latex;
formats paragraph units.  To affect a paragraph unit&#8217;s format, the
scope of the declaration must contain the blank line or <literal>\end</literal>
command that ends the paragraph unit.
</para>

</sect2>
</sect1>
<sect1 label="8.13" id="flushright">
<title><literal>flushright</literal></title>

<indexterm role="fn"><primary>environment, <literal>flushright</literal></primary></indexterm>
<indexterm role="fn"><primary><literal>flushright</literal> environment</primary></indexterm>
<indexterm role="cp"><primary>ragged left text, environment for</primary></indexterm>
<indexterm role="cp"><primary>right-justifying text, environment for</primary></indexterm>

<screen>\begin{flushright}
<replaceable>line1</replaceable> \\
<replaceable>line2</replaceable> \\
...
\end{flushright}
</screen>
<indexterm role="fn"><primary>\\ (for <literal>flushright</literal>)</primary></indexterm>
<para>The <literal>flushright</literal> environment allows you to create a paragraph
consisting of lines that are flush to the right-hand margin and ragged
left.  Each line must be terminated with the control sequence <literal>\\</literal>.
</para>


<sect2 label="8.13.1" id="_005craggedleft">
<title><literal>\raggedleft</literal></title>

<indexterm role="fn"><primary>\raggedleft</primary></indexterm>
<indexterm role="cp"><primary>ragged left text</primary></indexterm>
<indexterm role="cp"><primary>justification, ragged left</primary></indexterm>
<indexterm role="cp"><primary>right-justifying text</primary></indexterm>

<para>The <literal>\raggedleft</literal> declaration corresponds to the
<literal>flushright</literal> environment.  This declaration can be used inside an
environment such as <literal>quote</literal> or in a <literal>parbox</literal>.
</para>
<para>Unlike the <literal>flushright</literal> environment, the <literal>\raggedleft</literal>
command does not start a new paragraph; it only changes how &latex;
formats paragraph units.  To affect a paragraph unit&#8217;s format, the
scope of the declaration must contain the blank line or <literal>\end</literal>
command that ends the paragraph unit.
</para>

</sect2>
</sect1>
<sect1 label="8.14" id="itemize">
<title><literal>itemize</literal></title>

<indexterm role="fn"><primary>environment, <literal>itemize</literal></primary></indexterm>
<indexterm role="fn"><primary><literal>itemize</literal> environment</primary></indexterm>
<indexterm role="fn"><primary>\item</primary></indexterm>
<indexterm role="cp"><primary>lists of items</primary></indexterm>
<indexterm role="cp"><primary>unordered lists</primary></indexterm>
<indexterm role="cp"><primary>bulleted lists</primary></indexterm>

<para>Synopsis:
</para>
<screen>\begin{itemize}
\item <replaceable>item1</replaceable>
\item <replaceable>item2</replaceable>
...
\end{itemize}
</screen>
<para>The <literal>itemize</literal> environment produces an &#8220;unordered&#8221;, &#8220;bulleted&#8221;
list.  Itemized lists can be nested within one another, up to four
levels deep.  They can also be nested within other paragraph-making
environments, such as <literal>enumerate</literal> (see <link linkend="enumerate">enumerate</link>).
</para>
<para>Each item of an <literal>itemize</literal> list begins with an <literal>\item</literal> command.
There must be at least one <literal>\item</literal> command within the environment.
</para>
<para>By default, the marks at each level look like this:
</para>
<orderedlist numeration="arabic"><listitem><para>&#8226; (bullet)
</para></listitem><listitem><para><emphasis role="bold">--<!-- /@w --></emphasis> (bold en-dash)
</para></listitem><listitem><para>* (asterisk)
</para></listitem><listitem><para>. (centered dot, rendered here as a period)
</para></listitem></orderedlist>
<indexterm role="fn"><primary>\labelitemi</primary></indexterm>
<indexterm role="fn"><primary>\labelitemii</primary></indexterm>
<indexterm role="fn"><primary>\labelitemiii</primary></indexterm>
<indexterm role="fn"><primary>\labelitemiv</primary></indexterm>
<para>The <literal>itemize</literal> environment uses the commands <literal>\labelitemi</literal>
through <literal>\labelitemiv</literal> to produce the default label.  So, you can
use <literal>\renewcommand</literal> to change the labels.  For instance, to have
the first level use diamonds:
</para>
<screen>\renewcommand{\labelitemi}{$\diamond$}
</screen>
<indexterm role="fn"><primary>\leftmargin</primary></indexterm>
<indexterm role="fn"><primary>\leftmargini</primary></indexterm>
<indexterm role="fn"><primary>\leftmarginii</primary></indexterm>
<indexterm role="fn"><primary>\leftmarginiii</primary></indexterm>
<indexterm role="fn"><primary>\leftmarginiv</primary></indexterm>
<indexterm role="fn"><primary>\leftmarginv</primary></indexterm>
<indexterm role="fn"><primary>\leftmarginvi</primary></indexterm>
<para>The <literal>\leftmargini</literal> through <literal>\leftmarginvi</literal> parameters define
the distance between the left margin of the enclosing environment and
the left margin of the list.  By convention, <literal>\leftmargin</literal> is set
to the appropriate <literal>\leftmargin<replaceable>N</replaceable></literal> when a new level of
nesting is entered.
</para>
<para>The defaults vary from &#8216;<literal>.5em</literal>&#8217; (highest levels of nesting) to
&#8216;<literal>2.5em</literal>&#8217; (first level), and are a bit reduced in two-column mode.
This example greatly reduces the margin space for outermost lists:
</para>
<screen>\setlength{\leftmargini}{1.25em} % default 2.5em
</screen>
<!-- xx should be in its own generic section -->
<para>Some parameters that affect list formatting:
</para>
<variablelist><varlistentry><term><indexterm role="fn"><primary>\itemindent</primary></indexterm><literal>\itemindent</literal>
</term><listitem><para>Extra indentation before each item in a list; default zero.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\labelsep</primary></indexterm><literal>\labelsep</literal>
</term><listitem><para>Space between the label and text of an item; default &#8216;<literal>.5em</literal>&#8217;.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\labelwidth</primary></indexterm><literal>\labelwidth</literal>
</term><listitem><para>Width of the label; default &#8216;<literal>2em</literal>&#8217;, or &#8216;<literal>1.5em</literal>&#8217; in two-column mode.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\listparindent</primary></indexterm><literal>\listparindent</literal>
</term><listitem><para>Extra indentation added to second and subsequent paragraphs within a
list item; default &#8216;<literal>0pt</literal>&#8217;.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\rightmargin</primary></indexterm><literal>\rightmargin</literal>
</term><listitem><para>Horizontal distance between the right margin of the list and the
enclosing environment; default &#8216;<literal>0pt</literal>&#8217;, except in the <literal>quote</literal>,
<literal>quotation</literal>, and <literal>verse</literal> environments, where it is set equal
to <literal>\leftmargin</literal>.
</para>
</listitem></varlistentry></variablelist>
<para>Parameters affecting vertical spacing between list items (rather
loose, by default).
</para>
<variablelist><varlistentry><term><indexterm role="fn"><primary>\itemsep</primary></indexterm><literal>\itemsep</literal>
</term><listitem><para>Vertical space between items.  The default is <literal>2pt plus1pt
minus1pt</literal> for <literal>10pt</literal> documents, <literal>3pt plus2pt minus1pt</literal> for
<literal>11pt</literal>, and <literal>4.5pt plus2pt minus1pt</literal> for <literal>12pt</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\parsep</primary></indexterm><literal>\parsep</literal>
</term><listitem><para>Extra vertical space between paragraphs within a list item.  Defaults
are the same as <literal>\itemsep</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\topsep</primary></indexterm><literal>\topsep</literal>
</term><listitem><para>Vertical space between the first item and the preceding paragraph.
For top-level lists, the default is <literal>8pt plus2pt minus4pt</literal> for
<literal>10pt</literal> documents, <literal>9pt plus3pt minus5pt</literal> for <literal>11pt</literal>,
and <literal>10pt plus4pt minus6pt</literal> for <literal>12pt</literal>.  These are reduced
for nested lists.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\partopsep</primary></indexterm><literal>\partopsep</literal>
</term><listitem><para>Extra space added to <literal>\topsep</literal> when the list environment starts a
paragraph.  The default is <literal>2pt plus1pt minus1pt</literal> for <literal>10pt</literal>
documents, <literal>3pt plus1pt minus1pt</literal> for <literal>11pt</literal>, and <literal>3pt
plus2pt minus2pt</literal> for <literal>12pt</literal>.
</para>
</listitem></varlistentry></variablelist>
<indexterm role="fn"><primary>\parskip example</primary></indexterm>
<para>Especially for lists with short items, it may be desirable to elide
space between items.  Here is an example defining an <literal>itemize*</literal>
environment with no extra spacing between items, or between paragraphs
within a single item (<literal>\parskip</literal> is not list-specific,
see <link linkend="_005cparskip">\parskip</link>):
</para>
<screen>\newenvironment{itemize*}%
  {\begin{itemize}%
    \setlength{\itemsep}{0pt}%
    \setlength{\parsep}{0pt}}%
    \setlength{\parskip}{0pt}}%
  {\end{itemize}}
</screen>

</sect1>
<sect1 label="8.15" id="letter">
<title><literal>letter</literal> environment: writing letters</title>

<indexterm role="fn"><primary>environment, <literal>letter</literal></primary></indexterm>
<indexterm role="fn"><primary><literal>letter</literal> environment</primary></indexterm>

<para>This environment is used for creating letters.  See <link linkend="Letters">Letters</link>.
</para>

</sect1>
<sect1 label="8.16" id="list">
<title><literal>list</literal></title>

<indexterm role="fn"><primary>environment, <literal>list</literal></primary></indexterm>
<indexterm role="fn"><primary><literal>list</literal> environment</primary></indexterm>
<indexterm role="cp"><primary>lists of items, generic</primary></indexterm>

<para>The <literal>list</literal> environment is a generic environment which is used for
defining many of the more specific environments. It is seldom used in
documents, but often in macros.
</para>
<screen>\begin{list}{<replaceable>labeling</replaceable>}{<replaceable>spacing</replaceable>}
\item <replaceable>item1</replaceable>
\item <replaceable>item2</replaceable>
...
\end{list}
</screen>
<para>The mandatory <replaceable>labeling</replaceable> argument specifies how items should be
labelled (unless the optional argument is supplied to <literal>\item</literal>).
This argument is a piece of text that is inserted in a box to form the
label.  It can and usually does contain other &latex; commands.
</para>
<para>The mandatory <replaceable>spacing</replaceable> argument contains commands to change the
spacing parameters for the list.  This argument will most often be
empty, i.e., <literal>{}</literal>, which leaves the default spacing.
</para>
<para>The width used for typesetting the list items is specified by
<literal>\linewidth</literal> (see <link linkend="Page-layout-parameters">Page layout parameters</link>).
</para>


<sect2 label="8.16.1" id="_005citem">
<title><literal>\item</literal>: An entry in a list.</title>

<para>Synopsis:
</para>
<screen>\item text of item
</screen>
<para>or
</para><screen>\item[<replaceable>optional label</replaceable>] text of item
</screen>
<para>An entry in a list.  The entries are prefixed by a label, whose default
depends on the list type.  
</para>
<para>Because the optional argument <replaceable>optional label</replaceable> is surrounded by
square brackets&#160;(<literal>[</literal> and <literal>]</literal>), to use square brackets
inside the optional argument you must hide them inside curly braces, as
in <literal>\item[Close square bracket, {]}]</literal>.  Similarly, to use an open
square bracket as first character in the text of the item, also hide it
inside curly braces.  See <link linkend="LaTeX-command-syntax">&latex; command syntax</link>.
</para>
<para>In this example the <literal>enumerate</literal> list has two items that use the
default label and one that uses the optional label.
</para>
<screen>\begin{enumerate}
  \item Moe
  \item[sometimes] Shemp
  \item Larry
\end{enumerate}
</screen>
<para>The first item is labelled &#8216;<literal>1.</literal>&#8217;, the second item is labelled
&#8216;<literal>sometimes</literal>&#8217;, and the third item is labelled &#8216;<literal>2.</literal>&#8217; (note that,
because of the optional label in the second item, the third item does
not get a &#8216;<literal>3.</literal>&#8217;).
</para>   


</sect2>
</sect1>
<sect1 label="8.17" id="math">
<title><literal>math</literal></title>

<indexterm role="fn"><primary>environment, <literal>math</literal></primary></indexterm>
<indexterm role="fn"><primary><literal>math</literal> environment</primary></indexterm>
<indexterm role="cp"><primary>in-line formulas</primary></indexterm>

<para>Synopsis:
</para>
<screen>\begin{math}
<replaceable>math</replaceable>
\end{math}
</screen>
<para>The <literal>math</literal> environment inserts the given <replaceable>math</replaceable> within the
running text.  <literal>\(...\)</literal> and <literal>$...$</literal> are synonyms.
See <link linkend="Math-formulas">Math formulas</link>.
</para>

</sect1>
<sect1 label="8.18" id="minipage">
<title><literal>minipage</literal></title>

<indexterm role="fn"><primary>environment, <literal>minipage</literal></primary></indexterm>
<indexterm role="fn"><primary><literal>minipage</literal> environment</primary></indexterm>
<indexterm role="cp"><primary>minipage, creating a</primary></indexterm>

<screen>\begin{minipage}[<replaceable>position</replaceable>][<replaceable>height</replaceable>][<replaceable>inner-pos</replaceable>]{<replaceable>width</replaceable>}
<replaceable>text</replaceable>
\end{minipage}
</screen>
<para>The <literal>minipage</literal> environment typesets its body <replaceable>text</replaceable> in a
block that will not be broken across pages.  This is similar to the
<literal>\parbox</literal> command (see <link linkend="_005cparbox">\parbox</link>), but unlike <literal>\parbox</literal>,
other paragraph-making environments can be used inside a minipage.
</para>
<!-- (xxref positions) -->
<para>The arguments are the same as for <literal>\parbox</literal> (see <link linkend="_005cparbox">\parbox</link>).
</para>
<indexterm role="cp"><primary>indentation of paragraphs, in minipage</primary></indexterm>
<indexterm role="cp"><primary>paragraph indentation, in minipage</primary></indexterm>
<indexterm role="fn"><primary>\parindent</primary></indexterm>
<para>By default, paragraphs are not indented in the <literal>minipage</literal>
environment.  You can restore indentation with a command such as
<literal>\setlength{\parindent}{1pc}</literal> command.
</para>
<indexterm role="cp"><primary>footnotes in figures</primary></indexterm>
<indexterm role="cp"><primary>figures, footnotes in</primary></indexterm>
<para>Footnotes in a <literal>minipage</literal> environment are handled in a way that is
particularly useful for putting footnotes in figures or tables.  A
<literal>\footnote</literal> or <literal>\footnotetext</literal> command puts the footnote at
the bottom of the minipage instead of at the bottom of the page, and it
uses the <literal>\mpfootnote</literal> counter instead of the ordinary
<literal>footnote</literal> counter (see <link linkend="Counters">Counters</link>).
</para>
<para>However, don&#8217;t put one minipage inside another if you are using
footnotes; they may wind up at the bottom of the wrong minipage.
</para>

</sect1>
<sect1 label="8.19" id="picture">
<title><literal>picture</literal></title>

<indexterm role="fn"><primary>environment, <literal>picture</literal></primary></indexterm>
<indexterm role="fn"><primary><literal>picture</literal> environment</primary></indexterm>
<indexterm role="cp"><primary>creating pictures</primary></indexterm>
<indexterm role="cp"><primary>pictures, creating</primary></indexterm>

<screen>\begin{picture}(<replaceable>width</replaceable>,<replaceable>height</replaceable>)(<replaceable>xoffset</replaceable>,<replaceable>yoffset</replaceable>)
&#8230; <replaceable>picture commands</replaceable> &#8230;
\end{picture}
</screen>
<indexterm role="fn"><primary>\unitlength</primary></indexterm>
<para>The <literal>picture</literal> environment allows you to create just about any
kind of picture you want containing text, lines, arrows and circles.
You tell &latex; where to put things in the picture by specifying
their coordinates.  A coordinate is a number that may have a decimal
point and a minus sign&#8212;a number like <literal>5</literal>, <literal>0.3</literal> or
<literal>-3.1416</literal>.  A coordinate specifies a length in multiples of the
unit length <literal>\unitlength</literal>, so if <literal>\unitlength</literal> has been set
to <literal>1cm</literal>, then the coordinate 2.54 specifies a length of 2.54
centimeters.
</para>
<para>You should only change the value of <literal>\unitlength</literal>, using the
<literal>\setlength</literal> command, outside of a <literal>picture</literal> environment.
The default value is <literal>1pt</literal>.
</para>
<indexterm role="cp"><primary>package, <literal>picture</literal></primary></indexterm>
<indexterm role="cp"><primary><literal>picture</literal> package</primary></indexterm>
<para>The <literal>picture</literal> package redefine the <literal>picture</literal> environment so
that everywhere a number is used in a <replaceable>picture commands</replaceable> to specify
a coordinate, one can use alternatively a length. Be aware however that
this will prevent scaling those lengths by changing <literal>\unitlength</literal>.
</para>

<indexterm role="cp"><primary>position, in picture</primary></indexterm>
<para>A <firstterm>position</firstterm> is a pair of coordinates, such as <literal>(2.4,-5)</literal>, specifying
the point with x-coordinate <literal>2.4</literal> and y-coordinate <literal>-5</literal>.
Coordinates are specified in the usual way with respect to an origin,
which is normally at the lower-left corner of the picture.  Note that
when a position appears as an argument, it is not enclosed in braces;
the parentheses serve to delimit the argument.
</para>
<para>The <literal>picture</literal> environment has one mandatory argument which is a
position (<replaceable>width</replaceable>,<replaceable>height</replaceable>), which specifies the size of the
picture.  The environment produces a rectangular box with these
<replaceable>width</replaceable> and <replaceable>height</replaceable>.
</para>
<para>The <literal>picture</literal> environment also has an optional position argument
(<replaceable>xoffset</replaceable>,<replaceable>yoffset</replaceable>), following the size argument, that can
change the origin.  (Unlike ordinary optional arguments, this argument
is not contained in square brackets.) The optional argument gives the
coordinates of the point at the lower-left corner of the picture
(thereby determining the origin).  For example, if <literal>\unitlength</literal>
has been set to <literal>1mm</literal>, the command
</para>
<screen>\begin{picture}(100,200)(10,20)
</screen>
<para>produces a picture of width 100 millimeters and height 200
millimeters, whose lower-left corner is the point (10,20) and whose
upper-right corner is therefore the point (110,220).  When you first
draw a picture, you typically omit the optional argument, leaving the
origin at the lower-left corner.  If you then want to modify your
picture by shifting everything, you can just add the appropriate
optional argument.
</para>
<para>The environment&#8217;s mandatory argument determines the nominal size of the
picture.  This need bear no relation to how large the picture really is;
&latex; will happily allow you to put things outside the picture, or even
off the page.  The picture&#8217;s nominal size is used by &latex; in determining
how much room to leave for it.
</para>
<para>Everything that appears in a picture is drawn by the <literal>\put</literal>
command. The command
</para>
<screen>\put (11.3,-.3){...}
</screen>
<para>puts the object specified by <literal>...</literal> in the
picture, with its reference point at coordinates <inlineequation><mathphrase>(11.3,-.3)</mathphrase></inlineequation>.
The reference points for various objects will be described below.
</para>
<indexterm role="fn"><primary>lR box</primary></indexterm>
<para>The <literal>\put</literal> command creates an <firstterm>LR box</firstterm>.  You can put anything
that can go in an <literal>\mbox</literal> (see <link linkend="_005cmbox">\mbox</link>) in the text argument of
the <literal>\put</literal> command.  When you do this, the reference point will
be the lower left corner of the box.
</para>
<para>The <literal>picture</literal> commands are described in the following sections.
</para>


<sect2 label="8.19.1" id="_005ccircle">
<title><literal>\circle</literal></title>

<indexterm role="fn"><primary>\circle</primary></indexterm>

<para>Synopsis:
</para>
<screen>\circle[*]{<replaceable>diameter</replaceable>}
</screen>
<para>The <literal>\circle</literal> command produces a circle with a diameter as close
to the specified one as possible.  The <literal>*</literal>-form of the command
draws a solid circle.
</para>
<para>Circles up to 40pt can be drawn.
</para>

</sect2>
<sect2 label="8.19.2" id="_005cmakebox-_0028picture_0029">
<title><literal>\makebox</literal></title>

<indexterm role="fn"><primary>\makebox (for <literal>picture</literal>)</primary></indexterm>

<para>Synopsis:
</para>
<screen>\makebox(<replaceable>width</replaceable>,<replaceable>height</replaceable>)[<replaceable>position</replaceable>]{<replaceable>text</replaceable>}
</screen>
<para>The <literal>\makebox</literal> command for the picture environment is similar to
the normal <literal>\makebox</literal> command except that you must specify a
<replaceable>width</replaceable> and <replaceable>height</replaceable> in multiples of <literal>\unitlength</literal>.
</para>
<para>The optional argument, <literal>[<replaceable>position</replaceable>]</literal>, specifies the quadrant that
your <replaceable>text</replaceable> appears in.  You may select up to two of the following:
</para>
<variablelist><varlistentry><term><literal>t</literal>
</term><listitem><para>Moves the item to the top of the rectangle.
</para>
</listitem></varlistentry><varlistentry><term><literal>b</literal>
</term><listitem><para>Moves the item to the bottom.
</para>
</listitem></varlistentry><varlistentry><term><literal>l</literal>
</term><listitem><para>Moves the item to the left.
</para>
</listitem></varlistentry><varlistentry><term><literal>r</literal>
</term><listitem><para>Moves the item to the right.
</para>
</listitem></varlistentry></variablelist>
<para>See <link linkend="_005cmakebox">\makebox</link>.
</para>

</sect2>
<sect2 label="8.19.3" id="_005cframebox-_0028picture_0029">
<title><literal>\framebox</literal></title>

<indexterm role="fn"><primary>\framebox</primary></indexterm>

<para>Synopsis:
</para>
<screen>\framebox(<replaceable>width</replaceable>,<replaceable>height</replaceable>)[<replaceable>pos</replaceable>]{...}
</screen>
<para>The <literal>\framebox</literal> command is like <literal>\makebox</literal> (see previous
section), except that it puts a frame around the outside of the box
that it creates.
</para>
<indexterm role="fn"><primary>\fboxrule</primary></indexterm>
<indexterm role="fn"><primary>\fboxsep</primary></indexterm>
<para>The <literal>\framebox</literal> command produces a rule of thickness
<literal>\fboxrule</literal>, and leaves a space <literal>\fboxsep</literal> between the rule
and the contents of the box.
</para>

</sect2>
<sect2 label="8.19.4" id="_005cdashbox">
<title><literal>\dashbox</literal></title>

<indexterm role="fn"><primary>\dashbox</primary></indexterm>

<para>Draws a box with a dashed line.  Synopsis:
</para>
<screen>\dashbox{<replaceable>dlen</replaceable>}(<replaceable>rwidth</replaceable>,<replaceable>rheight</replaceable>)[<replaceable>pos</replaceable>]{<replaceable>text</replaceable>}
</screen>
<para><literal>\dashbox</literal> creates a dashed rectangle around <replaceable>text</replaceable> in a
<literal>picture</literal> environment.  Dashes are <replaceable>dlen</replaceable> units long, and the
rectangle has overall width <replaceable>rwidth</replaceable> and height <replaceable>rheight</replaceable>.
The <replaceable>text</replaceable> is positioned at optional <replaceable>pos</replaceable>.  <!-- xxref positions. -->
</para>
<para>A dashed box looks best when the <replaceable>rwidth</replaceable> and <replaceable>rheight</replaceable> are
multiples of the <replaceable>dlen</replaceable>.
</para>

</sect2>
<sect2 label="8.19.5" id="_005cframe">
<title><literal>\frame</literal></title>

<indexterm role="fn"><primary>\frame</primary></indexterm>

<para>Synopsis:
</para>
<screen>\frame{<replaceable>text</replaceable>}
</screen>
<para>The <literal>\frame</literal> command puts a rectangular frame around <replaceable>text</replaceable>.
The reference point is the bottom left corner of the frame.  No extra
space is put between the frame and the object.
</para>

</sect2>
<sect2 label="8.19.6" id="_005cline">
<title><literal>\line</literal></title>

<indexterm role="fn"><primary>\line</primary></indexterm>

<para>Synopsis:
</para>
<screen>\line(<replaceable>xslope</replaceable>,<replaceable>yslope</replaceable>){<replaceable>length</replaceable>}
</screen>
<para>The <literal>\line</literal> command draws a line with the given <replaceable>length</replaceable> and
slope <replaceable>xslope</replaceable>/<replaceable>yslope</replaceable>.
</para>
<indexterm role="cp"><primary><literal>pict2e</literal> package</primary></indexterm>
<indexterm role="cp"><primary>graphics packages</primary></indexterm>
<para>Standard &latex; can only draw lines with <inlineequation><mathphrase><replaceable>slope</replaceable> = x/y</mathphrase></inlineequation>,
where <inlineequation><mathphrase>x</mathphrase></inlineequation> and <inlineequation><mathphrase>y</mathphrase></inlineequation> have integer values from &#8722;6
through&#160;6.  For lines of any slope, and plenty of other shapes,
see <literal>pict2e</literal> and many other packages on CTAN.
</para>

</sect2>
<sect2 label="8.19.7" id="_005clinethickness">
<title><literal>\linethickness</literal></title>

<indexterm role="fn"><primary>\linethickness</primary></indexterm>

<para>The <literal>\linethickness{<replaceable>dim</replaceable>}</literal> command declares the thickness
of horizontal and vertical lines in a picture environment to be
<replaceable>dim</replaceable>, which must be a positive length.
</para>
<para><literal>\linethickness</literal> does not affect the thickness of slanted lines,
circles, or the quarter circles drawn by <literal>\oval</literal>.
</para>

</sect2>
<sect2 label="8.19.8" id="_005cthicklines">
<title><literal>\thicklines</literal></title>

<indexterm role="fn"><primary>\thicklines</primary></indexterm>

<para>The <literal>\thicklines</literal> command is an alternate line thickness for
horizontal and vertical lines in a picture environment;
cf.&#160;<link linkend="_005clinethickness">\linethickness</link> and <link linkend="_005cthinlines">\thinlines</link>.
</para>

</sect2>
<sect2 label="8.19.9" id="_005cthinlines">
<title><literal>\thinlines</literal></title>

<indexterm role="fn"><primary>\thinlines</primary></indexterm>

<para>The <literal>\thinlines</literal> command is the default line thickness for
horizontal and vertical lines in a picture environment;
cf.&#160;<link linkend="_005clinethickness">\linethickness</link> and <link linkend="_005cthicklines">\thicklines</link>.
</para>

</sect2>
<sect2 label="8.19.10" id="_005cmultiput">
<title><literal>\multiput</literal></title>

<indexterm role="fn"><primary>\multiput</primary></indexterm>

<para>Synopsis:
</para>
<screen>\multiput(<replaceable>x</replaceable>,<replaceable>y</replaceable>)(<replaceable>delta_x</replaceable>,<replaceable>delta_y</replaceable>){<replaceable>n</replaceable>}{<replaceable>obj</replaceable>}
</screen>
<para>The <literal>\multiput</literal> command copies the object <replaceable>obj</replaceable> in a regular
pattern across a picture.  <replaceable>obj</replaceable> is first placed at position
<inlineequation><mathphrase>(x,y)</mathphrase></inlineequation>, then at <inlineequation><mathphrase>(x+\delta x,y+\delta y)</mathphrase></inlineequation>, and so on,
<replaceable>n</replaceable> times.
</para>

</sect2>
<sect2 label="8.19.11" id="_005coval">
<title><literal>\oval</literal></title>

<indexterm role="fn"><primary>\oval</primary></indexterm>

<para>Synopsis:
</para>
<screen>\oval(<replaceable>width</replaceable>,<replaceable>height</replaceable>)[<replaceable>portion</replaceable>]
</screen>
<para>The <literal>\oval</literal> command produces a rectangle with rounded corners.  The
optional argument <replaceable>portion</replaceable> allows you to produce only half of the
oval via the following:
</para>
<variablelist><varlistentry><term><literal>t</literal>
</term><listitem><para>selects the top half;
</para></listitem></varlistentry><varlistentry><term><literal>b</literal>
</term><listitem><para>selects the bottom half;
</para></listitem></varlistentry><varlistentry><term><literal>r</literal>
</term><listitem><para>selects the right half;
</para></listitem></varlistentry><varlistentry><term><literal>l</literal>
</term><listitem><para>selects the left half.
</para></listitem></varlistentry></variablelist>
<para>It is also possible to produce only one quarter of the oval by setting
<replaceable>portion</replaceable> to <literal>tr</literal>, <literal>br</literal>, <literal>bl</literal>, or <literal>tl</literal>.
</para>
<para>The &#8220;corners&#8221; of the oval are made with quarter circles with a
maximum radius of 20pt, so large &#8220;ovals&#8221; will look more like
boxes with rounded corners.
</para>

</sect2>
<sect2 label="8.19.12" id="_005cput">
<title><literal>\put</literal></title>

<indexterm role="fn"><primary>\put</primary></indexterm>

<para>Synopsis:
</para>
<screen>\put(<replaceable>xcoord</replaceable>,<replaceable>ycoord</replaceable>){ ... }
</screen>
<para>The <literal>\put</literal> command places the material specified by the
(mandatory) argument in braces at the given coordinate,
(<replaceable>xcoord</replaceable>,<replaceable>ycoord</replaceable>).
</para>

</sect2>
<sect2 label="8.19.13" id="_005cshortstack">
<title><literal>\shortstack</literal></title>

<indexterm role="fn"><primary>\shortstack</primary></indexterm>

<para>Synopsis:
</para>
<screen>\shortstack[<replaceable>position</replaceable>]{...\\...\\...}
</screen>
<para>The <literal>\shortstack</literal> command produces a stack of objects.  The valid
positions are:
</para>
<variablelist><varlistentry><term><literal>r</literal>
</term><listitem><para>Move the objects to the right of the stack.
</para></listitem></varlistentry><varlistentry><term><literal>l</literal>
</term><listitem><para>Move the objects to the left of the stack
</para></listitem></varlistentry><varlistentry><term><literal>c</literal>
</term><listitem><para>Move the objects to the centre of the stack (default)
</para></listitem></varlistentry></variablelist>
<indexterm role="fn"><primary>\\ (for <literal>\shortstack</literal> objects)</primary></indexterm>
<para>Objects are separated with <literal>\\</literal>.
</para>

</sect2>
<sect2 label="8.19.14" id="_005cvector">
<title><literal>\vector</literal></title>

<indexterm role="fn"><primary>\vector</primary></indexterm>

<para>Synopsis:
</para>
<screen>\vector(<replaceable>xslope</replaceable>,<replaceable>yslope</replaceable>){<replaceable>length</replaceable>}
</screen>
<para>The <literal>\vector</literal> command draws a line with an arrow of the specified
length and slope.  The <inlineequation><mathphrase><replaceable>xslope</replaceable></mathphrase></inlineequation> and <inlineequation><mathphrase><replaceable>yslope</replaceable></mathphrase></inlineequation>
values must lie between &#8722;4 and +4, inclusive.
</para>

</sect2>
</sect1>
<sect1 label="8.20" id="quotation-and-quote">
<title><literal>quotation</literal> and <literal>quote</literal></title>

<indexterm role="fn"><primary>environment, <literal>quotation</literal></primary></indexterm>
<indexterm role="fn"><primary><literal>quotation</literal> environment</primary></indexterm>
<indexterm role="cp"><primary>quoted text with paragraph indentation, displaying</primary></indexterm>
<indexterm role="cp"><primary>displaying quoted text with paragraph indentation</primary></indexterm>
<indexterm role="cp"><primary>paragraph indentations in quoted text</primary></indexterm>
<indexterm role="fn"><primary>environment, <literal>quote</literal></primary></indexterm>
<indexterm role="fn"><primary><literal>quote</literal> environment</primary></indexterm>
<indexterm role="cp"><primary>quoted text without paragraph indentation, displaying</primary></indexterm>
<indexterm role="cp"><primary>displaying quoted text without paragraph indentation</primary></indexterm>
<indexterm role="cp"><primary>paragraph indentations in quoted text, omitting</primary></indexterm>

<para>Synopsis:
</para>
<screen>\begin{quotation}
<replaceable>text</replaceable>
\end{quotation}
</screen>
<para>or 
</para>
<screen>\begin{quote}
<replaceable>text</replaceable>
\end{quote}
</screen>
<para>Include a quotation. 
</para>
<para>In both environments, margins are indented on both sides by
<literal>\leftmargin</literal> and the text is justified at both.  As with the main
text, leaving a blank line produces a new paragraph.
</para>
<para>To compare the two: in the <literal>quotation</literal> environment, paragraphs are
indented by 1.5em and the space between paragraphs is small,
<literal>0pt plus 1pt</literal>.  In the <literal>quote</literal> environment, paragraphs are
not indented and there is vertical space between paragraphs (it is the
rubber length <literal>\parsep</literal>).  Thus, the <literal>quotation</literal> environment
may be more suitable for documents where new paragraphs are marked by an
indent rather than by a vertical separation.  In addition, <literal>quote</literal>
may be more suitable for a short quotation or a sequence of short
quotations.
</para>
<screen>\begin{quotation}
\it Four score and seven years ago
  ... shall not perish from the earth.
\hspace{1em plus 1fill}---Abraham Lincoln
\end{quotation}
</screen>

</sect1>
<sect1 label="8.21" id="tabbing">
<title><literal>tabbing</literal></title>

<indexterm role="fn"><primary>environment, <literal>tabbing</literal></primary></indexterm>
<indexterm role="fn"><primary><literal>tabbing</literal> environment</primary></indexterm>
<indexterm role="cp"><primary>tab stops, using</primary></indexterm>
<indexterm role="cp"><primary>lining text up using tab stops</primary></indexterm>
<indexterm role="cp"><primary>alignment via tabbing</primary></indexterm>

<para>Synopsis:
</para>
<screen>\begin{tabbing}
<replaceable>row1col1</replaceable> \= <replaceable>row1col2</replaceable> \= <replaceable>row1col3</replaceable> \= <replaceable>row1col4</replaceable> \\
<replaceable>row2col1</replaceable> \&gt;                \&gt; <replaceable>row2col3</replaceable> \\
...
\end{tabbing}
</screen>
<para>The <literal>tabbing</literal> environment provides a way to align text in
columns.  It works by setting tab stops and tabbing to them much as
was done on an ordinary typewriter.  It is best suited for cases where
the width of each column is constant and known in advance.
</para>
<para>This environment can be broken across pages, unlike the <literal>tabular</literal>
environment.
</para>
<para>The following commands can be used inside a <literal>tabbing</literal> environment:
</para>
<variablelist><varlistentry><term><indexterm role="fn"><primary>\\ (tabbing)</primary></indexterm><literal>\\ (tabbing)</literal>
</term><listitem><para>End a line.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\= (tabbing)</primary></indexterm><literal>\= (tabbing)</literal>
</term><listitem><para>Sets a tab stop at the current position.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\&gt; (tabbing)</primary></indexterm><literal>\&gt; (tabbing)</literal>
</term><listitem><indexterm role="fn"><primary>\&gt;</primary></indexterm>
<para>Advances to the next tab stop.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\&lt;</primary></indexterm><literal>\&lt;</literal>
</term><listitem><para>Put following text to the left of the local margin (without changing
the margin).  Can only be used at the start of the line.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\+</primary></indexterm><literal>\+</literal>
</term><listitem><para>Moves the left margin of the next and all the
following commands one tab stop to the right, beginning tabbed line if
necessary.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\-</primary></indexterm><literal>\-</literal>
</term><listitem><para>Moves the left margin of the next and all the
following commands one tab stop to the left, beginning tabbed line if
necessary.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\&#8217; (tabbing)</primary></indexterm><literal>\' (tabbing)</literal>
</term><listitem><para>Moves everything that you have typed so far in the
current column, i.e., everything from the most recent <literal>\&gt;</literal>,
<literal>\&lt;</literal>, <literal>\'</literal>, <literal>\\</literal>, or <literal>\kill</literal> command, to the right
of the previous column, flush against the current column&#8217;s tab stop.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\&#8216; (tabbing)</primary></indexterm><literal>\` (tabbing)</literal>
</term><listitem><para>Allows you to put text flush right against any tab stop, including tab
stop&#160;0.  However, it can&#8217;t move text to the right of the last column
because there&#8217;s no tab stop there.  The <literal>\`</literal> command moves all the
text that follows it, up to the <literal>\\</literal> or <literal>\end{tabbing}</literal>
command that ends the line, to the right margin of the tabbing
environment.  There must be no <literal>\&gt;</literal> or <literal>\'</literal> command between
the <literal>\`</literal> and the command that ends the line.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\a (tabbing)</primary></indexterm><literal>\a (tabbing)</literal>
</term><listitem><indexterm role="fn"><primary>\a&#8217; (acute accent in tabbing)</primary></indexterm>
<indexterm role="fn"><primary>\a&#8216; (grave accent in tabbing)</primary></indexterm>
<indexterm role="fn"><primary>\a= (macron accent in tabbing)</primary></indexterm>
<para>In a <literal>tabbing</literal> environment, the commands <literal>\=</literal>, <literal>\'</literal> and
<literal>\`</literal> do not produce accents as usual (see <link linkend="Accents">Accents</link>).  Instead,
the commands <literal>\a=</literal>, <literal>\a'</literal> and <literal>\a`</literal> are used.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\kill</primary></indexterm><literal>\kill</literal>
</term><listitem><para>Sets tab stops without producing text.  Works just like <literal>\\</literal>
except that it throws away the current line instead of producing
output for it.  The effect of any <literal>\=</literal>, <literal>\+</literal> or <literal>\-</literal>
commands in that line remain in effect.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\poptabs</primary></indexterm><literal>\poptabs</literal>
</term><listitem><indexterm role="fn"><primary>\poptabs</primary></indexterm>
<para>Restores the tab stop positions saved by the last <literal>\pushtabs</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\pushtabs</primary></indexterm><literal>\pushtabs</literal>
</term><listitem><para>Saves all current tab stop positions. Useful for temporarily changing
tab stop positions in the middle of a <literal>tabbing</literal> environment.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\tabbingsep</primary></indexterm><literal>\tabbingsep</literal>
</term><listitem><para>Distance to left of tab stop moved by <literal>\'</literal>.
</para>
</listitem></varlistentry></variablelist>
<para>This example typesets a Pascal function in a traditional format:
</para>
<screen>\begin{tabbing}
function \= fact(n : integer) : integer;\\
         \&gt; begin \= \+ \\
               \&gt; if \= n $&gt;$ 1 then \+ \\
                        fact := n * fact(n-1) \- \\
                  else \+ \\
                        fact := 1; \-\- \\
            end;\\
\end{tabbing}
</screen>

</sect1>
<sect1 label="8.22" id="table">
<title><literal>table</literal></title>

<indexterm role="fn"><primary>environment, <literal>table</literal></primary></indexterm>
<indexterm role="fn"><primary><literal>table</literal> environment</primary></indexterm>
<indexterm role="cp"><primary>tables, creating</primary></indexterm>
<indexterm role="cp"><primary>creating tables</primary></indexterm>

<para>Synopsis:
</para>
<screen>\begin{table}[<replaceable>placement</replaceable>]
  table body
\caption[<replaceable>loftitle</replaceable>]{<replaceable>title</replaceable>}
\label{<replaceable>label}</replaceable>
\end{table}
</screen>
<para>A class of floats (see <link linkend="Floats">Floats</link>).  Because they cannot be split across
pages, they are not typeset in sequence with the normal text but instead
are &#8220;floated&#8221; to a convenient place, such as the top of a following
page.
</para>
<para>For the possible values of <replaceable>placement</replaceable> and their effect on the 
float placement algorithm, see <link linkend="Floats">Floats</link>.
</para>
<para>The table body is typeset in a <literal>parbox</literal> of width <literal>\textwidth</literal>
and so it can contain text, commands, etc.
</para>
<para>The label is optional; it is used for cross references (see <link linkend="Cross-references">Cross
references</link>).  
<indexterm role="fn"><primary>\caption</primary></indexterm>
The optional <literal>\caption</literal> command specifies caption text for the
table.  By default it is numbered.  If <replaceable>lottitle</replaceable> is present, it is
used in the list of tables instead of <replaceable>title</replaceable> (see <link linkend="Tables-of-contents">Tables of
contents</link>).
</para>
<para>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.
</para>
<screen>\begin{table}[b]
  \centering
  \begin{tabular}{r|p{2in}} \hline
    One &amp;The loneliest number \\
    Two &amp;Can be as sad as one.
         It's the loneliest number since the number one.
  \end{tabular}
  \caption{Cardinal virtues}
  \label{tab:CardinalVirtues}
\end{table}
</screen>

</sect1>
<sect1 label="8.23" id="tabular">
<title><literal>tabular</literal></title>

<indexterm role="fn"><primary>environment, <literal>tabular</literal></primary></indexterm>
<indexterm role="fn"><primary><literal>tabular</literal> environment</primary></indexterm>
<indexterm role="cp"><primary>lines in tables</primary></indexterm>
<indexterm role="cp"><primary>lining text up in tables</primary></indexterm>

<para>Synopsis:
</para>
<screen>\begin{tabular}[<replaceable>pos</replaceable>]{<replaceable>cols</replaceable>}
column 1 entry &amp;column 2 entry ... &amp;column n entry \\
  ...
\end{tabular}
</screen>
<para>or
</para>
<screen>\begin{tabular*}{<replaceable>width</replaceable>}[<replaceable>pos</replaceable>]{<replaceable>cols</replaceable>}
column 1 entry &amp;column 2 entry ... &amp;column n entry \\
  ...
\end{tabular*}
</screen>
<para>These environments produce a table, a box consisting of a sequence of
horizontal rows.  Each row consists of items that are aligned vertically
in columns.  This illustrates many of the features.
</para>
<screen>\begin{tabular}{l|l}
  \textit{Player name}  &amp;\textit{Career home runs}  \\ 
  \hline
  Hank Aaron  &amp;755 \\
  Babe Ruth   &amp;714
\end{tabular}
</screen>
<para>The vertical format of two left-aligned columns, with a vertical bar
between them, is specified in <literal>tabular</literal>&#8217;s argument <literal>{l|l}</literal>.
<indexterm role="fn"><primary>&amp;</primary></indexterm>
Columns are separated with an ampersand <literal>&amp;</literal>.  A horizontal rule
between two rows is created with <literal>\hline</literal>.
<indexterm role="fn"><primary>\\ for <literal>tabular</literal></primary></indexterm>
The end of each row is marked with a double backslash&#160;<literal>\\</literal>.
This <literal>\\</literal> is optional after the last row unless an <literal>\hline</literal>
command follows, to put a rule below the table.
</para>
<para>The required and optional arguments to <literal>tabular</literal> consist of:
</para>
<variablelist><varlistentry><term><replaceable>width</replaceable>
</term><listitem><para>Required for <literal>tabular*</literal>, not allowed for <literal>tabular</literal>. Specifies
the width of the <literal>tabular*</literal> environment.  The space between columns
should be rubber, as with <literal>@{\extracolsep{\fill}}</literal>, to allow
the table to stretch or shrink to make the specified width, or else you
are likely to get the <literal>Underfull \hbox (badness 10000) in alignment
...</literal> warning.
</para>
</listitem></varlistentry><varlistentry><term><replaceable>pos</replaceable>
</term><listitem><para>Optional.  Specifies the table&#8217;s vertical position.  The default is to
align the table so its vertical center matches the baseline of the
surrounding text.  There are two other possible alignments: <literal>t</literal>
aligns the table so its top row matches the baseline of the surrounding
text, and <literal>b</literal> aligns on the bottom row.
</para>
<para>This only has an effect if there is other text.  In the common case of a
<literal>tabular</literal> alone in a <literal>center</literal> environment this option makes
no difference.
</para>
</listitem></varlistentry><varlistentry><term><replaceable>cols</replaceable>
</term><listitem><para>Required.  Specifies the formatting of columns.  It consists of a
sequence of the following specifiers, corresponding to the types of
column and intercolumn material.
</para>
<variablelist><varlistentry><term><literal>l</literal>
</term><listitem><para>A column of left-aligned items.
</para>
</listitem></varlistentry><varlistentry><term><literal>r</literal>
</term><listitem><para>A column of right-aligned items.
</para>
</listitem></varlistentry><varlistentry><term><literal>c</literal>
</term><listitem><para>A column of centered items.
</para>
</listitem></varlistentry><varlistentry><term><literal>|</literal>
</term><listitem><para>A vertical line the full height and depth of the environment.
</para>
</listitem></varlistentry><varlistentry><term><literal>@{<replaceable>text or space</replaceable>}</literal>
</term><listitem><para>This inserts <replaceable>text or space</replaceable> at this location in every row.  The
<replaceable>text or space</replaceable> material is typeset in LR mode.  This text is
fragile (see <link linkend="_005cprotect">\protect</link>).
</para>
<para>This specifier is optional: with no @-expression, &latex;&#8217;s
<literal>book</literal>, <literal>article</literal>, and <literal>report</literal> classes will put on
either side of each column a space of length <literal>\tabcolsep</literal>, which
by default is &#8216;<literal>6pt</literal>&#8217;.  That is, by default adjacent columns are
separated by 12pt (so <literal>\tabcolsep</literal> is misleadingly-named since it
is not the separation between tabular columns).  By implication, a
space of 6pt also comes before the first column and after the final
column, unless you put a <literal>@{...}</literal> or <literal>|</literal> there.
</para>
<para>If you override the default and use an @-expression then you must
insert any desired space yourself, as in <literal>@{\hspace{1em}}</literal>.
</para>
<para>An empty expression <literal>@{}</literal> will eliminate the space, including
the space at the start or end, as in the example below where the tabular
lines need to lie on the left margin.
</para>
<screen>\begin{flushleft}
  \begin{tabular}{@{}l}
    ...
  \end{tabular}
\end{flushleft}
</screen>
<para>This example shows text, a decimal point, between the columns, arranged
so the numbers in the table are aligned on that decimal point.
</para>
<screen>\begin{tabular}{r@{$.$}l}
  $3$ &amp;$14$  \\
  $9$ &amp;$80665$
\end{tabular}
</screen>
<indexterm role="fn"><primary>\extracolsep</primary></indexterm>
<para>An <literal>\extracolsep{<replaceable>wd</replaceable>}</literal> command in an @-expression causes an
extra space of width <replaceable>wd</replaceable> to appear to the left of all subsequent
columns, until countermanded by another <literal>\extracolsep</literal> command.
Unlike ordinary intercolumn space, this extra space is not suppressed by
an @-expression.  An <literal>\extracolsep</literal> command can be used only in an
@-expression in the <literal>cols</literal> argument.  Below, &latex; inserts the
right amount of intercolumn space to make the entire table 4 inches
wide.
</para>
<screen>\begin{center}
  \begin{tabular*}{4in}{l@{\ \ldots\extracolsep{\fill}}l}
    Seven times down, eight times up 
    &amp;such is life!
  \end{tabular*}
\end{center}
</screen>
<para>To insert commands that are automatically executed before a given
column, load the <literal>array</literal> package and use the <literal>&gt;{...}</literal>
specifier.
<!-- xx should fully explain array, tabularx, and all other base packages... -->
</para>
</listitem></varlistentry><varlistentry><term><literal>p{<replaceable>wd</replaceable>}</literal>
</term><listitem><para>Each item in the column is typeset in a parbox of width <replaceable>wd</replaceable>.
</para>
<para>Note that a line break double backslash <literal>\\</literal> may not appear in the
item, except inside an environment like <literal>minipage</literal>, <literal>array</literal>,
or <literal>tabular</literal>, or inside an explicit <literal>\parbox</literal>, or in the scope
of a <literal>\centering</literal>, <literal>\raggedright</literal>, or <literal>\raggedleft</literal>
declaration (when used in a <literal>p</literal>-column element these declarations
must appear inside braces, as with <literal>{\centering .. \\
..}</literal>). Otherwise &latex; will misinterpret the double backslash as
ending the row.
</para>
</listitem></varlistentry><varlistentry><term><literal>*{<replaceable>num</replaceable>}{<replaceable>cols</replaceable>}</literal>
</term><listitem><para>Equivalent to <replaceable>num</replaceable> copies of <replaceable>cols</replaceable>, where <replaceable>num</replaceable> is a
positive integer and <replaceable>cols</replaceable> is a list of specifiers.  Thus
<literal>\begin{tabular}{|*{3}{l|r}|}</literal> is equivalent to
<literal>\begin{tabular}{|l|rl|rl|r|}</literal>.  Note that <replaceable>cols</replaceable> may
contain another <literal>*</literal>-expression.
</para> 
</listitem></varlistentry></variablelist></listitem></varlistentry></variablelist>
<para>Parameters that control formatting:
<!-- xx defaults, own node (xref from array)? -->
</para>
<variablelist><varlistentry><term><indexterm role="fn"><primary>\arrayrulewidth</primary></indexterm><literal>\arrayrulewidth</literal>
</term><listitem><para>A length that is the thickness of the rule created by <literal>|</literal>,
<literal>\hline</literal>, and <literal>\vline</literal> in the <literal>tabular</literal> and <literal>array</literal>
environments.  The default is &#8216;<literal>.4pt</literal>&#8217;. Change it as in
<literal>\setlength{\arrayrulewidth}{0.8pt}</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\arraystretch</primary></indexterm><literal>\arraystretch</literal>
</term><listitem><para>A factor by which the spacing between rows in the <literal>tabular</literal> and
<literal>array</literal> environments is multiplied.  The default is &#8216;<literal>1</literal>&#8217;, for
no scaling.  Change it as <literal>\renewcommand{\arraystretch}{1.2}</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\doublerulesep</primary></indexterm><literal>\doublerulesep</literal>
</term><listitem><para>A length that is the distance between the vertical rules produced by the
<literal>||</literal> specifier.  The default is &#8216;<literal>2pt</literal>&#8217;.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\tabcolsep</primary></indexterm><literal>\tabcolsep</literal>
</term><listitem><para>A length that is half of the space between columns. The default is
&#8216;<literal>6pt</literal>&#8217;.  Change it with <literal>\setlength</literal>.
</para>
</listitem></varlistentry></variablelist>
<para>The following commands can be used inside the body of a <literal>tabular</literal>
environment, the first two inside an entry and the second two between
lines:
</para>


<sect2 label="8.23.1" id="_005cmulticolumn">
<title><literal>\multicolumn</literal></title>

<indexterm role="fn"><primary>\multicolumn</primary></indexterm>

<para>Synopsis:
</para>
<screen>\multicolumn{<replaceable>numcols</replaceable>}{<replaceable>cols</replaceable>}{<replaceable>text</replaceable>}
</screen>
<para>Make an <literal>array</literal> or <literal>tabular</literal> entry that spans several columns.
The first argument <replaceable>numcols</replaceable> gives the number of columns to span.
The second argument <replaceable>cols</replaceable> specifies the formatting of the entry,
with <literal>c</literal> for centered, <literal>l</literal> for flush left, or <literal>r</literal> for
flush right.  The third argument <replaceable>text</replaceable> gives the contents of that
entry.
</para>
<para>In this example, in the first row, the second and third columns are
spanned by the single heading &#8216;<literal>Name</literal>&#8217;.
</para>
<screen>\begin{tabular}{lccl} 
  \textit{ID}       &amp;\multicolumn{2}{c}{\textit{Name}} &amp;\textit{Age} \\ \hline % row one 
  978-0-393-03701-2 &amp;O'Brian &amp;Patrick                  &amp;55           \\        % row two 
    ...
\end{tabular}
</screen>
<para>What counts as a column is:&#160;the column format specifier for the
<literal>array</literal> or <literal>tabular</literal> environment is broken into parts, where
each part (except the first) begins with <literal>l</literal>, <literal>c</literal>, <literal>r</literal>,
or&#160;<literal>p</literal>.  So from <literal>\begin{tabular}{|r|ccp{1.5in}|}</literal>
the parts are <literal>|r|</literal>, <literal>c</literal>, <literal>c</literal>,
and&#160;<literal>p{1.5in}|</literal>.
</para>
<para>The <replaceable>cols</replaceable> argument overrides the <literal>array</literal> or <literal>tabular</literal>
environment&#8217;s intercolumn area default adjoining this multicolumn
entry. To affect that area, this argument can contain vertical bars
<literal>|</literal> indicating the placement of vertical rules, and <literal>@{...}</literal>
expressions.  Thus if <replaceable>cols</replaceable> is &#8216;<literal>|c|</literal>&#8217; then this multicolumn
entry will be centered and a vertical rule will come in the intercolumn
area before it and after it.  This table details the exact behavior.
</para>
<screen>\begin{tabular}{|cc|c|c|}
  \multicolumn{1}{r}{w}       % entry one
    &amp;\multicolumn{1}{|r|}{x}  % entry two 
    &amp;\multicolumn{1}{|r}{y}   % entry three
    &amp;z                        % entry four
\end{tabular}
</screen>
<para>Before the first entry the output will not have a vertical rule because
the <literal>\multicolumn</literal> has the <replaceable>cols</replaceable> specifier &#8216;<literal>r</literal>&#8217; with no
initial vertical bar.  Between entry one and entry two there will be a
vertical rule; although the first <replaceable>cols</replaceable> does not have an ending
vertical bar, the second <replaceable>cols</replaceable> does have a starting one.  Between
entry two and entry three there is a single vertical rule; despite that
the <replaceable>cols</replaceable> in both of the surrounding <literal>multicolumn</literal>&#8217;s call for
a vertical rule, you only get one rule.  Between entry three and entry
four there is no vertical rule; the default calls for one but the
<replaceable>cols</replaceable> in the entry three <literal>\multicolumn</literal> leaves it out, and
that takes precedence.  Finally, following entry four there is a
vertical rule because of the default.
</para>
<para>The number of spanned columns <replaceable>numcols</replaceable> can be 1.  Besides giving
the ability to change the horizontal alignment, this also is useful to
override for one row the <literal>tabular</literal> definition&#8217;s default intercolumn
area specification, including the placement of vertical rules.
</para>
<para>In the example below, in the <literal>tabular</literal> definition the first column
is specified to default to left justified but in the first row the entry
is centered with <literal>\multicolumn{1}{c}{\textsc{Period}}</literal>.
Also in the first row, the second and third columns are spanned by a
single entry with <literal>\multicolumn{2}{c}{\textsc{Span}}</literal>,
overriding the specification to center those two columns on the page
range en-dash.
</para>
<screen>\begin{tabular}{l|r@{--}l} 
  \multicolumn{1}{c}{\textsc{Period}}  
    &amp;multicolumn{2}{c}{\textsc{Span}} \\ \hline
  Baroque          &amp;1600           &amp;1760         \\
  Classical        &amp;1730           &amp;1820         \\
  Romantic         &amp;1780           &amp;1910         \\
  Impressionistic  &amp;1875           &amp;1925
\end{tabular}
</screen>
<para>Note that although the <literal>tabular</literal> specification by default puts a
vertical rule between the first and second columns, because there is no
vertical bar in the <replaceable>cols</replaceable> of either of the first row&#8217;s
<literal>\multicolumn</literal> commands, no rule appears in the first row.
</para>

</sect2>
<sect2 label="8.23.2" id="_005cvline">
<title><literal>\vline</literal></title>

<indexterm role="fn"><primary>\vline</primary></indexterm>
<para>Draw a vertical line in a <literal>tabular</literal> or <literal>array</literal> environment
extending the full height and depth of an entry&#8217;s row.  Can also be
used in an @-expression, although its synonym vertical
bar&#160;<literal>|</literal> is more common.  This command is rarely used in the
body of a table; typically a table&#8217;s vertical lines are specified in
<literal>tabular</literal>&#8217;s <replaceable>cols</replaceable> argument and overridden as needed with
<literal>\multicolumn</literal>.
</para>
<para>This example illustrates some pitfalls.  In the first line&#8217;s second
entry the <literal>\hfill</literal> moves the <literal>\vline</literal> to the left edge of the
cell.  But that is different than putting it halfway between the two
columns, so in that row between the first and second columns there are
two vertical rules, with the one from the <literal>{c|cc}</literal> specifier
coming before the one produced by the <literal>\vline\hfill</literal>.  In contrast,
the first line&#8217;s third entry shows the usual way to put a vertical bar
between two columns.  In the second line, the <literal>ghi</literal> is the widest
entry in its column so in the <literal>\vline\hfill</literal> the <literal>\hfill</literal> has
no effect and the vertical line in that entry appears immediately next
to the <literal>g</literal>, with no whitespace.
</para>
<screen>\begin{tabular}{c|cc}
  x   &amp;\vline\hfill y   &amp;\multicolumn{1}{|r}{z} \\  
  abc &amp;def &amp;\vline\hfill ghi 
\end{tabular}
</screen>

</sect2>
<sect2 label="8.23.3" id="_005ccline">
<title><literal>\cline</literal></title>

<indexterm role="fn"><primary>\cline</primary></indexterm>

<para>Synopsis:
</para>
<screen>\cline{<replaceable>i</replaceable>-<replaceable>j</replaceable>}
</screen>
<para>Draw a horizontal rule in an <literal>array</literal> or <literal>tabular</literal> environment
beginning in column <replaceable>i</replaceable> and ending in column <replaceable>j</replaceable>. The
dash&#160;<literal>-</literal> must appear in the mandatory argument. To span a
single column use the number twice.
</para>
<para>This example puts two horizontal lines between the first and second
rows, one line in the first column only, and the other spanning the
third and fourth columns.  The two lines are side-by-side, at the same
height.
</para>
<screen>\begin{tabular}{llrr} 
  a &amp;b &amp;c &amp;d \\ \cline{1-1} \cline{3-4} 
  e &amp;f &amp;g &amp;h 
\end{tabular}
</screen>

</sect2>
<sect2 label="8.23.4" id="_005chline">
<title><literal>\hline</literal></title>

<indexterm role="fn"><primary>\hline</primary></indexterm>

<para>Draws a horizontal line the width of the enclosing <literal>tabular</literal> or
<literal>array</literal> environment.  It&#8217;s most commonly used to draw a line at the
top, bottom, and between the rows of a table.
</para>
<para>In this example the top of the table has two horizontal rules, one above
the other, that span both columns.  The bottom of the table has a single
rule spanning both columns.  Because of the <literal>\hline</literal>, the
<literal>tabular</literal> second row&#8217;s line ending double backslash&#160;<literal>\\</literal>
is required.
</para>
<screen>\begin{tabular}{ll} \hline\hline
  Baseball   &amp;Red Sox  \\
  Basketball &amp;Celtics  \\ \hline
\end{tabular}
</screen>

</sect2>
</sect1>
<sect1 label="8.24" id="thebibliography">
<title><literal>thebibliography</literal></title>

<indexterm role="fn"><primary>environment, <literal>thebibliography</literal></primary></indexterm>
<indexterm role="fn"><primary><literal>thebibliography</literal> environment</primary></indexterm>
<indexterm role="cp"><primary>bibliography, creating (manually)</primary></indexterm>

<para>Synopsis:
</para>
<screen>\begin{thebibliography}{<replaceable>widest-label</replaceable>}
\bibitem[<replaceable>label</replaceable>]{<replaceable>cite_key}</replaceable>
...
\end{thebibliography}
</screen>
<para>The <literal>thebibliography</literal> environment produces a bibliography or
reference list.
</para>
<para>In the <literal>article</literal> class, this reference list is labelled
&#8220;References&#8221;; in the <literal>report</literal> class, it is labelled
&#8220;Bibliography&#8221;.  You can change the label (in the standard classes)
by redefining the command <literal>\refname</literal>.  For instance, this
eliminates it entirely:
</para>
<screen>\renewcommand{\refname}{}
</screen>
<para>The mandatory <replaceable>widest-label</replaceable> argument is text that, when typeset,
is as wide as the widest item label produced by the <literal>\bibitem</literal>
commands.  It is typically given as <literal>9</literal> for bibliographies with
less than 10 references, <literal>99</literal> for ones with less than 100, etc.
</para>


<sect2 label="8.24.1" id="_005cbibitem">
<title><literal>\bibitem</literal></title>

<indexterm role="fn"><primary>\bibitem</primary></indexterm>

<para>Synopsis:
</para>
<screen>\bibitem[<replaceable>label</replaceable>]{<replaceable>cite_key</replaceable>}
</screen>
<para>The <literal>\bibitem</literal> command generates an entry labelled by <replaceable>label</replaceable>.
If the <replaceable>label</replaceable> argument is missing, a number is automatically
generated using the <literal>enumi</literal> counter.  The <replaceable>cite_key</replaceable> is a
<indexterm role="cp"><primary>citation key</primary></indexterm>
<firstterm>citation key</firstterm> consisting in any sequence of
letters, numbers, and punctuation symbols not containing a comma.
</para>
<para>This command writes an entry to the <filename>.aux</filename> file containing the
item&#8217;s <replaceable>cite_key</replaceable> and <replaceable>label</replaceable>.  When the <filename>.aux</filename> file is
read by the <literal>\begin{document}</literal> command, the item&#8217;s <replaceable>label</replaceable> is
associated with <literal>cite_key</literal>, causing references to <replaceable>cite_key</replaceable>
with a <literal>\cite</literal> command (see <link linkend="_005ccite">\cite</link>) to produce the associated
<replaceable>label</replaceable>.
</para>

</sect2>
<sect2 label="8.24.2" id="_005ccite">
<title><literal>\cite</literal></title>

<indexterm role="fn"><primary>\cite</primary></indexterm>

<para>Synopsis:
</para>
<screen>\cite[<replaceable>subcite</replaceable>]{<replaceable>keys</replaceable>}
</screen>
<para>The <replaceable>keys</replaceable> argument is a list of one or more citation keys
(see <link linkend="_005cbibitem">\bibitem</link>), separated by commas.  This command generates an
in-text citation to the references associated with <replaceable>keys</replaceable> by entries
in the <filename>.aux</filename> file.
</para>
<para>The text of the optional <replaceable>subcite</replaceable> argument appears after the
citation.  For example, <literal>\cite[p.~314]{knuth}</literal> might produce
&#8216;<literal>[Knuth, p.&#160;314]</literal>&#8217;.
</para>

</sect2>
<sect2 label="8.24.3" id="_005cnocite">
<title><literal>\nocite</literal></title>

<indexterm role="fn"><primary>\nocite</primary></indexterm>

<para>Synopsis:
</para>
<screen><literal>\nocite{<replaceable>keys</replaceable>}</literal>
</screen>
<para>The <literal>\nocite</literal> command produces no text, but writes <replaceable>keys</replaceable>,
which is a list of one or more citation keys, to the <filename>.aux</filename> file.
</para>

</sect2>
<sect2 label="8.24.4" id="Using-BibTeX">
<title>Using Bib&tex;</title>

<indexterm role="cp"><primary>using Bib&tex;</primary></indexterm>
<indexterm role="cp"><primary>bib&tex;, using</primary></indexterm>
<indexterm role="cp"><primary>bibliography, creating (automatically)</primary></indexterm>
<indexterm role="fn"><primary>\bibliographystyle</primary></indexterm>
<indexterm role="fn"><primary>\bibliography</primary></indexterm>

<para>If you use the Bib&tex; program by Oren Patashnik (highly
recommended if you need a bibliography of more than a couple of
titles) to maintain your bibliography, you don&#8217;t use the
<literal>thebibliography</literal> environment (see <link linkend="thebibliography">thebibliography</link>). Instead,
you include the lines
</para>
<screen>\bibliographystyle{<replaceable>bibstyle</replaceable>}
\bibliography{<replaceable>bibfile1</replaceable>,<replaceable>bibfile2</replaceable>}
</screen>
<para>The <literal>\bibliographystyle</literal> command does not produce any output of
its own.  Rather, it defines the style in which the bibliography will
be produced: <replaceable>bibstyle</replaceable> refers to a file
<replaceable>bibstyle</replaceable><filename>.bst</filename>, which defines how your citations will look.
The standard <replaceable>bibstyle</replaceable> names distributed with Bib&tex; are:
</para>
<variablelist><varlistentry><term><literal>alpha</literal>
</term><listitem><para>Sorted alphabetically. Labels are formed from name of author and year of
publication.
</para></listitem></varlistentry><varlistentry><term><literal>plain</literal>
</term><listitem><para>Sorted alphabetically. Labels are numeric.
</para></listitem></varlistentry><varlistentry><term><literal>unsrt</literal>
</term><listitem><para>Like <literal>plain</literal>, but entries are in order of citation.
</para></listitem></varlistentry><varlistentry><term><literal>abbrv</literal>
</term><listitem><para>Like <literal>plain</literal>, but more compact labels.
</para></listitem></varlistentry></variablelist>
<para>In addition, numerous other Bib&tex; style files exist tailored to
the demands of various publications.  See
<ulink url="http://mirror.ctan.org/biblio/bibtex/contrib">http://mirror.ctan.org/biblio/bibtex/contrib</ulink>.
</para>
<para>The <literal>\bibliography</literal> command is what actually produces the
bibliography.  The argument to <literal>\bibliography</literal> refers to files
named <filename><replaceable>bibfile1</replaceable>.bib</filename>, <filename><replaceable>bibfile2</replaceable>.bib</filename>, &#8230;,
which should contain your database in
Bib&tex; format.  Only the entries referred to via <literal>\cite</literal> and
<literal>\nocite</literal> will be listed in the bibliography.
</para>

</sect2>
</sect1>
<sect1 label="8.25" id="theorem">
<title><literal>theorem</literal></title>

<indexterm role="fn"><primary>environment, <literal>theorem</literal></primary></indexterm>
<indexterm role="fn"><primary><literal>theorem</literal> environment</primary></indexterm>
<indexterm role="cp"><primary>theorems, typesetting</primary></indexterm>

<para>Synopsis:
</para>
<screen>\begin{theorem}
<replaceable>theorem-text</replaceable>
\end{theorem}
</screen>
<para>The <literal>theorem</literal> environment produces &#8220;Theorem <replaceable>n</replaceable>&#8221; in
boldface followed by <replaceable>theorem-text</replaceable>, where the numbering
possibilities for <replaceable>n</replaceable> are described under <literal>\newtheorem</literal>
(see <link linkend="_005cnewtheorem">\newtheorem</link>).
</para>

</sect1>
<sect1 label="8.26" id="titlepage">
<title><literal>titlepage</literal></title>

<indexterm role="fn"><primary>environment, <literal>titlepage</literal></primary></indexterm>
<indexterm role="fn"><primary><literal>titlepage</literal> environment</primary></indexterm>
<indexterm role="cp"><primary>making a title page</primary></indexterm>
<indexterm role="cp"><primary>title pages, creating</primary></indexterm>

<para>Synopsis:
</para>
<screen>\begin{titlepage}
  ... text and spacing ...
\end{titlepage}
</screen>
<para>Create a title page, a page with no printed page number or heading.  The
following page will be numbered page one.
</para>
<para>To instead produce a standard title page without a <literal>titlepage</literal>
environment you can use <literal>\maketitle</literal> (see <link linkend="_005cmaketitle">\maketitle</link>).
</para>
<para>Notice in this example that all formatting, including vertical spacing,
is left to the author.
</para>
<screen>\begin{titlepage}
\vspace*{\stretch{1}}
\begin{center}
  {\huge\bfseries Thesis \\[1ex] 
                  title}                  \\[6.5ex]
  {\large\bfseries Author name}           \\
  \vspace{4ex}
  Thesis  submitted to                    \\[5pt]
  \textit{University name}                \\[2cm]
  in partial fulfilment for the award of the degree of \\[2cm]
  \textsc{\Large Doctor of Philosophy}    \\[2ex]
  \textsc{\large Mathematics}             \\[12ex]
  \vfill
  Department of Mathematics               \\
  Address                                 \\
  \vfill
  \today
\end{center}
\vspace{\stretch{2}}
\end{titlepage}
</screen>

</sect1>
<sect1 label="8.27" id="verbatim">
<title><literal>verbatim</literal></title>

<indexterm role="fn"><primary>environment, <literal>verbatim</literal></primary></indexterm>
<indexterm role="fn"><primary><literal>verbatim</literal> environment</primary></indexterm>
<indexterm role="cp"><primary>verbatim text</primary></indexterm>
<indexterm role="cp"><primary>simulating typed text</primary></indexterm>
<indexterm role="cp"><primary>typed text, simulating</primary></indexterm>
<indexterm role="cp"><primary>code, typesetting</primary></indexterm>
<indexterm role="cp"><primary>computer programs, typesetting</primary></indexterm>

<para>Synopsis:
</para>
<screen>\begin{verbatim}
<replaceable>literal-text</replaceable>
\end{verbatim}
</screen>
<para>The <literal>verbatim</literal> environment is a paragraph-making environment in
which &latex; produces exactly what you type in; for instance the
<literal>\</literal> character produces a printed &#8216;<literal>\</literal>&#8217;.  It turns &latex;
into a typewriter with carriage returns and blanks having the same
effect that they would on a typewriter.
</para>
<para>The <literal>verbatim</literal> uses a monospaced typewriter-like font (<literal>\tt</literal>).
</para>

<sect2 label="8.27.1" id="_005cverb">
<title><literal>\verb</literal></title>

<indexterm role="fn"><primary>\verb</primary></indexterm>
<indexterm role="cp"><primary>verbatim text, inline</primary></indexterm>

<para>Synopsis:
</para>
<screen>\verb<replaceable>char</replaceable><replaceable>literal-text</replaceable><replaceable>char</replaceable>
\verb*<replaceable>char</replaceable><replaceable>literal-text</replaceable><replaceable>char</replaceable>
</screen>
<para>The <literal>\verb</literal> command typesets <replaceable>literal-text</replaceable> as it is input,
including special characters and spaces, using the typewriter
(<literal>\tt</literal>) font.  No spaces are allowed between <literal>\verb</literal> or
<literal>\verb*</literal> and the delimiter <replaceable>char</replaceable>, which begins and ends the
verbatim text.  The delimiter must not appear in <replaceable>literal-text</replaceable>.
</para>
<indexterm role="cp"><primary>visible space</primary></indexterm>
<para>The <literal>*</literal>-form differs only in that spaces are printed with a
&#8220;visible space&#8221; character.
</para>

</sect2>
</sect1>
<sect1 label="8.28" id="verse">
<title><literal>verse</literal></title>

<indexterm role="fn"><primary>environment, <literal>verse</literal></primary></indexterm>
<indexterm role="fn"><primary><literal>verse</literal> environment</primary></indexterm>
<indexterm role="cp"><primary>poetry, an environment for</primary></indexterm>

<para>Synopsis:
</para>
<screen>\begin{verse}
<replaceable>line1</replaceable> \\
<replaceable>line2</replaceable> \\
...
\end{verse}
</screen>
<para>The <literal>verse</literal> environment is designed for poetry, though you may find
other uses for it.
</para>
<indexterm role="fn"><primary>\\ for <literal>verse</literal></primary></indexterm>
<para>The margins are indented on the left and the right, paragraphs are not
indented, and the text is not justified.  Separate the lines of each
stanza with <literal>\\</literal>, and use one or more blank lines to separate the
stanzas.
</para>

</sect1>
</chapter>
<chapter label="9" id="Line-breaking">
<title>Line breaking</title>

<indexterm role="cp"><primary>line breaking</primary></indexterm>
<indexterm role="cp"><primary>breaking lines</primary></indexterm>

<para>The first thing &latex; does when processing ordinary text is to
translate your input file into a sequence of glyphs and spaces.  To
produce a printed document, this sequence must be broken into lines
(and these lines must be broken into pages).
</para>
<para>&latex; usually does the line (and page) breaking in the text body for
you but in some environments you manually force line breaks.
</para>


<sect1 label="9.1" id="_005c_005c">
<title><literal>\\</literal></title>

<indexterm role="fn"><primary>\\ force line break</primary></indexterm>
<indexterm role="cp"><primary>new line, starting</primary></indexterm>
<indexterm role="cp"><primary>line break, forcing</primary></indexterm>

<para>Synopsis:
</para>
<screen>\\[<replaceable>morespace</replaceable>]
</screen>
<para>or 
</para>
<screen>\\*[<replaceable>morespace</replaceable>]
</screen>
<para>Start a new line.  The optional argument <replaceable>morespace</replaceable> specifies extra
vertical space to be insert before the next line.  This can be a
negative length.  The text before the break is set at its normal length,
that is, it is not stretched to fill out the line width.
</para>
<para>Explicit line breaks in the text body are unusual in &latex;.  In
particular, to start a new paragraph instead leave a blank line.  This
command is mostly used outside of the main flow of text such as in
a <literal>tabular</literal> or <literal>array</literal> environment.
</para>
<para>Under ordinary circumstances (e.g., outside of a <literal>p{...}</literal> column
in a <literal>tabular</literal> environment) the <literal>\newline</literal> command is a synonym for
<literal>\\</literal> (see <link linkend="_005cnewline">\newline</link>).
</para>
<para>In addition to starting a new line, the starred form <literal>\\*</literal> tells
&latex; not to start a new page between the two lines, by issuing a
<literal>\nobreak</literal>.
</para>
<screen>\title{My story: \\[0.25in]
       a tale of woe}
</screen>

</sect1>
<sect1 label="9.2" id="_005cobeycr-_0026-_005crestorecr">
<title><literal>\obeycr</literal> &amp; <literal>\restorecr</literal></title>

<indexterm role="fn"><primary>\obeycr</primary></indexterm>
<indexterm role="fn"><primary>\restorecr</primary></indexterm>
<indexterm role="cp"><primary>new line, output as input</primary></indexterm>

<para>The <literal>\obeycr</literal> command makes a return in the input file
(&#8216;<literal>^^M</literal>&#8217;, internally) the same as <literal>\\</literal> (followed by
<literal>\relax</literal>).  So each new line in the input will also be a new line
in the output.
</para>
<para><literal>\restorecr</literal> restores normal line-breaking behavior.
</para>

</sect1>
<sect1 label="9.3" id="_005cnewline">
<title><literal>\newline</literal></title>

<indexterm role="fn"><primary>\newline</primary></indexterm>
<indexterm role="cp"><primary>new line, starting (paragraph mode)</primary></indexterm>

<para>In ordinary text this is equivalent to double-backslash (see <link linkend="_005c_005c">\\</link>); it
breaks a line, with no stretching of the text before it.
</para>
<para>Inside a <literal>tabular</literal> or <literal>array</literal> environment, in a column with a
specifier producing a paragraph box, like typically <literal>p{...}</literal>,
<literal>\newline</literal> will insert a line break inside of the column, that is,
it does not break the entire row.  To break the entire row use <literal>\\</literal>
or its equivalent <literal>\tabularnewline</literal>.
</para>
<para>This will print &#8216;<literal>Name:</literal>&#8217; and &#8216;<literal>Address:</literal>&#8217; as two lines in a
single cell of the table.
</para>
<screen>\begin{tabular}{p{1in}{\hspace{2in}}p{1in}}
  Name: \newline Address: &amp;Date: \\ \hline
\end{tabular}
</screen>
<para>The &#8216;<literal>Date:</literal>&#8217; will be baseline-aligned with &#8216;<literal>Name:</literal>&#8217;.
</para>

</sect1>
<sect1 label="9.4" id="_005c_002d-_0028hyphenation_0029">
<title><literal>\-</literal> (discretionary hyphen)</title>

<indexterm role="fn"><primary>\- (hyphenation)</primary></indexterm>
<indexterm role="cp"><primary>hyphenation, forcing</primary></indexterm>

<para>The <literal>\-</literal> command tells &latex; that it may hyphenate the word at
that point.  &latex; is pretty good at hyphenating, and usually finds
most of the correct hyphenation points, while almost never using an
incorrect one.  The <literal>\-</literal> command is used for the exceptional
cases.
</para>
<para>When you insert <literal>\-</literal> 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.
</para>
</sect1>
<sect1 label="9.5" id="_005cdiscretionary">
<title><literal>\discretionary</literal> (generalized hyphenation point)</title>
<indexterm role="cp"><primary>hyphenation, discretionary</primary></indexterm>
<indexterm role="cp"><primary>discretionary hyphenation</primary></indexterm>

<para>Synopsis:
</para>
<screen>\discretionary{<replaceable>pre-break-text</replaceable>}{<replaceable>post-break-text</replaceable>}{<replaceable>no-break-text</replaceable>}
</screen>
<!-- xxx TODO, complete this node, see LaTeX-fr -->

</sect1>
<sect1 label="9.6" id="_005cfussy">
<title><literal>\fussy</literal></title>

<indexterm role="fn"><primary>\fussy</primary></indexterm>

<para>The declaration <literal>\fussy</literal> (which is the default) makes &tex;
picky about line breaking.  This usually avoids too much space between
words, at the cost of an occasional overfull box.
</para>
<para>This command cancels the effect of a previous <literal>\sloppy</literal> command
(see <link linkend="_005csloppy">\sloppy</link>).
</para>

</sect1>
<sect1 label="9.7" id="_005csloppy">
<title><literal>\sloppy</literal></title>

<indexterm role="fn"><primary>\sloppy</primary></indexterm>

<para>The declaration <literal>\sloppy</literal> makes &tex; less fussy about line
breaking. This will avoid overfull boxes, at the cost of loose
interword spacing.
</para>
<para>Lasts until a <literal>\fussy</literal> command is issued (see <link linkend="_005cfussy">\fussy</link>).
</para>

</sect1>
<sect1 label="9.8" id="_005chyphenation">
<title><literal>\hyphenation</literal></title>

<indexterm role="fn"><primary>\hyphenation</primary></indexterm>
<indexterm role="cp"><primary>hyphenation, defining</primary></indexterm>

<para>Synopsis:
</para>
<screen>\hyphenation{<replaceable>word-one</replaceable> <replaceable>word-two</replaceable>}
</screen>
<para>The <literal>\hyphenation</literal> command declares allowed hyphenation points
with a <literal>-</literal> character in the given words.  The words are separated
by spaces.  &tex; will only hyphenate if the word matches exactly, no
inflections are tried.  Multiple <literal>\hyphenation</literal> commands
accumulate.  Some examples (the default &tex; hyphenation patterns
misses the hyphenations in these words):
</para>
<screen>\hyphenation{ap-pen-dix col-umns data-base data-bases}
</screen>

</sect1>
<sect1 label="9.9" id="_005clinebreak-_0026-_005cnolinebreak">
<title><literal>\linebreak</literal> &amp; <literal>\nolinebreak</literal></title>

<indexterm role="fn"><primary>\linebreak</primary></indexterm>
<indexterm role="fn"><primary>\nolinebreak</primary></indexterm>
<indexterm role="cp"><primary>line breaks, forcing</primary></indexterm>
<indexterm role="cp"><primary>line breaks, preventing</primary></indexterm>

<para>Synopses:
</para>
<screen>\linebreak[<replaceable>priority</replaceable>]
\nolinebreak[<replaceable>priority</replaceable>]
</screen>
<para>By default, the <literal>\linebreak</literal> (<literal>\nolinebreak</literal>) command forces
(prevents) a line break at the current position.  For
<literal>\linebreak</literal>, the spaces in the line are stretched out so that it
extends to the right margin as usual.
</para>
<para>With the optional argument <replaceable>priority</replaceable>, you can convert the command
from a demand to a request.  The <replaceable>priority</replaceable> must be a number from
0 to&#160;4.  The higher the number, the more insistent the request.
</para>

</sect1>
</chapter>
<chapter label="10" id="Page-breaking">
<title>Page breaking</title>

<indexterm role="cp"><primary>page breaking</primary></indexterm>
<indexterm role="cp"><primary>breaking pages</primary></indexterm>

<para>&latex; starts new pages asynchronously, when enough material has
accumulated to fill up a page.  Usually this happens automatically,
but sometimes you may want to influence the breaks.
</para>


<sect1 label="10.1" id="_005ccleardoublepage">
<title><literal>\cleardoublepage</literal></title>

<indexterm role="fn"><primary>\cleardoublepage</primary></indexterm>
<indexterm role="cp"><primary>starting on a right-hand page</primary></indexterm>

<para>The <literal>\cleardoublepage</literal> command ends the current page and causes all
the pending floating figures and tables that have so far appeared in the
input to be printed.  In a two-sided printing style, it also makes the
next page a right-hand (odd-numbered) page, producing a blank page if
necessary.
</para>

</sect1>
<sect1 label="10.2" id="_005cclearpage">
<title><literal>\clearpage</literal></title>

<indexterm role="fn"><primary>\clearpage</primary></indexterm>
<indexterm role="cp"><primary>flushing floats and starting a page</primary></indexterm>
<indexterm role="cp"><primary>starting a new page and clearing floats</primary></indexterm>

<para>The <literal>\clearpage</literal> command ends the current page and causes all the
pending floating figures and tables that have so far appeared in the
input to be printed.
</para>

</sect1>
<sect1 label="10.3" id="_005cnewpage">
<title><literal>\newpage</literal></title>

<indexterm role="fn"><primary>\newpage</primary></indexterm>
<indexterm role="cp"><primary>new page, starting</primary></indexterm>
<indexterm role="cp"><primary>starting a new page</primary></indexterm>

<para>The <literal>\newpage</literal> command ends the current page, but does not clear
floats (see <link linkend="_005cclearpage">\clearpage</link>).
</para>

</sect1>
<sect1 label="10.4" id="_005cenlargethispage">
<title><literal>\enlargethispage</literal></title>

<indexterm role="fn"><primary>\enlargethispage</primary></indexterm>
<indexterm role="cp"><primary>enlarge current page</primary></indexterm>

<para><literal>\enlargethispage{size}</literal>
</para>
<para><literal>\enlargethispage*{size}</literal>
</para>
<para>Enlarge the <literal>\textheight</literal> for the current page by the specified
amount; e.g., <literal>\enlargethispage{\baselineskip}</literal> will allow one
additional line.
</para>
<para>The starred form tries to squeeze the material together on the page as
much as possible. This is normally used together with an explicit
<literal>\pagebreak</literal>.
</para>

</sect1>
<sect1 label="10.5" id="_005cpagebreak-_0026-_005cnopagebreak">
<title><literal>\pagebreak</literal> &amp; <literal>\nopagebreak</literal></title>

<indexterm role="fn"><primary>\pagebreak</primary></indexterm>
<indexterm role="fn"><primary>\nopagebreak</primary></indexterm>
<indexterm role="cp"><primary>page break, forcing</primary></indexterm>
<indexterm role="cp"><primary>page break, preventing</primary></indexterm>

<para>Synopses:
</para>
<screen>\pagebreak[<replaceable>priority</replaceable>]
\nopagebreak[<replaceable>priority</replaceable>]
</screen>
<para>By default, the <literal>\pagebreak</literal> (<literal>\nopagebreak</literal>) command forces
(prevents) a page break at the current position.  With
<literal>\pagebreak</literal>, the vertical space on the page is stretched out
where possible so that it extends to the normal bottom margin.
</para>
<para>With the optional argument <replaceable>priority</replaceable>, you can convert the
<literal>\pagebreak</literal> command from a demand to a request.  The number must
be a number from 0 to&#160;4.  The higher the number, the more
insistent the request is.
</para>

</sect1>
</chapter>
<chapter label="11" id="Footnotes">
<title>Footnotes</title>

<indexterm role="cp"><primary>footnotes, creating</primary></indexterm>

<para>Place a numbered footnote at the bottom of the current page, as here.
</para>
<screen>No&#235;l Coward quipped that having to read a footnote is like having
to go downstairs to answer the door, while in the midst of making
love.\footnote{I wouldn't know, I don't read footnotes.}
</screen>
<para>You can place multiple footnotes on a page. If the text becomes too long
it will flow to the next page.
</para>
<para>You can also produce footnotes by combining the <literal>\footnotemark</literal> and
the <literal>\footnotetext</literal> commands, which is useful in special
circumstances.
</para>
<para>To make bibliographic references come out as footnotes you need to
include a bibliographic style with that behavior.
</para>


<sect1 label="11.1" id="_005cfootnote">
<title><literal>\footnote</literal></title>

<indexterm role="fn"><primary>\footnote</primary></indexterm>

<para>Synopsis:
</para>
<screen>\footnote[<replaceable>number</replaceable>]{<replaceable>text</replaceable>}
</screen>
<para>Place a numbered footnote <replaceable>text</replaceable> at the bottom of the current page.
</para>
<screen>There are over a thousand footnotes in Gibbon's 
\textit{Decline and Fall of the Roman Empire}.\footnote{After
reading an early version with endnotes David Hume complained, 
``One is also plagued with his Notes, according to the present Method 
of printing the Book'' and suggested that they ``only to be printed 
at the Margin or the Bottom of the Page.''}
</screen>
<para>The optional argument <replaceable>number</replaceable> allows you to specify the footnote
number.  If you use this option then the footnote number counter is not
incremented, and if you do not use it then the counter is incremented.
</para>
<indexterm role="cp"><primary>footnotes, symbols instead of numbers</primary></indexterm>
<indexterm role="fn"><primary>\fnsymbol, and footnotes</primary></indexterm>
<indexterm role="fn"><primary>\@fnsymbol</primary></indexterm>
<para>Change how &latex; shows the footnote counter with something like
<literal>\renewcommand{\thefootnote}{\fnsymbol{footnote}}</literal>, which
uses a sequence of symbols (see <link linkend="_005calph-_005cAlph-_005carabic-_005croman-_005cRoman-_005cfnsymbol">\alph \Alph \arabic \roman \Roman
\fnsymbol</link>).  To make this change global put that in the preamble.  If
you make the change local then you may want to reset the counter with
<literal>\setcounter{footnote}{0}</literal>.  By default &latex; uses arabic
numbers.
</para>
<para>&latex;&#8217;s default puts many restrictions on where you can use a
<literal>\footnote</literal>; for instance, you cannot use it in an argument to a
sectioning command such as <literal>\chapter</literal> (it can only be used in outer
paragraph mode).  There are some workarounds; see following sections.
<!-- xx mention packages that fix this -->
</para>
<indexterm role="cp"><primary>Footnotes, in a minipage</primary></indexterm>
<indexterm role="cp"><primary>mpfootnote counter</primary></indexterm>
<para>In a <literal>minipage</literal> environment the <literal>\footnote</literal>
command uses the <literal>mpfootnote</literal> counter instead of the
<literal>footnote</literal> counter, so they are numbered independently.  They are
shown at the bottom of the environment, not at the bottom of the page.
And by default they are shown alphabetically. See <link linkend="minipage">minipage</link>.
</para>

</sect1>
<sect1 label="11.2" id="_005cfootnotemark">
<title><literal>\footnotemark</literal></title>

<indexterm role="fn"><primary>\footnotemark</primary></indexterm>

<para>Synopsis, one of:
</para>
<screen>\footnotemark
\footnotemark[<replaceable>number</replaceable>]
</screen>
<para>Put the current footnote number in the
text. (See&#160;<link linkend="_005cfootnotetext">\footnotetext</link> for giving the text of the footnote
separately.)  The version with the optional argument <replaceable>number</replaceable> uses
that number to determine the mark printed. This command can be used in
inner paragraph mode.
</para>
<para>This example gives the same institutional affiliation to both the first
and third authors (<literal>\thanks</literal> is a version of <literal>footnote</literal>).
</para>
<screen>\title{A Treatise on the Binomial Theorem}
\author{J Moriarty\thanks{University of Leeds} 
  \and A C Doyle\thanks{Durham University} 
  \and S Holmes\footnotemark[1]}
\begin{document}
\maketitle
</screen>
<para>If you use <literal>\footnotemark</literal> without the optional argument then it
increments the footnote counter but if you use the optional <replaceable>number</replaceable>
then it does not. This produces several consecutive footnote markers
referring to the same footnote.
</para>
<screen>The first theorem\footnote{Due to Gauss.} 
and the second theorem\footnotemark[\value{footnote}] 
and the third theorem.\footnotemark[\value{footnote}]
</screen>

</sect1>
<sect1 label="11.3" id="_005cfootnotetext">
<title><literal>\footnotetext</literal></title>

<indexterm role="fn"><primary>\footnotetext</primary></indexterm>

<para>Synopsis, one of:
</para>
<screen>\footnotetext{<replaceable>text</replaceable>}
\footnotetext[<replaceable>number</replaceable>]{<replaceable>text</replaceable>}
</screen>
<para>Place <replaceable>text</replaceable> at the bottom of the page as a footnote.  This command
can come anywhere after the <literal>\footnotemark</literal> command.  The optional
argument <replaceable>number</replaceable> changes the displayed footnote number.  The
<literal>\footnotetext</literal> command must appear in outer paragraph mode.
</para>

</sect1>
<sect1 label="11.4" id="Footnotes-in-a-table">
<title>Footnotes in a table</title>

<indexterm role="cp"><primary>Footnotes, in a table</primary></indexterm>

<para>Inside a <literal>table</literal> environment the <literal>\footnote</literal> command does not
work.  For instance, if the code below appears on its own then the
footnote simply disappears; there is a footnote mark in the table cell
but nothing is set at the bottom of the page.
</para>
<screen>\begin{center}
     \begin{tabular}{l|l}
     \textsc{Ship}  &amp;\textsc{Book} \\ \hline 
     \textit{HMS Sophie}     &amp;Master and Commander  \\ 
     \textit{HMS Polychrest} &amp;Post Captain  \\  
     \textit{HMS Lively}     &amp;Post Captain \\
     \textit{HMS Surprise}   &amp;A number of books\footnote{Starting with
                                HMS Surprise.}
     \end{tabular}
\end{center}
</screen>
<para>The solution is to surround the <literal>tabular</literal> environment with a
<literal>minipage</literal> environment, as here (see <link linkend="minipage">minipage</link>).
</para>
<screen>\begin{center}
  \begin{minipage}{.5\textwidth}
    ... tabular material ...
  \end{minipage}
\end{center}
</screen>
<para>The same technique will work inside a floating <literal>table</literal> environment
(see <link linkend="table">table</link>).  To get the footnote at the bottom of the page use the
<filename>tablefootnote</filename> package, as illustrated in this example.  If you
put <literal>\usepackage{tablefootnote}</literal> in the preamble and use the code
shown then the footnote appears at the bottom and is numbered in
sequence with other footnotes.
</para>
<screen>\begin{table}
  \centering
     \begin{tabular}{l|l}
     \textsc{Date}  &amp;\textsc{Campaign} \\ \hline 
     1862           &amp;Fort Donelson \\ 
     1863           &amp;Vicksburg     \\  
     1865           &amp;Army of Northern Virginia\footnote{Ending the war.}
     \end{tabular}
    \caption{Forces captured by US Grant}
\end{table}
</screen>

</sect1>
<sect1 label="11.5" id="Footnotes-in-section-headings">
<title>Footnotes in section headings</title>

<indexterm role="cp"><primary>footnotes, in section headings</primary></indexterm>
<indexterm role="cp"><primary>table of contents, avoiding footnotes</primary></indexterm>
<para>Putting a footnote in a section heading, as in:
</para>
<screen>\section{Full sets\protect\footnote{This material due to ...}}
</screen>
<indexterm role="cp"><primary>package, <literal>footmisc</literal></primary></indexterm>
<indexterm role="cp"><primary><literal>footmisc</literal> package</primary></indexterm>
<indexterm role="cp"><primary><literal>stable</literal> option to <literal>footmisc</literal> package</primary></indexterm>
<para>causes the footnote to appear at the bottom of the page where the
section starts, as usual, but also at the bottom of the table of
contents, where it is not likely to be desired.  To have it not appear
on the table of contents use the package <filename>footmisc</filename> with the
<literal>stable</literal> option.
</para>
<screen>\usepackage[stable]{footmisc}
...
\begin{document}
...
\section{Full sets\footnote{This material due to ...}}
</screen>
<para>Note that the <literal>\protect</literal> is gone; including it would cause the
footnote to reappear on the table of contents.
</para>

</sect1>
<sect1 label="11.6" id="Footnotes-of-footnotes">
<title>Footnotes of footnotes</title>

<para>Particularly in the humanities, authors can have multiple classes of
footnotes, including having footnotes of footnotes.  The package
<filename>bigfoot</filename> extends &latex;&#8217;s default footnote mechanism in many
ways, including allow these two, as in this example.
</para>
<screen>\usepackage{bigfoot}
\DeclareNewFootnote{Default}
\DeclareNewFootnote{from}[alph]   % create class \footnotefrom{}
 ...
\begin{document}
...
The third theorem is a partial converse of the 
second.\footnotefrom{First noted in Wilson.\footnote{Second edition only.}}
...
</screen>

</sect1>
<sect1 label="11.7" id="Multiple-reference-to-footnotes">
<title>Multiple references to footnotes</title>

<para>You can refer to a single footnote more than once.  This example
uses the package <filename>cleverref</filename>.
</para>
<!-- from SE user Jake http://tex.stackexchange.com/a/10116/339 -->
<screen>\usepackage{cleveref}[2012/02/15]   % this version of package or later 
\crefformat{footnote}{#2\footnotemark[#1]#3}
...
\begin{document}
...
The theorem is from Evers.\footnote{\label{fn:TE}Tinker and Evers, 1994.}
The corollary is from Chance.\footnote{Evers and Chance, 1990.}
But the key lemma is from Tinker.\cref{fn:TE}
...
</screen>
<para>This solution will work with the package <filename>hyperref</filename>.
See&#160;<link linkend="_005cfootnotemark">\footnotemark</link> for a simpler solution in the common case
of multiple authors with the same affiliation.
</para>

</sect1>
<sect1 label="11.8" id="Footnote-parameters">
<title>Footnote parameters</title>

<indexterm role="cp"><primary>footnote parameters</primary></indexterm>
<indexterm role="cp"><primary>parameters, for footnotes</primary></indexterm>

<variablelist><varlistentry><term><indexterm role="fn"><primary>\footnoterule</primary></indexterm><literal>\footnoterule</literal>
</term><listitem><para>Produces the rule separating the main text on a page from the page&#8217;s
footnotes.  Default dimensions: <literal>0.4pt</literal> thick (or wide), and
<literal>0.4\columnwidth</literal> long in the standard document classes (except
<literal>slides</literal>, where it does not appear).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\footnotesep</primary></indexterm><literal>\footnotesep</literal>
</term><listitem><para>The height of the strut placed at the beginning of the footnote.  By
default, this is set to the normal strut for <literal>\footnotesize</literal>
fonts (see <link linkend="Font-sizes">Font sizes</link>), therefore there is no extra space between
footnotes.  This is &#8216;<literal>6.65pt</literal>&#8217; for &#8216;<literal>10pt</literal>&#8217;, &#8216;<literal>7.7pt</literal>&#8217; for
&#8216;<literal>11pt</literal>&#8217;, and &#8216;<literal>8.4pt</literal>&#8217; for &#8216;<literal>12pt</literal>&#8217;.
</para>
</listitem></varlistentry></variablelist>

</sect1>
</chapter>
<chapter label="12" id="Definitions">
<title>Definitions</title>

<indexterm role="cp"><primary>definitions</primary></indexterm>

<para>&latex; has support for making new commands of many different kinds.
</para>
<!-- xx everything in this chapter needs examples. -->



<sect1 label="12.1" id="_005cnewcommand-_0026-_005crenewcommand">
<title><literal>\newcommand</literal> &amp; <literal>\renewcommand</literal></title>

<indexterm role="fn"><primary>\newcommand</primary></indexterm>
<indexterm role="cp"><primary>commands, defining new ones</primary></indexterm>
<indexterm role="cp"><primary>commands, redefining</primary></indexterm>
<indexterm role="cp"><primary>defining a new command</primary></indexterm>
<indexterm role="cp"><primary>new commands, defining</primary></indexterm>

<para><literal>\newcommand</literal> and <literal>\renewcommand</literal> define and redefine a
command, respectively.  Synopses:
</para>
<screen>  \newcommand{\<replaceable>cmd</replaceable>}[<replaceable>nargs</replaceable>][<replaceable>optargdefault</replaceable>]{<replaceable>defn</replaceable>}
  \newcommand*{\<replaceable>cmd</replaceable>}[<replaceable>nargs</replaceable>][<replaceable>optargdefault</replaceable>]{<replaceable>defn</replaceable>}
\renewcommand{\<replaceable>cmd</replaceable>}[<replaceable>nargs</replaceable>][<replaceable>optargdefault</replaceable>]{<replaceable>defn</replaceable>}
\renewcommand*{\<replaceable>cmd</replaceable>}[<replaceable>nargs</replaceable>][<replaceable>optargdefault</replaceable>]{<replaceable>defn</replaceable>}
</screen>
<indexterm role="cp"><primary>starred form, defining new commands</primary></indexterm>
<indexterm role="cp"><primary>*-form, defining new commands</primary></indexterm>
<para>The starred form of these two commands requires that the arguments not
contain multiple paragraphs of text (not <literal>\long</literal>, in plain &tex;
terms).
</para>
<variablelist><varlistentry><term><replaceable>cmd</replaceable>
</term><listitem><para>Required; <literal>\<replaceable>cmd</replaceable></literal> is the command name.  For <literal>\newcommand</literal>, it
must not be already defined and must not begin with <literal>\end</literal>.  For
<literal>\renewcommand</literal>, it must already be defined.
</para>
</listitem></varlistentry><varlistentry><term><replaceable>nargs</replaceable>
</term><listitem><para>Optional; an integer from 0 to 9, specifying the number of arguments
that the command can take, including any optional argument.  If this
argument is not present, the default is for the command to have no
arguments.  When redefining a command, the new version can have a
different number of arguments than the old version.
</para>
</listitem></varlistentry><varlistentry><term><replaceable>optargdefault</replaceable>
</term><listitem><para>Optional; if this argument is present then the first argument of defined
command <literal>\<replaceable>cmd</replaceable></literal> is optional, with default value <replaceable>optargdefault</replaceable>
(which may be the empty string).  If this argument is not present then
<literal>\<replaceable>cmd</replaceable></literal> does not take an optional argument.
</para>
<indexterm role="cp"><primary>positional parameter</primary></indexterm>
<para>That is, if <literal>\<replaceable>cmd</replaceable></literal> is used with square brackets following,
as in <literal>\<replaceable>cmd</replaceable>[<replaceable>myval</replaceable>]</literal>, then within <replaceable>defn</replaceable> the first
<firstterm>positional parameter</firstterm> <literal>#1</literal> expands <replaceable>myval</replaceable>.  On the
other hand, if <literal>\<replaceable>cmd</replaceable></literal> is called without square brackets
following, then within <replaceable>defn</replaceable> the positional parameter <literal>#1</literal>
expands to the default <replaceable>optargdefault</replaceable>.  In either case, any
required arguments will be referred to starting with <literal>#2</literal>.
</para>
<para>Omitting <literal>[<replaceable>myval</replaceable>]</literal> in a call is different from having the
square brackets with no contents, as in <literal>[]</literal>.  The former results
in <literal>#1</literal> expanding to <replaceable>optargdefault</replaceable>; the latter results in
<literal>#1</literal> expanding to the empty string.
</para>
</listitem></varlistentry><varlistentry><term><replaceable>defn</replaceable>
</term><listitem><para>The text to be substituted for every occurrence of <literal>\<replaceable>cmd</replaceable></literal>; the
positional parameter <literal>#<replaceable>n</replaceable></literal> in <replaceable>defn</replaceable> is replaced by
the text of the <replaceable>n</replaceable>th argument.
</para>
</listitem></varlistentry></variablelist>
<para>&tex; ignores spaces in the source following an alphabetic control
sequence, as in &#8216;<literal>\cmd </literal>&#8217;.  If you actually want a space there, one
solution is to type <literal>{}</literal> after the command (&#8216;<literal>\cmd{} </literal>&#8217;;
another solution is to use an explicit control space (&#8216;<literal>\cmd\ </literal>&#8217;).
</para>
<para>A simple example of defining a new command:
<literal>\newcommand{\RS}{Robin Smith}</literal> results in
<literal>\RS</literal> being replaced by the longer text.
</para>
<para>Redefining an existing command is similar:
<literal>\renewcommand{\qedsymbol}{{\small QED}}</literal>.
</para>
<para>Here&#8217;s a command definition with one required argument:
</para>
<screen>\newcommand{\defref}[1]{Definition~\ref{#1}}
</screen>
<para>Then, <literal>\defref{def:basis}</literal> expands to
<literal>Definition~\ref{def:basis}</literal>, which will ultimately expand to
something like &#8216;<literal>Definition~3.14</literal>&#8217;.
</para>
<para>An example with two required arguments:
<literal>\newcommand{\nbym}[2]{$#1 \times #2$}</literal> is invoked as
<literal>\nbym{2}{k}</literal>.
</para>
<para>An example with an optional argument:
</para>
<screen>\newcommand{\salutation}[1][Sir or Madam]{Dear #1:}
</screen>
<para>Then, <literal>\salutation</literal> gives &#8216;<literal>Dear Sir or Madam:</literal>&#8217; while
<literal>\salutation[John]</literal> gives &#8216;<literal>Dear John:</literal>&#8217;.  And
<literal>\salutation[]</literal> gives &#8216;<literal>Dear :</literal>&#8217;.
</para>
<para>The braces around <replaceable>defn</replaceable> do not define a group, that is, they do
not delimit the scope of the result of expanding <replaceable>defn</replaceable>.  So
<literal>\newcommand{\shipname}[1]{\it #1}</literal> is problematic; in this
sentence,
</para>
<screen>The \shipname{Monitor} met the \shipname{Merrimac}.
</screen>
<para>the words &#8216;<literal>met the</literal>&#8217; would incorrectly be in italics.  Another
pair of braces in the definition is needed, like this:
<literal>\newcommand{\shipname}[1]{{\it #1}}</literal>.  Those braces are
part of the definition and thus do define a group.
</para>

</sect1>
<sect1 label="12.2" id="_005cprovidecommand">
<title><literal>\providecommand</literal></title>

<indexterm role="fn"><primary>\providecommand</primary></indexterm>
<indexterm role="cp"><primary>commands, defining new ones</primary></indexterm>
<indexterm role="cp"><primary>defining a new command</primary></indexterm>
<indexterm role="cp"><primary>new commands, defining</primary></indexterm>

<para>Defines a command, as long as no command of this name already exists.
Synopses:
</para>
<screen>\providecommand{<replaceable>cmd</replaceable>}[<replaceable>nargs</replaceable>][<replaceable>optargdefault</replaceable>]{<replaceable>defn</replaceable>}
\providecommand*{<replaceable>cmd</replaceable>}[<replaceable>nargs</replaceable>][<replaceable>optargdefault</replaceable>]{<replaceable>defn</replaceable>}
</screen>
<para>If no command of this name already exists then this has the same effect
as <literal>\newcommand</literal> (see <link linkend="_005cnewcommand-_0026-_005crenewcommand">\newcommand &amp; \renewcommand</link>).  If a
command of this name already exists then this definition does nothing.
This is particularly useful in a style file, or other file that may be
loaded more than once.
</para>

</sect1>
<sect1 label="12.3" id="_005cnewcounter">
<title><literal>\newcounter</literal>: Allocating a counter</title>

<indexterm role="fn"><primary>\newcounter</primary></indexterm>
<indexterm role="cp"><primary>counters, defining new</primary></indexterm>

<para>Synopsis, one of:
</para>
<screen>\newcounter{<replaceable>countername</replaceable>}
\newcounter{<replaceable>countername</replaceable>}[<replaceable>supercounter</replaceable>]
</screen>
<para>Globally defines a new counter named <replaceable>countername</replaceable> and initialize
the new counter to zero.
</para>
<para>The name <replaceable>countername</replaceable> must consists of letters only, and does not
begin with a backslash.  This name must not already be in use by another
counter.
</para>
<para>When you use the optional argument <literal>[<replaceable>supercounter</replaceable>]</literal> then
<replaceable>countername</replaceable> will be numbered within, or subsidiary to, the
existing counter <replaceable>supercounter</replaceable>.  For example, ordinarily
<literal>subsection</literal> is numbered within <literal>section</literal> so that any time
<replaceable>supercounter</replaceable> is incremented with <literal>\stepcounter</literal>
(see <link linkend="_005cstepcounter">\stepcounter</link>) or <literal>\refstepcounter</literal>
(see <link linkend="_005crefstepcounter">\refstepcounter</link>) then <replaceable>countername</replaceable> is reset to zero.
</para>
<para>See <link linkend="Counters">Counters</link>, for more information about counters.
</para>

</sect1>
<sect1 label="12.4" id="_005cnewlength">
<title><literal>\newlength</literal>: Allocating a length</title>

<indexterm role="fn"><primary>\newlength</primary></indexterm>
<indexterm role="cp"><primary>lengths, allocating new</primary></indexterm>
<indexterm role="cp"><primary>rubber lengths, defining new</primary></indexterm>
<indexterm role="cp"><primary>skip register, plain &tex;</primary></indexterm>
<indexterm role="cp"><primary>glue register, plain &tex;</primary></indexterm>

<para>Allocate a new <firstterm>length</firstterm> register.  Synopsis:
</para>
<screen>\newlength{\<replaceable>arg</replaceable>}
</screen>
<para>This command takes one required argument, which must begin with a
backslash (&#8216;<literal>\</literal>&#8217;).  It creates a new length register named
<literal>\<replaceable>arg</replaceable></literal>, which is a place to hold (rubber) lengths such as
<literal>1in plus.2in minus.1in</literal> (what plain &tex; calls a <literal>skip</literal>
register).  The register gets an initial value of zero.  The control
sequence <literal>\<replaceable>arg</replaceable></literal> must not already be defined.
</para>
<para>See <link linkend="Lengths">Lengths</link>, for more about lengths.
</para>

</sect1>
<sect1 label="12.5" id="_005cnewsavebox">
<title><literal>\newsavebox</literal>: Allocating a box</title>

<indexterm role="fn"><primary>\newsavebox</primary></indexterm>
<indexterm role="cp"><primary>box, allocating new</primary></indexterm>

<para>Allocate a &#8220;bin&#8221; for holding a box.  Synopsis:
</para>
<screen>\newsavebox{\<replaceable>cmd</replaceable>}
</screen>
<para>Defines <literal>\<replaceable>cmd</replaceable></literal> to refer to a new bin for storing boxes.
Such a box is for holding typeset material, to use multiple times
(see <link linkend="Boxes">Boxes</link>) or to measure or manipulate.  The name
<literal>\<replaceable>cmd</replaceable></literal> must start with a backslash (&#8216;<literal>\</literal>&#8217;), and must not
be already defined.
</para>
<para>The allocation of a box is global.  This command is fragile
(see <link linkend="_005cprotect">\protect</link>).
</para>

</sect1>
<sect1 label="12.6" id="_005cnewenvironment-_0026-_005crenewenvironment">
<title><literal>\newenvironment</literal> &amp; <literal>\renewenvironment</literal></title>

<indexterm role="fn"><primary>\newenvironment</primary></indexterm>
<indexterm role="fn"><primary>\renewenvironment</primary></indexterm>
<indexterm role="cp"><primary>environments, defining</primary></indexterm>
<indexterm role="cp"><primary>defining new environments</primary></indexterm>
<indexterm role="cp"><primary>redefining environments</primary></indexterm>

<para>These commands define or redefine an environment <replaceable>env</replaceable>, that is,
<literal>\begin{<replaceable>env</replaceable>} <replaceable>body</replaceable> \end{<replaceable>env</replaceable>}</literal>.  Synopses:
</para>
<screen>   \newenvironment{<replaceable>env</replaceable>}[<replaceable>nargs</replaceable>][<replaceable>optargdefault</replaceable>]{<replaceable>begdefn</replaceable>}{<replaceable>enddefn</replaceable>}
  \newenvironment*{<replaceable>env</replaceable>}[<replaceable>nargs</replaceable>][<replaceable>optargdefault</replaceable>]{<replaceable>begdefn</replaceable>}{<replaceable>enddefn</replaceable>}
 \renewenvironment{<replaceable>env</replaceable>}[<replaceable>nargs</replaceable>][<replaceable>optargdefault</replaceable>]{<replaceable>begdefn</replaceable>}{<replaceable>enddefn</replaceable>}
\renewenvironment*{<replaceable>env</replaceable>}[<replaceable>nargs</replaceable>][<replaceable>optargdefault</replaceable>]{<replaceable>begdefn</replaceable>}{<replaceable>enddefn</replaceable>}
</screen>
<indexterm role="cp"><primary><literal>*</literal>-form of environment commands</primary></indexterm>
<para>The starred form of these commands requires that the arguments not
contain multiple paragraphs of text.  The body of these environments can
still contain multiple paragraphs.
</para>
<variablelist><varlistentry><term><replaceable>env</replaceable>
</term><listitem><para>Required; the environment name.  It consists only of letters or the
<literal>*</literal> character, and thus does not begin with backslash
(<literal>\</literal>).  It must not begin with the string <literal>end</literal>.  For
<literal>\newenvironment</literal>, the name <replaceable>env</replaceable> must not be the name of an
already existing environment, and also the command <literal>\<replaceable>env</replaceable></literal>
must be undefined.  For <literal>\renewenvironment</literal>, <replaceable>env</replaceable> must be the
name of an existing environment.
</para>
</listitem></varlistentry><varlistentry><term><replaceable>nargs</replaceable>
</term><listitem><para>Optional; an integer from 0 to 9 denoting the number of arguments of
that the environment will take.  When the environment is used these
arguments appear after the <literal>\begin</literal>, as in
<literal>\begin{<replaceable>env</replaceable>}{<replaceable>arg1</replaceable>}&#8230;{<replaceable>argn</replaceable>}</literal>.  If this
argument is not present then the default is for the environment to have
no arguments.  When redefining an environment, the new version can have
a different number of arguments than the old version.
</para>
</listitem></varlistentry><varlistentry><term><replaceable>optargdefault</replaceable>
</term><listitem><para>Optional; if this argument is present then the first argument of the
defined environment is optional, with default value <replaceable>optargdefault</replaceable>
(which may be the empty string).  If this argument is not present then
the environment does not take an optional argument.
</para>
<para>That is, when <literal>[<replaceable>optargdefault</replaceable>]</literal> is present in the
environment definition, if <literal>\begin{<replaceable>env</replaceable>}</literal> is used with
square brackets following, as in
<literal>\begin{<replaceable>env</replaceable>}[<replaceable>myval</replaceable>]</literal>, then, within <replaceable>begdefn</replaceable>,
the positional parameter <literal>#1</literal> expands to <replaceable>myval</replaceable>.  If
<literal>\begin{<replaceable>env</replaceable>}</literal> is called without square brackets
following, then, within within <replaceable>begdefn</replaceable>, the positional parameter
<literal>#1</literal> expands to the default <replaceable>optargdefault</replaceable>.  In either case,
any required arguments will be referred to starting with <literal>#2</literal>.
</para>
<para>Omitting <literal>[<replaceable>myval</replaceable>]</literal> in the call is different from having the
square brackets with no contents, as in <literal>[]</literal>.  The former results
in <literal>#1</literal> expanding to <replaceable>optargdefault</replaceable>; the latter results in
<literal>#1</literal> expanding to the empty string.
</para>
</listitem></varlistentry><varlistentry><term><replaceable>begdefn</replaceable>
</term><listitem><para>Required; the text expanded at every occurrence of
<literal>\begin{<replaceable>env</replaceable>}</literal>.  Within <replaceable>begdef</replaceable>, the <replaceable>n</replaceable>th
positional parameter (i.e., <literal>#<replaceable>n</replaceable></literal>) is replaced by the text
of the <replaceable>n</replaceable>th argument.
</para>
</listitem></varlistentry><varlistentry><term><replaceable>enddefn</replaceable>
</term><listitem><para>Required; the text expanded at every occurrence of
<literal>\end{<replaceable>env</replaceable>}</literal>.  This may not contain any positional
parameters, so <literal>#<replaceable>n</replaceable></literal> cannot be used here (but see the final
example below).
</para>
</listitem></varlistentry></variablelist>
<para>All environments, that is to say the <replaceable>begdefn</replaceable> code, the environment
body and the <replaceable>enddefn</replaceable> code, are processed within a group.  Thus, in
the first example below, the effect of the <literal>\small</literal> is limited to
the quote and does not extend to material following the environment.
</para>
<para>This example gives an environment like &latex;&#8217;s <literal>quotation</literal>
except that it will be set in smaller type:
</para>
<screen>\newenvironment{smallquote}{%
  \small\begin{quotation}
}{%
  \end{quotation}
}
</screen>
<para>This one shows the use of arguments; it gives a quotation environment
that cites the author:
</para>
<screen>\newenvironment{citequote}[1][Shakespeare]{%
  \begin{quotation}
  \noindent\textit{#1}: 
}{%
  \end{quotation}
}
</screen>
<para>The author&#8217;s name is optional, and defaults to &#8216;<literal>Shakespeare</literal>&#8217;.
In the document, use the environment like this:
</para>
<screen>\begin{citequote}[Lincoln]
  ...
\end{citequote}
</screen>
<para>The final example shows how to save the value of an argument to use in 
<replaceable>enddefn</replaceable>, in this case in a box (see <link linkend="_005csbox">\sbox</link>):
</para>
<screen>\newsavebox{\quoteauthor}
\newenvironment{citequote}[1][Shakespeare]{%
  \sbox\quoteauthor{#1}%
  \begin{quotation} 
}{%
  \hspace{1em plus 1fill}---\usebox{\quoteauthor}
  \end{quotation}
}
</screen>

</sect1>
<sect1 label="12.7" id="_005cnewtheorem">
<title><literal>\newtheorem</literal></title>

<indexterm role="fn"><primary>\newtheorem</primary></indexterm>
<indexterm role="cp"><primary>theorems, defining</primary></indexterm>
<indexterm role="cp"><primary>defining new theorems</primary></indexterm>

<indexterm role="cp"><primary>theorem-like environment</primary></indexterm>
<indexterm role="cp"><primary>environment, theorem-like</primary></indexterm>
<para>Define a new theorem-like environment.  Synopses:
</para>
<screen>\newtheorem{<replaceable>name</replaceable>}{<replaceable>title</replaceable>}
\newtheorem{<replaceable>name</replaceable>}{<replaceable>title</replaceable>}[<replaceable>numbered_within</replaceable>]
\newtheorem{<replaceable>name</replaceable>}[<replaceable>numbered_like</replaceable>]{<replaceable>title</replaceable>}
</screen>
<para>Using the first form, <literal>\newtheorem{<replaceable>name</replaceable>}{<replaceable>title</replaceable>}</literal>
creates an environment that will be labelled with <replaceable>title</replaceable>.  See the
first example below.
</para>
<para>The second form
<literal>\newtheorem{<replaceable>name</replaceable>}{<replaceable>title</replaceable>}[<replaceable>numbered_within</replaceable>]</literal>
creates an environment whose counter is subordinate to the existing
counter <replaceable>numbered_within</replaceable> (its counter will be reset when
<replaceable>numbered_within</replaceable> is reset).
</para>

<para>The third form
<literal>\newtheorem{<replaceable>name</replaceable>}[<replaceable>numbered_like</replaceable>]{<replaceable>title</replaceable>}</literal>,
with optional argument between the two required arguments, will create
an environment whose counter will share the previously defined counter
<replaceable>numbered_like</replaceable>.
</para>
<para>You can specify one of <replaceable>numbered_within</replaceable> and <replaceable>numbered_like</replaceable>,
or neither, but not both.
</para>
<para>This command creates a counter named <replaceable>name</replaceable>.  In addition, unless
the optional argument <replaceable>numbered_like</replaceable> is used, inside of the
theorem-like environment the current <literal>\ref</literal> value will be that of
<literal>\the<replaceable>numbered_within</replaceable></literal> (see <link linkend="_005cref">\ref</link>).
</para>
<para>This declaration is global.  It is fragile (see <link linkend="_005cprotect">\protect</link>).
</para>
<para>Arguments:
</para>
<variablelist><varlistentry><term><replaceable>name</replaceable>
</term><listitem><para>The name of the environment.  It must not begin with a backslash
(&#8216;<literal>\</literal>&#8217;).  It must not be the name of an existing environment; indeed,
the command name <literal>\<replaceable>name</replaceable></literal> must not already be defined as anything.
</para>
</listitem></varlistentry><varlistentry><term><replaceable>title</replaceable>
</term><listitem><para>The text printed at the beginning of the environment, before the
number. For example, &#8216;<literal>Theorem</literal>&#8217;.
</para>
</listitem></varlistentry><varlistentry><term><replaceable>numbered_within</replaceable>
</term><listitem><para>Optional; the name of an already defined counter, usually a sectional
unit such as <literal>chapter</literal> or <literal>section</literal>.  When the
<replaceable>numbered_within</replaceable> counter is reset then the <replaceable>name</replaceable> environment&#8217;s
counter will also be reset.
</para>
<para>If this optional argument is not used then the command
<literal>\the<replaceable>name</replaceable></literal> is set to <literal>\arabic{<replaceable>name</replaceable>}</literal>.
</para>
</listitem></varlistentry><varlistentry><term><replaceable>numbered_like</replaceable>
</term><listitem><para>Optional; the name of an already defined theorem-like environment. The
new environment will be numbered in sequence with <replaceable>numbered_like</replaceable>.
</para>
</listitem></varlistentry></variablelist>
<para>Without any optional arguments the environments are numbered
sequentially.  The example below has a declaration in the preamble that
results in &#8216;<literal>Definition&#160;1</literal>&#8217; and &#8216;<literal>Definition&#160;2</literal>&#8217; in the
output.
</para>
<screen>\newtheorem{defn}{Definition}
\begin{document}
\section{...}
\begin{defn}
  First def 
\end{defn}

\section{...}
\begin{defn}
  Second def
\end{defn}
</screen>
<para>Because the next example specifies the optional argument
<replaceable>numbered_within</replaceable> to <literal>\newtheorem</literal> as <literal>section</literal>, the
example, with the same document body, gives &#8216;<literal>Definition&#160;1.1</literal>&#8217;
and &#8216;<literal>Definition&#160;2.1</literal>&#8217;.
</para>
<screen>\newtheorem{defn}{Definition}[section]
\begin{document}
\section{...}
\begin{defn}
  First def 
\end{defn}

\section{...}
\begin{defn}
  Second def
\end{defn}
</screen>
<para>In the next example there are two declarations in the preamble, the
second of which calls for the new <literal>thm</literal> environment to use the same
counter as <literal>defn</literal>.  It gives &#8216;<literal>Definition&#160;1.1</literal>&#8217;, followed
by &#8216;<literal>Theorem&#160;2.1</literal>&#8217; and &#8216;<literal>Definition&#160;2.2</literal>&#8217;.
</para>
<screen>\newtheorem{defn}{Definition}[section]
\newtheorem{thm}[defn]{Theorem}
\begin{document}
\section{...}
\begin{defn}
  First def 
\end{defn}

\section{...}
\begin{thm}
  First thm
\end{thm}

\begin{defn}
  Second def
\end{defn}
</screen>

</sect1>
<sect1 label="12.8" id="_005cnewfont">
<title><literal>\newfont</literal>: Define a new font (obsolete)</title>

<indexterm role="fn"><primary>\newfont</primary></indexterm>
<indexterm role="cp"><primary>fonts, new commands for</primary></indexterm>
<indexterm role="cp"><primary>defining new fonts</primary></indexterm>

<para><literal>\newfont</literal>, now obsolete, defines a command that will switch fonts.
Synopsis:
</para>
<screen>\newfont{\<replaceable>cmd</replaceable>}{<replaceable>font description</replaceable>}
</screen>
<para>This defines a control sequence <literal>\<replaceable>cmd</replaceable></literal> that will change the
current font.  &latex; will look on your system for a file named
<filename><replaceable>fontname</replaceable>.tfm</filename>.  The control sequence must must not already
be defined.  It must begin with a backslash (&#8216;<literal>\</literal>&#8217;).
</para>
<indexterm role="fn"><primary>.fd file</primary></indexterm>
<para>This command is obsolete.  It is a low-level command for setting up an
individual font.  Today fonts are almost always defined in families
(which allows you to, for example, associate a boldface with a roman)
through the so-called &#8220;New Font Selection Scheme&#8221;, either by using
<filename>.fd</filename> files or through the use of an engine that can access
system fonts such as Xe&latex; (see <link linkend="TeX-engines">&tex; engines</link>).
<!-- xx explain nfss somewhere -->
</para>
<indexterm role="cp"><primary>at clause, in font definitions</primary></indexterm>
<indexterm role="cp"><primary>design size, in font definitions</primary></indexterm>
<para>But since it is part of &latex;, here is an explanation: the
<replaceable>font description</replaceable> consists of a <replaceable>fontname</replaceable> and an optional
<firstterm>at clause</firstterm>; this can have the form either <literal>at <replaceable>dimen</replaceable></literal>
or <literal>scaled <replaceable>factor</replaceable></literal>, where a <replaceable>factor</replaceable> of &#8216;<literal>1000</literal>&#8217;
means no scaling.  For &latex;&#8217;s purposes, all this does is scale all
the character and other font dimensions relative to the font&#8217;s design
size, which is a value defined in the <filename>.tfm</filename> file.
</para>
<para>This example defines two equivalent fonts and typesets a few
characters in each:
</para>
<screen>\newfont{\testfontat}{cmb10 at 11pt}
\newfont{\testfontscaled}{cmb10 scaled 1100}
\testfontat abc
\testfontscaled abc
</screen>

</sect1>
<sect1 label="12.9" id="_005cprotect">
<title><literal>\protect</literal></title>

<indexterm role="fn"><primary>\protect</primary></indexterm>
<indexterm role="cp"><primary>fragile commands</primary></indexterm>
<indexterm role="cp"><primary>robust commands</primary></indexterm>

<para>All &latex; commands are either <firstterm>fragile</firstterm> or <firstterm>robust</firstterm>.
Footnotes, line breaks, any command that has an optional argument, and
many more, are fragile.  A fragile command can break when it is used in
the argument to certain commands.  To prevent such commands from
breaking one solution is to have them preceded by the command
<literal>\protect</literal>.
</para>
<para>For example, when &latex; runs the <literal>\section{<replaceable>section
name</replaceable>}</literal> command it writes the <replaceable>section name</replaceable> text to the
<filename>.aux</filename> auxiliary file, moving it there for use elsewhere in the
document such as in the table of contents.  Any argument that is
internally expanded by &latex; without typesetting it directly is
referred to as a 
<indexterm role="cp"><primary>moving arguments</primary></indexterm>
<firstterm>moving argument</firstterm>.  A command is fragile if it can
expand during this process into invalid &tex; code.  Some examples of
moving arguments are those that appear in the <literal>\caption{...}</literal>
command (see <link linkend="figure">figure</link>), in the <literal>\thanks{...}</literal> command
(see <link linkend="_005cmaketitle">\maketitle</link>), and in @-expressions in the <literal>tabular</literal> and
<literal>array</literal> environments (see <link linkend="tabular">tabular</link>).
</para>
<para>If you get strange errors from commands used in moving arguments, try
preceding it with <literal>\protect</literal>.  Every fragile commands must be
protected with their own <literal>\protect</literal>.  
</para>
<para>Although usually a <literal>\protect</literal> command doesn&#8217;t hurt, length
commands are robust and should not be preceded by a <literal>\protect</literal>
command. Nor can a <literal>\protect</literal> command be used in the argument to
<literal>\addtocounter</literal> or <literal>\setcounter</literal> command.
</para>
<para>In this example the <literal>\caption</literal> command gives a mysterious error
about an extra curly brace.  Fix the problem by preceding each
<literal>\raisebox</literal> command with <literal>\protect</literal>.
</para>
<screen>\begin{figure}
  ...
  \caption{Company headquarters of A\raisebox{1pt}{B}\raisebox{-1pt}{C}}
\end{figure}
</screen>
<para>In the next example the <literal>\tableofcontents</literal> command gives an error
because the <literal>\(..\)</literal> in the section title expands to illegal &tex;
in the <filename>.toc</filename> file.  You can solve this by changing <literal>\(..\)</literal>
to <literal>\protect\(..\protect\)</literal>.
</para>
<screen>\begin{document}
\tableofcontents
...
\section{Einstein's \( e=mc^2 \)}
...
</screen>

</sect1>
</chapter>
<chapter label="13" id="Counters">
<title>Counters</title>

<indexterm role="cp"><primary>counters, a list of</primary></indexterm>
<indexterm role="cp"><primary>variables, a list of</primary></indexterm>

<para>Everything &latex; numbers for you has a counter associated with
it. The name of the counter is often the same as the name of the
environment or command associated with the number, except that the
counter&#8217;s name has no backslash&#160;<literal>\</literal>.  Thus, associated with
the <literal>\chapter</literal> command is the <literal>chapter</literal> counter that keeps
track of the chapter number.  
</para>
<para>Below is a list of the counters used in &latex;&#8217;s standard document
classes to control numbering.
</para>
<screen>part            paragraph       figure          enumi
chapter         subparagraph    table           enumii
section         page            footnote        enumiii
subsection      equation        mpfootnote      enumiv
subsubsection
</screen>
<para>The <literal>mpfootnote</literal> counter is used by the <literal>\footnote</literal> command
inside of a minipage (see <link linkend="minipage">minipage</link>).  The counters <literal>enumi</literal>
through <literal>enumiv</literal> are used in the <literal>enumerate</literal> environment, for
up to four levels of nesting (see <link linkend="enumerate">enumerate</link>).
</para>
<para>New counters are created with <literal>\newcounter</literal>.  See <link linkend="_005cnewcounter">\newcounter</link>.
</para>



<sect1 label="13.1" id="_005calph-_005cAlph-_005carabic-_005croman-_005cRoman-_005cfnsymbol">
<title><literal>\alph \Alph \arabic \roman \Roman \fnsymbol</literal>: Printing counters</title>

<indexterm role="cp"><primary>counters, printing</primary></indexterm>

<para>Print the value of a counter, in a specified style.  For instance, if
the counter <replaceable>counter</replaceable> has the value 1 then a
<literal>\alph{<replaceable>counter</replaceable>}</literal> in your source will result in a lower case
letter&#160;a appearing in the output.
</para>
<para>All of these commands take a single counter as an argument, for
instance, <literal>\alph{enumi}</literal>.  Note that the counter name does not
start with a backslash.
</para>
<variablelist><varlistentry><term><indexterm role="fn"><primary>\alph{<replaceable>counter</replaceable>}</primary></indexterm><literal>\alph{<replaceable>counter</replaceable>}</literal>
</term><listitem><para>Print the value of <replaceable>counter</replaceable> in lowercase letters: &#8216;a&#8217;, &#8216;b&#8217;, ...
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\Alph{<replaceable>counter</replaceable>}</primary></indexterm><literal>\Alph{<replaceable>counter</replaceable>}</literal>
</term><listitem><para>Print in uppercase letters: &#8216;A&#8217;, &#8216;B&#8217;, ...
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\arabic{<replaceable>counter</replaceable>}</primary></indexterm><literal>\arabic{<replaceable>counter</replaceable>}</literal>
</term><listitem><para>Print in Arabic numbers: &#8216;1&#8217;, &#8216;2&#8217;, ...
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\roman{<replaceable>counter</replaceable>}</primary></indexterm><literal>\roman{<replaceable>counter</replaceable>}</literal>
</term><listitem><para>Print in lowercase roman numerals: &#8216;i&#8217;, &#8216;ii&#8217;, ...
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\Roman{<replaceable>counter</replaceable>}</primary></indexterm><literal>\Roman{<replaceable>counter</replaceable>}</literal>
</term><listitem><para>Print in uppercase roman numerals: &#8216;I&#8217;, &#8216;II&#8217;, ...
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\fnsymbol{<replaceable>counter</replaceable>}</primary></indexterm><literal>\fnsymbol{<replaceable>counter</replaceable>}</literal>
</term><listitem><para>Prints the value of <replaceable>counter</replaceable> in a specific sequence of nine
symbols (conventionally used for labeling footnotes).  The value of
<replaceable>counter</replaceable> must be between&#160;1 and&#160;9, inclusive.
</para>
<para>Here are the symbols:
</para>
<informaltable><tgroup cols="3"><colspec colwidth="33*"></colspec><colspec colwidth="33*"></colspec><colspec colwidth="33*"></colspec><thead><row><entry><para>Name</para></entry><entry><para>Command</para></entry><entry><para>Equivalent Unicode symbol and/or numeric code point<!-- -->
</para></entry></row></thead><tbody><row><entry><para>asterisk</para></entry><entry><para><literal>\ast</literal></para></entry><entry><para>*<!-- -->
</para></entry></row><row><entry><para>dagger</para></entry><entry><para><literal>\dagger</literal></para></entry><entry><para>&#x2020;
</para></entry></row><row><entry><para>ddagger</para></entry><entry><para><literal>\ddagger</literal></para></entry><entry><para>&#x2021;
</para></entry></row><row><entry><para>section-sign</para></entry><entry><para><literal>\S</literal></para></entry><entry><para>&#x00A7;
</para></entry></row><row><entry><para>paragraph-sign</para></entry><entry><para><literal>\P</literal></para></entry><entry><para>&#x00B6;
</para></entry></row><row><entry><para>double-vert</para></entry><entry><para><literal>\parallel</literal></para></entry><entry><para>&#x2016;
</para></entry></row><row><entry><para>double-asterisk</para></entry><entry><para><literal>\ast\ast</literal></para></entry><entry><para>**<!-- -->
</para></entry></row><row><entry><para>double-dagger</para></entry><entry><para><literal>\dagger\dagger</literal></para></entry><entry><para>&#x2020;&#x2020;
</para></entry></row><row><entry><para>double-ddagger</para></entry><entry><para><literal>\ddagger\ddagger</literal></para></entry><entry><para>&#x2021;&#x2021;
</para></entry></row></tbody></tgroup></informaltable>
</listitem></varlistentry></variablelist>

</sect1>
<sect1 label="13.2" id="_005cusecounter">
<title><literal>\usecounter{<replaceable>counter</replaceable>}</literal></title>

<indexterm role="fn"><primary>\usecounter</primary></indexterm>
<indexterm role="cp"><primary>list items, specifying counter</primary></indexterm>
<indexterm role="cp"><primary>numbered items, specifying counter</primary></indexterm>

<para>Synopsis:
</para>
<screen>\usecounter{<replaceable>counter</replaceable>}
</screen>
<para>In the <literal>list</literal> environment, when used in the second argument, this
command sets up <replaceable>counter</replaceable> to number the list items.  It initializes
<replaceable>counter</replaceable> to zero, and arranges that when <literal>\item</literal> is called
without its optional argument then <replaceable>counter</replaceable> is incremented by
<literal>\refstepcounter</literal>, making its value be the current <literal>ref</literal>
value.  This command is fragile (see <link linkend="_005cprotect">\protect</link>).
</para>
<para>Put in the preamble, this makes a new list environment enumerated with
<replaceable>testcounter</replaceable>:
</para>
<screen>\newcounter{testcounter}
\newenvironment{test}{%
  \begin{list}{}{%
    \usecounter{testcounter}
  }
}{%
  \end{list}
}
</screen>

</sect1>
<sect1 label="13.3" id="_005cvalue">
<title><literal>\value{<replaceable>counter</replaceable>}</literal></title>

<indexterm role="fn"><primary>\value</primary></indexterm>
<indexterm role="cp"><primary>counters, getting value of</primary></indexterm>

<para>Synopsis:
</para>
<screen>\value{<replaceable>counter</replaceable>}
</screen>
<para>This command expands to the value of <replaceable>counter</replaceable>.  It is often used
in <literal>\setcounter</literal> or <literal>\addtocounter</literal>, but <literal>\value</literal> can
be used anywhere that &latex; expects a number.  It must not be
preceded by <literal>\protect</literal> (see <link linkend="_005cprotect">\protect</link>).
</para>
<para>The <literal>\value</literal> command is not used for typesetting the value of the
counter.  See <link linkend="_005calph-_005cAlph-_005carabic-_005croman-_005cRoman-_005cfnsymbol">\alph \Alph \arabic \roman \Roman \fnsymbol</link>.
</para>
<para>This example outputs &#8216;<literal>Test counter is&#160;6. Other counter
is&#160;5.</literal>&#8217;.
</para>
<screen>\newcounter{test} \setcounter{test}{5}
\newcounter{other} \setcounter{other}{\value{test}}
\addtocounter{test}{1}

Test counter is \arabic{test}.
Other counter is \arabic{other}.
</screen>
<para>This example inserts <literal>\hspace{4\parindent}</literal>.
</para>
<screen>\setcounter{myctr}{3} \addtocounter{myctr}{1}
\hspace{\value{myctr}\parindent}
</screen>

</sect1>
<sect1 label="13.4" id="_005csetcounter">
<title><literal>\setcounter{<replaceable>counter</replaceable>}{<replaceable>value</replaceable>}</literal></title>

<indexterm role="fn"><primary>\setcounter</primary></indexterm>
<indexterm role="cp"><primary>counters, setting</primary></indexterm>
<indexterm role="cp"><primary>setting counters</primary></indexterm>

<para>Synopsis:
</para>
<screen>\setcounter{<replaceable>counter</replaceable>}{<replaceable>value</replaceable>}
</screen>
<para>The <literal>\setcounter</literal> command globally sets the value of <replaceable>counter</replaceable>
to the <replaceable>value</replaceable> argument.  Note that the counter name does not start
with a backslash.
</para>
<para>In this example the section value appears as &#8216;<literal>V</literal>&#8217;.
</para>
<screen>\setcounter{section}{5}
Here it is in Roman: \Roman{section}.
</screen>

</sect1>
<sect1 label="13.5" id="_005caddtocounter">
<title><literal>\addtocounter{<replaceable>counter</replaceable>}{<replaceable>value</replaceable>}</literal></title>

<indexterm role="fn"><primary>\addtocounter</primary></indexterm>

<para>The <literal>\addtocounter</literal> command globally increments <replaceable>counter</replaceable> by
the amount specified by the <replaceable>value</replaceable> argument, which may be negative.
</para>
<para>In this example the section value appears as &#8216;<literal>VII</literal>&#8217;.
</para>
<screen>\setcounter{section}{5}
\addtocounter{section}{2}
Here it is in Roman: \Roman{section}.
</screen>

</sect1>
<sect1 label="13.6" id="_005crefstepcounter">
<title><literal>\refstepcounter{<replaceable>counter</replaceable>}</literal></title>

<indexterm role="fn"><primary>\refstepcounter</primary></indexterm>

<para>The <literal>\refstepcounter</literal> command works in the same way as
<literal>\stepcounter</literal> (see <link linkend="_005cstepcounter">\stepcounter</link>): it globally increments the
value of <replaceable>counter</replaceable> by one and resets the value of any counter
numbered within it.  (For the definition of &#8220;counters numbered
within&#8221;, see <link linkend="_005cnewcounter">\newcounter</link>.)
</para>
<para>In addition, this command also defines the current <literal>\ref</literal> value
to be the result of <literal>\thecounter</literal>.
</para>
<para>While the counter value is set globally, the <literal>\ref</literal> value is set
locally, i.e., inside the current group.
</para>

</sect1>
<sect1 label="13.7" id="_005cstepcounter">
<title><literal>\stepcounter{<replaceable>counter</replaceable>}</literal></title>

<indexterm role="fn"><primary>\stepcounter</primary></indexterm>

<para>The <literal>\stepcounter</literal> command globally adds one to <replaceable>counter</replaceable> and
resets all counters numbered within it.  (For the definition of
&#8220;counters numbered within&#8221;, see <link linkend="_005cnewcounter">\newcounter</link>.)
</para>

</sect1>
<sect1 label="13.8" id="_005cday-_005cmonth-_005cyear">
<title><literal>\day \month \year</literal>: Predefined counters</title>

<indexterm role="fn"><primary>\day</primary></indexterm>
<indexterm role="fn"><primary>\month</primary></indexterm>
<indexterm role="fn"><primary>\year</primary></indexterm>

<para>&latex; defines counters for the day of the month (<literal>\day</literal>,
1&#8211;31), month of the year (<literal>\month</literal>, 1&#8211;12), and year
(<literal>\year</literal>, Common Era).  When &tex; starts up, they are
set to the current values on the system where &tex; is running.  They
are not updated as the job progresses.
</para>
<para>The related command <literal>\today</literal> produces a string representing the
current day (see <link linkend="_005ctoday">\today</link>).
</para>

</sect1>
</chapter>
<chapter label="14" id="Lengths">
<title>Lengths</title>

<indexterm role="cp"><primary>lengths, defining and using</primary></indexterm>

<para>A <firstterm>length</firstterm> is a measure of distance.  Many &latex; commands take a
length as an argument.
</para>
<para>Lengths come in two types.  A <firstterm>rigid length</firstterm> (what Plain &tex;
calls a <firstterm>dimen</firstterm>) such as <literal>10pt</literal> cannot contain a <literal>plus</literal> or
<literal>minus</literal> component.  A <firstterm>rubber length</firstterm> (what Plain &tex; calls
a <firstterm>skip</firstterm>) can contain those, as with <literal>1cm plus0.05cm
minus0.01cm</literal>.  These give the ability to stretch or shrink; the length
in the prior sentence could appear in the output as long as 1.05&#160;cm
or as short as 0.99&#160;cm, depending on what &tex;&#8217;s typesetting
algorithm finds optimum.
</para>
<para>The <literal>plus</literal> or <literal>minus</literal> component of a rubber length can contain
a <firstterm>fill</firstterm> component, as in <literal>1in plus2fill</literal>.  This gives the
length infinite stretchability or shrinkability, so that the length in
the prior sentence can be set by &tex; to any distance greater than or
equal to 1&#160;inch.  &tex; actually provides three infinite glue
components <literal>fil</literal>, <literal>fill</literal>, and <literal>filll</literal>, such that the
later ones overcome the earlier ones, but only the middle value is
ordinarily used.  See <link linkend="_005chfill">\hfill</link>, See <link linkend="_005cvfill">\vfill</link>.
</para>
<para>Multiplying an entire rubber length by a number turns it into a rigid
length, so that after <literal>\setlength{\ylength}{1in plus 0.2in}</literal>
and <literal>\setlength{\zlength}{3\ylength}</literal> then the value of
<literal>\zlength</literal> is <literal>3in</literal>.
</para>



<sect1 label="14.1" id="Units-of-length">
<title>Units of length</title>

<indexterm role="cp"><primary>units, of length</primary></indexterm>

<para>&tex; and &latex; know about these units both inside and outside of
math mode.
</para>
<variablelist><varlistentry><term><literal>pt</literal>
</term><listitem><indexterm role="fn"><primary>pt</primary></indexterm>
<indexterm role="cp"><primary>Point</primary></indexterm>
<para>Point 1/72.27 inch.  The conversion to metric units, to two decimal
places, is 1point = 2.85mm = 28.45cm. 
</para>
</listitem></varlistentry><varlistentry><term><literal>pc</literal>
</term><listitem><indexterm role="cp"><primary>pica</primary></indexterm>
<indexterm role="fn"><primary>pc</primary></indexterm>
<para>Pica, 12 pt
</para>
</listitem></varlistentry><varlistentry><term><literal>in</literal>
</term><listitem><indexterm role="fn"><primary>in</primary></indexterm>
<indexterm role="fn"><primary>inch</primary></indexterm>
<para>Inch,  72.27 pt
</para>
</listitem></varlistentry><varlistentry><term><literal>bp</literal>
</term><listitem><indexterm role="fn"><primary>bp</primary></indexterm>
<indexterm role="cp"><primary>Big point</primary></indexterm>
<para>Big point, 1/72 inch.  This length is the definition of a point in
PostScript and many desktop publishing systems.
</para>
</listitem></varlistentry><varlistentry><term><literal>cm</literal>
</term><listitem><indexterm role="cp"><primary>Centimeter</primary></indexterm>
<indexterm role="fn"><primary>cm</primary></indexterm>
<para>Centimeter
</para>
</listitem></varlistentry><varlistentry><term><literal>mm</literal>
</term><listitem><indexterm role="cp"><primary>Millimeter</primary></indexterm>
<indexterm role="fn"><primary>mm</primary></indexterm>
<para>Millimeter
</para>
</listitem></varlistentry><varlistentry><term><literal>dd</literal>
</term><listitem><indexterm role="cp"><primary>Didot point</primary></indexterm>
<indexterm role="fn"><primary>dd</primary></indexterm>
<para>Didot point, 1.07 pt
</para>
</listitem></varlistentry><varlistentry><term><literal>cc</literal>
</term><listitem><indexterm role="cp"><primary>Cicero</primary></indexterm>
<indexterm role="fn"><primary>cc</primary></indexterm>
<para>Cicero, 12 dd
</para>
</listitem></varlistentry><varlistentry><term><literal>sp</literal>
</term><listitem><indexterm role="cp"><primary>Scaled point</primary></indexterm>
<indexterm role="fn"><primary>sp</primary></indexterm>
<para>Scaled point, 1/65536 pt
</para>
</listitem></varlistentry></variablelist>
<indexterm role="cp"><primary>ex</primary></indexterm>
<indexterm role="cp"><primary>x-height</primary></indexterm>
<indexterm role="fn"><primary>ex</primary></indexterm>
<indexterm role="cp"><primary>m-width</primary></indexterm>
<indexterm role="cp"><primary>em</primary></indexterm>
<indexterm role="fn"><primary>em</primary></indexterm>
<para>Two other lengths that are often used are values set by the designer of
the font.  The x-height of the current font <firstterm>ex</firstterm>, traditionally the
height of the lower case letter x, is often used for vertical
lengths. Similarly <firstterm>em</firstterm>, traditionally the width of the capital
letter M, is often used for horizontal lengths (there is also
<literal>\enspace</literal>, which is <literal>0.5em</literal>).  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
<literal>\setlength{\itemsep}{1ex plus 0.05ex minus 0.01ex}</literal> is more
likely to still be reasonable if the font is changed than a definition
given in points.
</para>
<indexterm role="cp"><primary>mu, math unit</primary></indexterm>
<indexterm role="fn"><primary>mu</primary></indexterm>
<para>In math mode, many definitions are expressed in terms of the math unit
<firstterm>mu</firstterm> given by 1 em = 18 mu, where the em is taken from the current
math symbols family.  See <link linkend="Spacing-in-math-mode">Spacing in math mode</link>.
</para>

</sect1>
<sect1 label="14.2" id="_005csetlength">
<title><literal>\setlength</literal></title>

<indexterm role="fn"><primary>\setlength</primary></indexterm>
<indexterm role="cp"><primary>lengths, setting</primary></indexterm>

<para>Synopsis:
</para>
<screen>\setlength{<replaceable>\len</replaceable>}{<replaceable>amount</replaceable>}
</screen>
<para>The <literal>\setlength</literal> sets the value of <firstterm>length command</firstterm>
<indexterm role="cp"><primary>length command</primary></indexterm>
<literal>\<replaceable>len</replaceable></literal> to the <replaceable>value</replaceable> argument which can be expressed in any
units that &latex; understands, i.e., inches (<literal>in</literal>), millimeters
(<literal>mm</literal>), points (<literal>pt</literal>), big points (<literal>bp</literal>), etc.
</para>

</sect1>
<sect1 label="14.3" id="_005caddtolength">
<title><literal>\addtolength</literal></title>

<indexterm role="fn"><primary>\addtolength</primary></indexterm>
<indexterm role="cp"><primary>lengths, adding to</primary></indexterm>

<para>Synopsis:
</para>
<screen>\addtolength{<replaceable>\len</replaceable>}{<replaceable>amount</replaceable>}
</screen>

<para>The <literal>\addtolength</literal> command increments a length command <literal>\<replaceable>len</replaceable></literal>
by the amount specified in the <replaceable>amount</replaceable> argument, which may be
negative.
</para>

</sect1>
<sect1 label="14.4" id="_005csettodepth">
<title><literal>\settodepth</literal></title>

<indexterm role="fn"><primary>\settodepth</primary></indexterm>

<para>Synopsis:
</para>
<screen>\settodepth{\<replaceable>len</replaceable>}{<replaceable>text</replaceable>}
</screen>
<para>The <literal>\settodepth</literal> command sets the value of a length command
<literal>\<replaceable>len</replaceable></literal> equal to the depth of the <replaceable>text</replaceable> argument.
</para>

</sect1>
<sect1 label="14.5" id="_005csettoheight">
<title><literal>\settoheight</literal></title>

<indexterm role="fn"><primary>\settoheight</primary></indexterm>

<para>Synopsis:
</para>
<screen>\settoheight{\<replaceable>len</replaceable>}{text}
</screen>
<para>The <literal>\settoheight</literal> command sets the value of a length command <literal>\<replaceable>len</replaceable></literal>
equal to the height of the <literal>text</literal> argument.
</para>


</sect1>
<sect1 label="14.6" id="_005csettowidth">
<title><literal>\settowidth{\<replaceable>len</replaceable>}{<replaceable>text</replaceable>}</literal></title>

<indexterm role="fn"><primary>\settowidth</primary></indexterm>

<para>Synopsis:
</para>
<screen>\settowidth{\<replaceable>len</replaceable>}{<replaceable>text</replaceable>}
</screen>
<para>The <literal>\settowidth</literal> command sets the value of the command <replaceable>\len</replaceable>
to the width of the <replaceable>text</replaceable> argument.
</para>

</sect1>
<sect1 label="14.7" id="Predefined-lengths">
<title>Predefined lengths</title>

<indexterm role="cp"><primary>lengths, predefined</primary></indexterm>
<indexterm role="cp"><primary>predefined lengths</primary></indexterm>

<para><literal>\width</literal>
<indexterm role="fn"><primary>\width</primary></indexterm>
</para>
<para><literal>\height</literal>
<indexterm role="fn"><primary>\height</primary></indexterm>
</para>
<para><literal>\depth</literal>
<indexterm role="fn"><primary>\depth</primary></indexterm>
</para>
<para><literal>\totalheight</literal>
<indexterm role="fn"><primary>\totalheight</primary></indexterm>
</para>
<para>These length parameters can be used in the arguments of the box-making
commands (see <link linkend="Boxes">Boxes</link>).  They specify the natural width, etc., of
the text in the box. <literal>\totalheight</literal> equals <inlineequation><mathphrase><literal>&#92;height</literal> +
<literal>&#92;depth</literal></mathphrase></inlineequation>. To make a box with the text stretched to double the
natural size, e.g., say
</para>
<screen>\makebox[2\width]{Get a stretcher}
</screen>

</sect1>
</chapter>
<chapter label="15" id="Making-paragraphs">
<title>Making paragraphs</title>

<indexterm role="cp"><primary>making paragraphs</primary></indexterm>
<indexterm role="cp"><primary>paragraphs</primary></indexterm>

<para>A paragraph is ended by one or more completely blank lines&#8212;lines not
containing even a <literal>%</literal>.  A blank line should not appear where a new
paragraph cannot be started, such as in math mode or in the argument of
a sectioning command.
</para>


<sect1 label="15.1" id="_005cindent">
<title><literal>\indent</literal></title>

<indexterm role="fn"><primary>\indent</primary></indexterm>
<indexterm role="fn"><primary>\parindent</primary></indexterm>
<indexterm role="cp"><primary>indent, forcing</primary></indexterm>

<para><literal>\indent</literal> produces a horizontal space whose width equals to the
<literal>\parindent</literal> length, the normal paragraph indentation.  It is used
to add paragraph indentation where it would otherwise be suppressed.
</para>
<para>The default value for <literal>\parindent</literal> is <literal>1em</literal> in two-column
mode, otherwise <literal>15pt</literal> for <literal>10pt</literal> documents, <literal>17pt</literal> for
<literal>11pt</literal>, and <literal>1.5em</literal> for <literal>12pt</literal>.
</para>

</sect1>
<sect1 label="15.2" id="_005cnoindent">
<title><literal>\noindent</literal></title>

<indexterm role="fn"><primary>\noindent</primary></indexterm>
<indexterm role="cp"><primary>indent, suppressing</primary></indexterm>

<para>When used at the beginning of the paragraph, this command suppresses any
paragraph indentation, as in this example.
</para>
<screen>... end of the prior paragraph.

\noindent This paragraph is not indented.
</screen>
<para>It has no effect when used in the middle of a paragraph.
</para>
<para>To eliminate paragraph indentation in an entire document, put
<literal>\setlength{\parindent}{0pt}</literal> in the preamble.
</para>

</sect1>
<sect1 label="15.3" id="_005cparskip">
<title><literal>\parskip</literal></title>

<indexterm role="fn"><primary>\parskip</primary></indexterm>
<indexterm role="cp"><primary>vertical space before paragraphs</primary></indexterm>

<para><literal>\parskip</literal> is a rubber length defining extra vertical space added
before each paragraph.  The default is <literal>0pt plus1pt</literal>.
</para>

</sect1>
<sect1 label="15.4" id="Marginal-notes">
<title>Marginal notes</title>

<indexterm role="cp"><primary>marginal notes</primary></indexterm>
<indexterm role="cp"><primary>notes in the margin</primary></indexterm>
<indexterm role="cp"><primary>remarks in the margin</primary></indexterm>
<indexterm role="fn"><primary>\marginpar</primary></indexterm>

<para>Synopsis:
</para>
<screen>\marginpar[<replaceable>left</replaceable>]{<replaceable>right</replaceable>}
</screen>
<para>The <literal>\marginpar</literal> command creates a note in the margin.  The first
line of the note will have the same baseline as the line in the text
where the <literal>\marginpar</literal> occurs.
</para>
<para>When you only specify the mandatory argument <replaceable>right</replaceable>, the text
will be placed
</para>
<itemizedlist><listitem><para>in the right margin for one-sided layout (option <literal>oneside</literal>, see <link linkend="Document-class-options">Document class options</link>);
</para></listitem><listitem><para>in the outside margin for two-sided layout (option <literal>twoside</literal>, see <link linkend="Document-class-options">Document class options</link>);
</para></listitem><listitem><para>in the nearest margin for two-column layout (option <literal>twocolumn</literal>, see <link linkend="Document-class-options">Document class options</link>).
</para></listitem></itemizedlist>
<indexterm role="fn"><primary>\reversemarginpar</primary></indexterm>
<indexterm role="fn"><primary>\normalmarginpar</primary></indexterm>
<para>The command <literal>\reversemarginpar</literal> places subsequent marginal notes
in the opposite (inside) margin.  <literal>\normalmarginpar</literal> places them
in the default position.
</para>
<para>When you specify both arguments, <replaceable>left</replaceable> is used for the left
margin, and <replaceable>right</replaceable> is used for the right margin.
</para>
<para>The first word will normally not be hyphenated; you can enable
hyphenation there by beginning the node with <literal>\hspace{0pt}</literal>.
</para>
<para>These parameters affect the formatting of the note:
</para>
<variablelist><varlistentry><term><indexterm role="fn"><primary>\marginparpush</primary></indexterm><literal>\marginparpush</literal>
</term><listitem><para>Minimum vertical space between notes; default &#8216;<literal>7pt</literal>&#8217; for
&#8216;<literal>12pt</literal>&#8217; documents, &#8216;<literal>5pt</literal>&#8217; else.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\marginparsep</primary></indexterm><literal>\marginparsep</literal>
</term><listitem><para>Horizontal space between the main text and the note; default
&#8216;<literal>11pt</literal>&#8217; for &#8216;<literal>10pt</literal>&#8217; documents, &#8216;<literal>10pt</literal>&#8217; else.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\marginparwidth</primary></indexterm><literal>\marginparwidth</literal>
</term><listitem><para>Width of the note itself; default for a one-sided &#8216;<literal>10pt</literal>&#8217; document
is &#8216;<literal>90pt</literal>&#8217;, &#8216;<literal>83pt</literal>&#8217; for &#8216;<literal>11pt</literal>&#8217;, and &#8216;<literal>68pt</literal>&#8217; for
&#8216;<literal>12pt</literal>&#8217;; &#8216;<literal>17pt</literal>&#8217; more in each case for a two-sided document.
In two column mode, the default is &#8216;<literal>48pt</literal>&#8217;.
</para>
</listitem></varlistentry></variablelist>
<para>The standard &latex; routine for marginal notes does not prevent
notes from falling off the bottom of the page.
<!--  @TeX{} FAQ entry on this topic (xx when there): -->
<!-- @url{http://www.tex.ac.uk/cgi-bin/texfaq2html?label=marginparside}. -->
<!-- (+marginfix) -->
</para>

</sect1>
</chapter>
<chapter label="16" id="Math-formulas">
<title>Math formulas</title>

<indexterm role="cp"><primary>math formulas</primary></indexterm>
<indexterm role="cp"><primary>formulas, math</primary></indexterm>
<indexterm role="cp"><primary>math mode, entering</primary></indexterm>
<indexterm role="fn"><primary>environment, <literal>math</literal></primary></indexterm>
<indexterm role="fn"><primary><literal>math</literal> environment</primary></indexterm>
<indexterm role="fn"><primary>environment, <literal>displaymath</literal></primary></indexterm>
<indexterm role="fn"><primary><literal>displaymath</literal> environment</primary></indexterm>
<indexterm role="fn"><primary>environment, <literal>equation</literal></primary></indexterm>
<indexterm role="fn"><primary><literal>equation</literal> environment</primary></indexterm>

<para>There are three environments that put &latex; in math mode:
</para>
<variablelist><varlistentry><term><literal>math</literal>
</term><listitem><para>For formulas that appear right in the text.
</para></listitem></varlistentry><varlistentry><term><literal>displaymath</literal>
</term><listitem><para>For formulas that appear on their own line.
</para></listitem></varlistentry><varlistentry><term><literal>equation</literal>
</term><listitem><para>The same as the displaymath environment except that it adds an equation
number in the right margin.
</para></listitem></varlistentry></variablelist>
<indexterm role="fn"><primary>\(</primary></indexterm>
<indexterm role="fn"><primary>\)</primary></indexterm>
<indexterm role="fn"><primary>\[</primary></indexterm>
<indexterm role="fn"><primary>\]</primary></indexterm>
<para>The <literal>math</literal> environment can be used in both paragraph and LR mode,
but the <literal>displaymath</literal> and <literal>equation</literal> environments can be used
only in paragraph mode.  The <literal>math</literal> and <literal>displaymath</literal>
environments are used so often that they have the following short forms:
</para>
<screen>\(...\)   instead of   \begin{math}...\end{math}
\[...\]   instead of   \begin{displaymath}...\end{displaymath}
</screen>
<indexterm role="fn"><primary>$</primary></indexterm>
<para>In fact, the <literal>math</literal> environment is so common that it has an even
shorter form:
</para>
<screen>$ ... $   instead of   \(...\)
</screen>
<indexterm role="fn"><primary>\boldmath</primary></indexterm>
<indexterm role="fn"><primary>\unboldmath</primary></indexterm>
<para>The <literal>\boldmath</literal> command changes math letters and symbols to be in
a bold font.  It is used <emphasis>outside</emphasis> of math mode.  Conversely, the
<literal>\unboldmath</literal> command changes math glyphs to be in a normal font;
it too is used <emphasis>outside</emphasis> of math mode.
</para>
<!-- xx own section? Math fonts? -->
<indexterm role="fn"><primary>\displaystyle</primary></indexterm>
<para>The <literal>\displaystyle</literal> declaration forces the size and style of the
formula to be that of <literal>displaymath</literal>, e.g., with limits above and
below summations.  For example:
</para>
<screen>$\displaystyle \sum_{n=0}^\infty x_n $
</screen>
<!-- xx see also \cal, \mathcal -->



<sect1 label="16.1" id="Subscripts-_0026-superscripts">
<title>Subscripts &amp; superscripts</title>

<indexterm role="cp"><primary>superscript</primary></indexterm>
<indexterm role="cp"><primary>subscript</primary></indexterm>
<indexterm role="cp"><primary>exponent</primary></indexterm>
<indexterm role="fn"><primary>_</primary></indexterm>
<indexterm role="fn"><primary>^</primary></indexterm>

<para>In math mode, use the caret character&#160;<literal>^</literal> to make the
<replaceable>exp</replaceable> appear as a superscript: <literal>^{<replaceable>exp</replaceable>}</literal>.
Similarly, in math mode, underscore&#160;<literal>_{<replaceable>exp</replaceable>}</literal> makes a
subscript out of <replaceable>exp</replaceable>.
</para>
<para>In this example the <literal>0</literal> and <literal>1</literal> appear as subscripts while the
<literal>2</literal> is a superscript.
</para>
<screen>\( (x_0+x_1)^2 \)
</screen>
<para>To have more than one character in <replaceable>exp</replaceable> use curly braces as in
<literal>e^{-2x}</literal>.
</para>
<para>&latex; handles superscripts on superscripts, and all of that stuff, in
the natural way, so expressions such as <literal>e^{x^2}</literal> and
<literal>x_{a_0}</literal> will look right.  It also does the right thing when
something has both a subscript and a superscript.  In this example the
<literal>0</literal> appears at the bottom of the integral sign while the <literal>10</literal>
appears at the top.
</para> 
<screen>\int_0^{10} x^2 \,dx
</screen>
<para>You can put a superscript or subscript before a symbol with a construct
such as <literal>{}_t K^2</literal> in math mode (the initial <literal>{}</literal> prevents
the prefixed subscript from being attached to any prior symbols in the
expression).
</para>
<para>Outside of math mode, a construct like <literal>A
test$_\textnormal{subscript}$</literal> will produce a subscript typeset in
text mode, not math mode.  Note that there are packages specialized for
writing Chemical formulas such as <filename>mhchem</filename>.
<!-- xx display mode -->
</para>

</sect1>
<sect1 label="16.2" id="Math-symbols">
<title>Math symbols</title>

<indexterm role="cp"><primary>math symbols</primary></indexterm>
<indexterm role="cp"><primary>symbols, math</primary></indexterm>
<indexterm role="cp"><primary>greek letters</primary></indexterm>

<para>&latex; provides almost any mathematical symbol you&#8217;re likely to need.
For example, if you include <literal>$\pi$</literal> in your source, you will get
the pi symbol &#x03C0;.
</para> 
<para>Below is a list of commonly-available symbols.  It is by no means an
exhaustive list.  Each symbol here is described with a short phrase, and
its symbol class (which determines the spacing around it) is given in
parenthesis.  Unless said otherwise, the commands for these symbols can
be used only in math mode.
</para>
<para>To redefine a command so that it can be used whatever the current mode,
see <link linkend="_005censuremath">\ensuremath</link>.
</para>

<!-- xx Add Negation: @code{} for negations of relevant symbols -->
<!-- Useful: http://www.w3.org/TR/WD-math-970515/section6.html -->

<variablelist><varlistentry><term><indexterm role="fn"><primary>\|</primary></indexterm><literal>\|</literal>
</term><listitem><para>&#x2225; Parallel (relation). Synonym:&#160;<literal>\parallel</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\aleph</primary></indexterm><literal>\aleph</literal>
</term><listitem><para>&#x2135; Aleph, transfinite cardinal (ordinary).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\alpha</primary></indexterm><literal>\alpha</literal>
</term><listitem><para>&#x03B1; Lower case Greek letter alpha (ordinary).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\amalg</primary></indexterm><literal>\amalg</literal>
</term><listitem><para>&#x2A3F; Disjoint union (binary)
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\angle</primary></indexterm><literal>\angle</literal>
</term><listitem><para>&#x2220; Geometric angle (ordinary). Similar: less-than
sign&#160;<literal>&lt;</literal> and angle bracket&#160;<literal>\langle</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\approx</primary></indexterm><literal>\approx</literal>
</term><listitem><para>&#x2248; Almost equal to (relation).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\ast</primary></indexterm><literal>\ast</literal>
</term><listitem><para>&#x2217; Asterisk operator, convolution, six-pointed
(binary). Synonym:&#160;<literal>*</literal>, which is often a superscript or
subscript, as in the Kleene star. Similar:&#160;<literal>\star</literal>, which is
five-pointed, and is sometimes used as a general binary operation, and
sometimes reserved for cross-correlation.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\asymp</primary></indexterm><literal>\asymp</literal>
</term><listitem><para>&#x224D; Asymptotically equivalent (relation).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\backslash</primary></indexterm><literal>\backslash</literal>
</term><listitem><para>\ Backslash (ordinary).  Similar: set minus&#160;<literal>\setminus</literal>, and
<literal>\textbackslash</literal> for backslash outside of math mode.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\beta</primary></indexterm><literal>\beta</literal>
</term><listitem><para>&#x03B2; Lower case Greek letter beta (ordinary).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\bigcap</primary></indexterm><literal>\bigcap</literal>
</term><listitem><para>&#x22C2; Variable-sized, or n-ary, intersection (operator). Similar:
binary intersection&#160;<literal>\cap</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\bigcirc</primary></indexterm><literal>\bigcirc</literal>
</term><listitem><para>&#x26AA; Circle, larger (binary).  Similar: function
composition&#160;<literal>\circ</literal>.
<!-- bb Best unicode symbol for this? -->
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\bigcup</primary></indexterm><literal>\bigcup</literal>
</term><listitem><para>&#x22C3; Variable-sized, or n-ary, union (operator). Similar: binary
union&#160;<literal>\cup</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\bigodot</primary></indexterm><literal>\bigodot</literal>
</term><listitem><para>&#x2A00; Variable-sized, or n-ary, circled dot operator (operator).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\bigoplus</primary></indexterm><literal>\bigoplus</literal>
</term><listitem><para>&#x2A01; Variable-sized, or n-ary, circled plus operator (operator).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\bigotimes</primary></indexterm><literal>\bigotimes</literal>
</term><listitem><para>&#x2A02; Variable-sized, or n-ary, circled times operator (operator).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\bigtriangledown</primary></indexterm><literal>\bigtriangledown</literal>
</term><listitem><para>&#x25BD; Variable-sized, or n-ary, open triangle pointing down
(operator).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\bigtriangleup</primary></indexterm><literal>\bigtriangleup</literal>
</term><listitem><para>&#x25B3; Variable-sized, or n-ary, open triangle pointing up (operator).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\bigsqcup</primary></indexterm><literal>\bigsqcup</literal>
</term><listitem><para>&#x2A06; Variable-sized, or n-ary, square union (operator).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\biguplus</primary></indexterm><literal>\biguplus</literal>
</term><listitem><para>&#x2A04; Variable-sized, or n-ary, union operator with a plus
(operator).  (Note that the name has only one p.)
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\bigvee</primary></indexterm><literal>\bigvee</literal>
</term><listitem><para>&#x22C1; Variable-sized, or n-ary, logical-and (operator).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\bigwedge</primary></indexterm><literal>\bigwedge</literal>
</term><listitem><para>&#x22C0; Variable-sized, or n-ary, logical-or (operator).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\bot</primary></indexterm><literal>\bot</literal>
</term><listitem><para>&#x22A5; Up tack, bottom, least element of a partially ordered
set, or a contradiction (ordinary).  See also&#160;<literal>\top</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\bowtie</primary></indexterm><literal>\bowtie</literal>
</term><listitem><para>&#x22C8; Natural join of two relations (relation).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\Box</primary></indexterm><literal>\Box</literal>
</term><listitem><para>&#x25A1; Modal operator for necessity; square open box
(ordinary).  Not available in plain &tex;. In &latex; you need to load the <filename>amssymb</filename> package.
<!-- bb Best Unicode equivalent? -->
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\bullet</primary></indexterm><literal>\bullet</literal>
</term><listitem><indexterm role="cp"><primary>bullet symbol</primary></indexterm>
<para>&#x2022; Bullet (binary).  Similar: multiplication
dot&#160;<literal>\cdot</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\cap</primary></indexterm><literal>\cap</literal>
</term><listitem><para>&#x2229; Intersection of two sets (binary).  Similar: variable-sized
operator&#160;<literal>\bigcap</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\cdot</primary></indexterm><literal>\cdot</literal>
</term><listitem><para>&#x22C5; Multiplication (binary).  Similar: Bullet
dot&#160;<literal>\bullet</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\chi</primary></indexterm><literal>\chi</literal>
</term><listitem><para>&#x03C7; Lower case Greek chi (ordinary).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\circ</primary></indexterm><literal>\circ</literal>
</term><listitem><para>&#x2218; Function composition, ring operator (binary).  Similar:
variable-sized operator&#160;<literal>\bigcirc</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\clubsuit</primary></indexterm><literal>\clubsuit</literal>
</term><listitem><para>&#x2663; Club card suit (ordinary).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\complement</primary></indexterm><literal>\complement</literal>
</term><listitem><para>&#x2201; Set complement, used as a superscript as in
<literal>$S^\complement$</literal> (ordinary).  Not available in plain &tex;. In &latex; you need to load the <filename>amssymb</filename> package. Also
used: <literal>$S^{\mathsf{c}}$</literal> or&#160;<literal>$\bar{S}$</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\cong</primary></indexterm><literal>\cong</literal>
</term><listitem><para>&#x2245; Congruent (relation).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\coprod</primary></indexterm><literal>\coprod</literal>
</term><listitem><para>&#x2210; Coproduct (operator).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\cup</primary></indexterm><literal>\cup</literal>
</term><listitem><para>&#x222A; Union of two sets (binary).  Similar: variable-sized
operator&#160;<literal>\bigcup</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\dagger</primary></indexterm><literal>\dagger</literal>
</term><listitem><para>&#x2020; Dagger relation (binary).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\dashv</primary></indexterm><literal>\dashv</literal>
</term><listitem><para>&#x22A3; Dash with vertical, reversed turnstile (relation).  Similar:
turnstile&#160;<literal>\vdash</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\ddagger</primary></indexterm><literal>\ddagger</literal>
</term><listitem><para>&#x2021; Double dagger relation (binary).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\Delta</primary></indexterm><literal>\Delta</literal>
</term><listitem><para>&#x0394; Greek upper case delta, used for increment (ordinary).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\delta</primary></indexterm><literal>\delta</literal>
</term><listitem><para>&#x03B4; Greek lower case delta (ordinary).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\Diamond</primary></indexterm><literal>\Diamond</literal>
</term><listitem><para>&#x25C7; Large diamond operator (ordinary).  Not available in plain &tex;. In &latex; you need to load the <filename>amssymb</filename> package.
<!-- bb Best Unicode equivalent? -->
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\diamond</primary></indexterm><literal>\diamond</literal>
</term><listitem><para>&#x22C4; Diamond operator, or diamond bullet (binary).  Similar: large
diamond&#160;<literal>\Diamond</literal>, circle bullet&#160;<literal>\bullet</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\diamondsuit</primary></indexterm><literal>\diamondsuit</literal>
</term><listitem><para>&#x2662; Diamond card suit (ordinary).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\div</primary></indexterm><literal>\div</literal>
</term><listitem><para>&#x00F7; Division sign (binary).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\doteq</primary></indexterm><literal>\doteq</literal>
</term><listitem><para>&#x2250; Approaches the limit (relation).  Similar: geometrically equal
to&#160;<literal>\Doteq</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\downarrow</primary></indexterm><literal>\downarrow</literal>
</term><listitem><para>&#x2193; Down arrow, converges (relation).  Similar: double line down
arrow&#160;<literal>\Downarrow</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\Downarrow</primary></indexterm><literal>\Downarrow</literal>
</term><listitem><para>&#x21D3; Double line down arrow (relation).  Similar: single line down
arrow&#160;<literal>\downarrow</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\ell</primary></indexterm><literal>\ell</literal>
</term><listitem><para>&#x2113; Lower-case cursive letter l (ordinary).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\emptyset</primary></indexterm><literal>\emptyset</literal>
</term><listitem><para>&#x2205; Empty set symbol (ordinary).  The variant form is
<literal>\varnothing</literal>.
<!-- bb Why Unicode has \revemptyset but no \emptyset? -->
</para>	
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\epsilon</primary></indexterm><literal>\epsilon</literal>
</term><listitem><para>&#x03F5; Lower case lunate epsilon (ordinary). Similar to
Greek text letter. More widely used in mathematics is the script small
letter epsilon <literal>\varepsilon</literal>&#160;&#x03B5;. Related:
the set membership relation <literal>\in</literal>&#160;&#x2208;.
<!-- src: David Carlisle http://tex.stackexchange.com/a/98018/339 and -->
<!-- Unicode referenced there asserts varepsilon is much more widely used. -->
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\equiv</primary></indexterm><literal>\equiv</literal>
</term><listitem><para>&#x2261; Equivalence (relation).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\eta</primary></indexterm><literal>\eta</literal>
</term><listitem><para>&#x03B7; Lower case Greek letter (ordinary).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\exists</primary></indexterm><literal>\exists</literal>
</term><listitem><para>&#x2203; Existential quantifier (ordinary).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\flat</primary></indexterm><literal>\flat</literal>
</term><listitem><para>&#x266D; Musical flat (ordinary).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\forall</primary></indexterm><literal>\forall</literal>
</term><listitem><para>&#x2200; Universal quantifier (ordinary).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\frown</primary></indexterm><literal>\frown</literal>
</term><listitem><para>&#x2322; Downward curving arc (ordinary).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\Gamma</primary></indexterm><literal>\Gamma</literal>
</term><listitem><para>&#x0393; Upper case Greek letter (ordinary).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\gamma</primary></indexterm><literal>\gamma</literal>
</term><listitem><para>&#x03B3; Lower case Greek letter (ordinary).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\ge</primary></indexterm><literal>\ge</literal>
</term><listitem><para>&#x2265; Greater than or equal to (relation).  This is a synonym
for&#160;<literal>\geq</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\geq</primary></indexterm><literal>\geq</literal>
</term><listitem><para>&#x2265; Greater than or equal to (relation).  This is a synonym
for&#160;<literal>\ge</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\gets</primary></indexterm><literal>\gets</literal>
</term><listitem><para>&#x2190; Is assigned the value (relation).
Synonym:&#160;<literal>\leftarrow</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\gg</primary></indexterm><literal>\gg</literal>
</term><listitem><para>&#x226B; Much greater than (relation).  Similar: much less
than&#160;<literal>\ll</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\hbar</primary></indexterm><literal>\hbar</literal>
</term><listitem><para>&#x210F; Planck constant over two pi (ordinary).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\heartsuit</primary></indexterm><literal>\heartsuit</literal>
</term><listitem><para>&#x2661; Heart card suit (ordinary).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\hookleftarrow</primary></indexterm><literal>\hookleftarrow</literal>
</term><listitem><para>&#x21A9; Hooked left arrow (relation).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\hookrightarrow</primary></indexterm><literal>\hookrightarrow</literal>
</term><listitem><para>&#x21AA; Hooked right arrow (relation).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\iff</primary></indexterm><literal>\iff</literal>
</term><listitem><para>&#x27F7; If and only if (relation).  It is <literal>\Longleftrightarrow</literal>
with a <literal>\thickmuskip</literal> on either side.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\Im</primary></indexterm><literal>\Im</literal>
</term><listitem><para>&#x2111; Imaginary part (ordinary).  See: real part&#160;<literal>\Re</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\in</primary></indexterm><literal>\in</literal>
</term><listitem><para>&#x2208; Set element (relation).  See also: lower case lunate
epsilon&#160;<literal>\epsilon</literal>&#x03F5; and small letter script
epsilon&#160;<literal>\varepsilon</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\infty</primary></indexterm><literal>\infty</literal>
</term><listitem><para>&#x221E; Infinity (ordinary).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\int</primary></indexterm><literal>\int</literal>
</term><listitem><para>&#x222B; Integral (operator).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\iota</primary></indexterm><literal>\iota</literal>
</term><listitem><para>&#x03B9; Lower case Greek letter (ordinary).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\Join</primary></indexterm><literal>\Join</literal>
</term><listitem><para>&#x2A1D; Condensed bowtie symbol (relation).  Not available in Plain
&tex;.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\kappa</primary></indexterm><literal>\kappa</literal>
</term><listitem><para>&#x03BA; Lower case Greek letter (ordinary).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\Lambda</primary></indexterm><literal>\Lambda</literal>
</term><listitem><para>&#x039B; Upper case Greek letter (ordinary).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\lambda</primary></indexterm><literal>\lambda</literal>
</term><listitem><para>&#x03BB; Lower case Greek letter (ordinary).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\land</primary></indexterm><literal>\land</literal>
</term><listitem><para>&#x2227; Logical and (binary).  This is a synonym for <literal>\wedge</literal>.
See also logical or&#160;<literal>\lor</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\langle</primary></indexterm><literal>\langle</literal>
</term><listitem><para>&#x27E8; Left angle, or sequence, bracket (opening).  Similar:
less-than&#160;<literal>&lt;</literal>. Matches&#160;<literal>\rangle</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\lbrace</primary></indexterm><literal>\lbrace</literal>
</term><listitem><para>&#x007B; Left curly brace
(opening). Synonym:&#160;<literal>\{</literal>. Matches&#160;<literal>\rbrace</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\lbrack</primary></indexterm><literal>\lbrack</literal>
</term><listitem><para>&#x005B; Left square bracket (opening).
Synonym:&#160;<literal>[</literal>. Matches&#160;<literal>\rbrack</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\lceil</primary></indexterm><literal>\lceil</literal>
</term><listitem><para>&#x2308; Left ceiling bracket, like a square bracket but with the bottom
shaved off (opening). Matches&#160;<literal>\rceil</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\le</primary></indexterm><literal>\le</literal>
</term><listitem><para>&#x2264; Less than or equal to (relation).  This is a synonym
for&#160;<literal>\leq</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\leadsto</primary></indexterm><literal>\leadsto</literal>
</term><listitem><para>&#x21DD; Squiggly right arrow (relation).  Not available in plain &tex;. In &latex; you need to load the <filename>amssymb</filename> package.
To get this symbol outside of math mode you can put
<literal>\newcommand*{\Leadsto}{\ensuremath{\leadsto}}</literal> in the
preamble and then use <literal>\Leadsto</literal> instead.
<!-- bb Best Unicode equivalent? -->
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\Leftarrow</primary></indexterm><literal>\Leftarrow</literal>
</term><listitem><para>&#x21D0; Is implied by, double-line left arrow (relation).  Similar:
single-line left arrow&#160;<literal>\leftarrow</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\leftarrow</primary></indexterm><literal>\leftarrow</literal>
</term><listitem><para>&#x2190; Single-line left arrow (relation).
Synonym:&#160;<literal>\gets</literal>. Similar: double-line left
arrow&#160;<literal>\Leftarrow</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\leftharpoondown</primary></indexterm><literal>\leftharpoondown</literal>
</term><listitem><para>&#x21BD; Single-line left harpoon, barb under bar (relation).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\leftharpoonup</primary></indexterm><literal>\leftharpoonup</literal>
</term><listitem><para>&#x21BC; Single-line left harpoon, barb over bar (relation).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\Leftrightarrow</primary></indexterm><literal>\Leftrightarrow</literal>
</term><listitem><para>&#x21D4; Bi-implication; double-line double-headed arrow (relation).
Similar: single-line double headed arrow&#160;<literal>\leftrightarrow</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\leftrightarrow</primary></indexterm><literal>\leftrightarrow</literal>
</term><listitem><para>&#x2194; Single-line double-headed arrow (relation).  Similar:
double-line double headed arrow&#160;<literal>\Leftrightarrow</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\leq</primary></indexterm><literal>\leq</literal>
</term><listitem><para>&#x2264; Less than or equal to (relation).  This is a synonym
for&#160;<literal>\le</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\lfloor</primary></indexterm><literal>\lfloor</literal>
</term><listitem><para>&#x230A; Left floor bracket (opening). Matches:&#160;<literal>\floor</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\lhd</primary></indexterm><literal>\lhd</literal>
</term><listitem><para>&#x25C1; Arrowhead, that is, triangle, pointing left (binary).
Not available in plain &tex;. In &latex; you need to load the <filename>amssymb</filename> package. For the normal subgroup symbol you should load
<filename>amssymb</filename> and use&#160;<literal>\vartriangleleft</literal> (which is a relation
and so gives better spacing).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\ll</primary></indexterm><literal>\ll</literal>
</term><listitem><para>&#x226A; Much less than (relation).  Similar: much greater
than&#160;<literal>\gg</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\lnot</primary></indexterm><literal>\lnot</literal>
</term><listitem><para>&#x00AC; Logical negation (ordinary). Synonym:&#160;<literal>\neg</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\longleftarrow</primary></indexterm><literal>\longleftarrow</literal>
</term><listitem><para>&#x27F5; Long single-line left arrow (relation).  Similar: long
double-line left arrow&#160;<literal>\Longleftarrow</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\longleftrightarrow</primary></indexterm><literal>\longleftrightarrow</literal>
</term><listitem><para>&#x27F7; Long single-line double-headed arrow (relation).  Similar: long
double-line double-headed arrow&#160;<literal>\Longleftrightarrow</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\longmapsto</primary></indexterm><literal>\longmapsto</literal>
</term><listitem><para>&#x27FC; Long single-line left arrow starting with vertical bar
(relation).  Similar: shorter version&#160;<literal>\mapsto</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\longrightarrow</primary></indexterm><literal>\longrightarrow</literal>
</term><listitem><para>&#x27F6; Long single-line right arrow (relation).  Similar: long
double-line right arrow&#160;<literal>\Longrightarrow</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\lor</primary></indexterm><literal>\lor</literal>
</term><listitem><para>&#x2228; Logical or (binary).  Synonym: wedge&#160;<literal>\wedge</literal>. 
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\mapsto</primary></indexterm><literal>\mapsto</literal>
</term><listitem><para>&#x21A6; Single-line left arrow starting with vertical bar (relation).
Similar: longer version&#160;<literal>\longmapsto</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\mho</primary></indexterm><literal>\mho</literal>
</term><listitem><para>&#x2127; Conductance, half-circle rotated capital omega (ordinary).
Not available in plain &tex;. In &latex; you need to load the <filename>amssymb</filename> package.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\mid</primary></indexterm><literal>\mid</literal>
</term><listitem><para>&#x2223; Single-line vertical bar (relation).  A typical use of
<literal>\mid</literal> is for a set <literal>\{\, x \mid x\geq 5 \,\}</literal>.
</para>
<para>Similar: <literal>\vert</literal> and&#160;<literal>|</literal> produce the same single-line
vertical bar symbol but without any spacing (they fall in class
ordinary) and you should not use them as relations but instead only as
ordinals, i.e., footnote symbols.  For absolute value, see the entry
for&#160;<literal>\vert</literal> and for norm see the entry for&#160;<literal>\Vert</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\models</primary></indexterm><literal>\models</literal>
</term><listitem><para>&#x22A8; Entails, or satisfies; double turnstile, short double dash
(relation).  Similar: long double dash&#160;<literal>\vDash</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\mp</primary></indexterm><literal>\mp</literal>
</term><listitem><para>&#x2213; Minus or plus (relation).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\mu</primary></indexterm><literal>\mu</literal>
</term><listitem><para>&#x03BC; Lower case Greek letter (ordinary).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\nabla</primary></indexterm><literal>\nabla</literal>
</term><listitem><para>&#x2207; Hamilton&#8217;s del, or differential, operator (ordinary).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\natural</primary></indexterm><literal>\natural</literal>
</term><listitem><para>&#x266E; Musical natural notation (ordinary).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\ne</primary></indexterm><literal>\ne</literal>
</term><listitem><para>&#x2260; Not equal (relation). Synonym:&#160;<literal>\neq</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\nearrow</primary></indexterm><literal>\nearrow</literal>
</term><listitem><para>&#x2197; North-east arrow (relation).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\neg</primary></indexterm><literal>\neg</literal>
</term><listitem><para>&#x00AC; Logical negation (ordinary).
Synonym:&#160;<literal>\lnot</literal>. Sometimes instead used for
negation:&#160;<literal>\sim</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\neq</primary></indexterm><literal>\neq</literal>
</term><listitem><para>&#x2260; Not equal (relation). Synonym:&#160;<literal>\ne</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\ni</primary></indexterm><literal>\ni</literal>
</term><listitem><para>&#x220B; Reflected membership epsilon; has the member
(relation). Synonym:&#160;<literal>\owns</literal>. Similar: is a member
of&#160;<literal>\in</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\not</primary></indexterm><literal>\not</literal>
</term><listitem><para>&#x0020;&#x00A0;&#x0338; Long solidus, or slash, used to overstrike a
following operator (relation).
<!-- Need blank space for it to overstrike -->
</para>
<para>Many negated operators that don&#8217;t require <literal>\not</literal> are available,
particularly with the <filename>amssymb</filename> package. For example, <literal>\notin</literal>
is probably typographically preferable to <literal>\not\in</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\notin</primary></indexterm><literal>\notin</literal>
</term><listitem><para>&#x2209; Not an element of (relation).  Similar: not subset
of&#160;<literal>\nsubseteq</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\nu</primary></indexterm><literal>\nu</literal>
</term><listitem><para>&#x03BD; Lower case Greek letter (ordinary).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\nwarrow</primary></indexterm><literal>\nwarrow</literal>
</term><listitem><para>&#x2196; North-west arrow (relation).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\odot</primary></indexterm><literal>\odot</literal>
</term><listitem><para>&#x2299; Dot inside a circle (binary).  Similar: variable-sized
operator&#160;<literal>\bigodot</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\oint</primary></indexterm><literal>\oint</literal>
</term><listitem><para>&#x222E; Contour integral, integral with circle in the middle (operator).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\Omega</primary></indexterm><literal>\Omega</literal>
</term><listitem><para>&#x03A9; Upper case Greek letter (ordinary).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\omega</primary></indexterm><literal>\omega</literal>
</term><listitem><para>&#x03C9; Lower case Greek letter (ordinary).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\ominus</primary></indexterm><literal>\ominus</literal>
</term><listitem><para>&#x2296; Minus sign, or dash, inside a circle (binary).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\oplus</primary></indexterm><literal>\oplus</literal>
</term><listitem><para>&#x2295; Plus sign inside a circle (binary).  Similar: variable-sized
operator&#160;<literal>\bigoplus</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\oslash</primary></indexterm><literal>\oslash</literal>
</term><listitem><para>&#x2298; Solidus, or slash, inside a circle (binary).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\otimes</primary></indexterm><literal>\otimes</literal>
</term><listitem><para>&#x2297; Times sign, or cross, inside a circle (binary).  Similar:
variable-sized operator&#160;<literal>\bigotimes</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\owns</primary></indexterm><literal>\owns</literal>
</term><listitem><para>&#x220B; Reflected membership epsilon; has the member
(relation). Synonym:&#160;<literal>\ni</literal>. Similar: is a member
of&#160;<literal>\in</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\parallel</primary></indexterm><literal>\parallel</literal>
</term><listitem><para>&#x2225; Parallel (relation). Synonym:&#160;<literal>\|</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\partial</primary></indexterm><literal>\partial</literal>
</term><listitem><para>&#x2202; Partial differential (ordinary).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\perp</primary></indexterm><literal>\perp</literal>
</term><listitem><para>&#x27C2; Perpendicular (relation).  Similar:&#160;<literal>\bot</literal> uses the
same glyph but the spacing is different because it is in the class
ordinary.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\phi</primary></indexterm><literal>\phi</literal>
</term><listitem><para>&#x03D5; Lower case Greek letter (ordinary).  The variant form is
<literal>\varphi</literal>&#160;&#x03C6;.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\Pi</primary></indexterm><literal>\Pi</literal>
</term><listitem><para>&#x03A0; Upper case Greek letter (ordinary).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\pi</primary></indexterm><literal>\pi</literal>
</term><listitem><para>&#x03C0; Lower case Greek letter (ordinary).  The variant form is
<literal>\varpi</literal>&#160;&#x03D6;.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\pm</primary></indexterm><literal>\pm</literal>
</term><listitem><para>&#x00B1; Plus or minus (binary).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\prec</primary></indexterm><literal>\prec</literal>
</term><listitem><para>&#x227A; Precedes (relation). Similar: less than&#160;<literal>&lt;</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\preceq</primary></indexterm><literal>\preceq</literal>
</term><listitem><para>&#x2AAF; Precedes or equals (relation). Similar: less than or
equals&#160;<literal>\leq</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\prime</primary></indexterm><literal>\prime</literal>
</term><listitem><para>&#x2032; Prime, or minute in a time expression (ordinary).
Typically used as a superscript: <literal>$f^\prime$</literal>; <literal>$f^\prime$</literal>
and <literal>$f'$</literal> produce the same result.  An advantage of the second
is that <literal>$f'''$</literal> produces the desired symbol, that is, the same
result as <literal>$f^{\prime\prime\prime}$</literal>, but uses rather less
typing.  You can only use <literal>\prime</literal> in math mode.  Using the right
single quote&#160;<literal>'</literal> in text mode produces a different character
(apostrophe).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\prod</primary></indexterm><literal>\prod</literal>
</term><listitem><para>&#x220F; Product (operator).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\propto</primary></indexterm><literal>\propto</literal>
</term><listitem><para>&#x221D; Is proportional to (relation)
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\Psi</primary></indexterm><literal>\Psi</literal>
</term><listitem><para>&#x03A8; Upper case Greek letter (ordinary).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\psi</primary></indexterm><literal>\psi</literal>
</term><listitem><para>&#x03C8; Lower case Greek letter (ordinary).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\rangle</primary></indexterm><literal>\rangle</literal>
</term><listitem><para>&#x27E9; Right angle, or sequence, bracket (closing). Similar: greater
than&#160;<literal>&gt;</literal>.  Matches:<literal>\langle</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\rbrace</primary></indexterm><literal>\rbrace</literal>
</term><listitem><para>&#x007D; Right curly brace
(closing). Synonym:&#160;<literal>\}</literal>. Matches&#160;<literal>\lbrace</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\rbrack</primary></indexterm><literal>\rbrack</literal>
</term><listitem><para>&#x005D; Right square bracket
(closing). Synonym:&#160;<literal>]</literal>. Matches&#160;<literal>\lbrack</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\rceil</primary></indexterm><literal>\rceil</literal>
</term><listitem><para>&#x2309; Right ceiling bracket (closing). Matches&#160;<literal>\lceil</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\Re</primary></indexterm><literal>\Re</literal>
</term><listitem><para>&#x211C; Real part, real numbers, cursive capital R (ordinary). Related:
double-line, or blackboard bold, R&#160;<literal>\mathbb{R}</literal>; to access
this, load the <filename>amsfonts</filename> package.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\restriction</primary></indexterm><literal>\restriction</literal>
</term><listitem><para>&#x21BE; Restriction of a function
(relation). Synonym:&#160;<literal>\upharpoonright</literal>.  Not available in plain &tex;. In &latex; you need to load the <filename>amssymb</filename> package.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\revemptyset</primary></indexterm><literal>\revemptyset</literal>
</term><listitem><para>&#x29B0; Reversed empty set symbol (ordinary).  Related:
<literal>\varnothing</literal>. Not available in plain &tex;. In &latex; you need to load the <filename>stix</filename> package.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\rfloor</primary></indexterm><literal>\rfloor</literal>
</term><listitem><para>&#x230B; Right floor bracket, a right square bracket with the top cut
off (closing). Matches&#160;<literal>\lfloor</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\rhd</primary></indexterm><literal>\rhd</literal>
</term><listitem><para>&#x25C1; Arrowhead, that is, triangle, pointing right (binary).
Not available in plain &tex;. In &latex; you need to load the <filename>amssymb</filename> package. For the normal subgroup symbol you should instead
load <filename>amssymb</filename> and use&#160;<literal>\vartriangleright</literal> (which
is a relation and so gives better spacing).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\rho</primary></indexterm><literal>\rho</literal>
</term><listitem><para>&#x03C1; Lower case Greek letter (ordinary).  The variant form is
<literal>\varrho</literal>&#160;&#x03F1;.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\Rightarrow</primary></indexterm><literal>\Rightarrow</literal>
</term><listitem><para>&#x21D2; Implies, right-pointing double line arrow (relation). Similar:
right single-line arrow&#160;<literal>\rightarrow</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\rightarrow</primary></indexterm><literal>\rightarrow</literal>
</term><listitem><para>&#x2192; Right-pointing single line arrow (relation). Synonym:&#160;<literal>\to</literal>. Similar: right double line arrow&#160;<literal>\Rightarrow</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\rightharpoondown</primary></indexterm><literal>\rightharpoondown</literal>
</term><listitem><para>&#x21C1; Right-pointing harpoon with barb below the line (relation).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\rightharpoonup</primary></indexterm><literal>\rightharpoonup</literal>
</term><listitem><para>&#x21C0; Right-pointing harpoon with barb above the line (relation).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\rightleftharpoons</primary></indexterm><literal>\rightleftharpoons</literal>
</term><listitem><para>&#x21CC; Right harpoon up above left harpoon down (relation).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\searrow</primary></indexterm><literal>\searrow</literal>
</term><listitem><para>&#x2198; Arrow pointing southeast (relation).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\setminus</primary></indexterm><literal>\setminus</literal>
</term><listitem><para>&#x29F5; Set difference, reverse solidus or slash, like \
(binary). Similar: backslash&#160;<literal>\backslash</literal> and also
<literal>\textbackslash</literal> outside of math mode.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\sharp</primary></indexterm><literal>\sharp</literal>
</term><listitem><para>&#x266F; Musical sharp (ordinary).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\Sigma</primary></indexterm><literal>\Sigma</literal>
</term><listitem><para>&#x03A3; Upper case Greek letter (ordinary).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\sigma</primary></indexterm><literal>\sigma</literal>
</term><listitem><para>&#x03C3; Lower case Greek letter (ordinary). The variant form is
<literal>\varsigma</literal>&#160;&#x03C2;.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\sim</primary></indexterm><literal>\sim</literal>
</term><listitem><para>&#x223C; Similar, in a relation (relation).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\simeq</primary></indexterm><literal>\simeq</literal>
</term><listitem><para>&#x2243; Similar or equal to, in a relation (relation).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\smallint</primary></indexterm><literal>\smallint</literal>
</term><listitem><para>&#x222B; Integral sign that does not change to a larger size in a
display (operator).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\smile</primary></indexterm><literal>\smile</literal>
</term><listitem><para>&#x2323; Upward curving arc, smile (ordinary).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\spadesuit</primary></indexterm><literal>\spadesuit</literal>
</term><listitem><para>&#x2660; Spade card suit (ordinary).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\sqcap</primary></indexterm><literal>\sqcap</literal>
</term><listitem><para>&#x2293; Square intersection symbol (binary). Similar:
intersection&#160;<literal>cap</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\sqcup</primary></indexterm><literal>\sqcup</literal>
</term><listitem><para>&#x2294; Square union symbol (binary). Similar:
union&#160;<literal>cup</literal>. Related: variable-sized
operator&#160;<literal>\bigsqcup</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\sqsubset</primary></indexterm><literal>\sqsubset</literal>
</term><listitem><para>&#x228F; Square subset symbol (relation). Similar:
subset&#160;<literal>\subset</literal>. Not available in plain &tex;. In &latex; you need to load the <filename>amssymb</filename> package.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\sqsubseteq</primary></indexterm><literal>\sqsubseteq</literal>
</term><listitem><para>&#x2291; Square subset or equal symbol (binary). Similar: subset or
equal to&#160;<literal>\subseteq</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\sqsupset</primary></indexterm><literal>\sqsupset</literal>
</term><listitem><para>&#x2290; Square superset symbol (relation). Similar:
superset&#160;<literal>\supset</literal>. Not available in plain &tex;. In &latex; you need to load the <filename>amssymb</filename> package.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\sqsupseteq</primary></indexterm><literal>\sqsupseteq</literal>
</term><listitem><para>&#x2292; Square superset or equal symbol (binary). Similar: superset or
equal&#160;<literal>\supseteq</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\star</primary></indexterm><literal>\star</literal>
</term><listitem><para>&#x22C6; Five-pointed star, sometimes used as a general binary operation
but sometimes reserved for cross-correlation (binary). Similar: the
synonyms asterisk&#160;<literal>*</literal> and <literal>\ast</literal>, which are six-pointed,
and more often appear as a superscript or subscript, as with the Kleene
star.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\subset</primary></indexterm><literal>\subset</literal>
</term><listitem><para>&#x2282; Subset (occasionally, is implied by) (relation).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\subseteq</primary></indexterm><literal>\subseteq</literal>
</term><listitem><para>&#x2286; Subset or equal to (relation).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\succ</primary></indexterm><literal>\succ</literal>
</term><listitem><para>&#x227B; Comes after, succeeds (relation). Similar: is less
than&#160;<literal>&gt;</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\succeq</primary></indexterm><literal>\succeq</literal>
</term><listitem><para>&#x2AB0; Succeeds or is equal to (relation). Similar: less
than or equal to&#160;<literal>\leq</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\sum</primary></indexterm><literal>\sum</literal>
</term><listitem><para>&#x2211; Summation (operator). Similar: Greek capital
sigma&#160;<literal>\Sigma</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\supset</primary></indexterm><literal>\supset</literal>
</term><listitem><para>&#x2283; Superset (relation).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\supseteq</primary></indexterm><literal>\supseteq</literal>
</term><listitem><para>&#x2287; Superset or equal to (relation).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\surd</primary></indexterm><literal>\surd</literal>
</term><listitem><para>&#x221A; Radical symbol (ordinary).  The &latex; command
<literal>\sqrt{...}</literal> typesets the square root of the argument, with a bar
that extends to cover the argument.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\swarrow</primary></indexterm><literal>\swarrow</literal>
</term><listitem><para>&#x2199; Southwest-pointing  arrow (relation).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\tau</primary></indexterm><literal>\tau</literal>
</term><listitem><para>&#x03C4; Lower case Greek letter (ordinary).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\theta</primary></indexterm><literal>\theta</literal>
</term><listitem><para>&#x03B8; Lower case Greek letter (ordinary). The variant form is
<literal>\vartheta</literal>&#160;&#x03D1;.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\times</primary></indexterm><literal>\times</literal>
</term><listitem><para>&#x00D7; Primary school multiplication sign (binary). See
also&#160;<literal>\cdot</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\to</primary></indexterm><literal>\to</literal>
</term><listitem><para>&#x2192; Right-pointing single line arrow (relation).
Synonym:&#160;<literal>\rightarrow</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\top</primary></indexterm><literal>\top</literal>
</term><listitem><para>&#x22A4; Top, greatest element of a partially ordered set
(ordinary). See also&#160;<literal>\bot</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\triangle</primary></indexterm><literal>\triangle</literal>
</term><listitem><para>&#x25B3; Triangle (ordinary).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\triangleleft</primary></indexterm><literal>\triangleleft</literal>
</term><listitem><para>&#x25C1; Not-filled triangle pointing left
(binary). Similar:&#160;<literal>\lhd</literal>. For the normal subgroup symbol you
should load <filename>amssymb</filename> and use&#160;<literal>\vartriangleleft</literal> (which
is a relation and so gives better spacing).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\triangleright</primary></indexterm><literal>\triangleright</literal>
</term><listitem><para>&#x25B7; Not-filled triangle pointing right
(binary). For the normal subgroup symbol you should instead load
<filename>amssymb</filename> and use&#160;<literal>\vartriangleright</literal> (which is a
relation and so gives better spacing).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\unlhd</primary></indexterm><literal>\unlhd</literal>
</term><listitem><para>&#x22B4; Left-pointing not-filled underlined arrowhead, that
is, triangle, with a line under (binary). Not available in plain &tex;. In &latex; you need to load the <filename>amssymb</filename> package.  For
the normal subgroup symbol load <filename>amssymb</filename> and
use&#160;<literal>\vartrianglelefteq</literal> (which is a relation and so gives
better spacing).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\unrhd</primary></indexterm><literal>\unrhd</literal>
</term><listitem><para>&#x22B5; Right-pointing not-filled underlined arrowhead, that
is, triangle, with a line under (binary). Not available in plain &tex;. In &latex; you need to load the <filename>amssymb</filename> package.  For
the normal subgroup symbol load <filename>amssymb</filename> and
use&#160;<literal>\vartrianglerighteq</literal> (which is a relation and so gives
better spacing).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\Uparrow</primary></indexterm><literal>\Uparrow</literal>
</term><listitem><para>&#x21D1; Double-line upward-pointing arrow
(relation). Similar: single-line up-pointing
arrow&#160;<literal>\uparrow</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\uparrow</primary></indexterm><literal>\uparrow</literal>
</term><listitem><para>&#x2191; Single-line upward-pointing arrow, diverges
(relation). Similar: double-line up-pointing
arrow&#160;<literal>\Uparrow</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\Updownarrow</primary></indexterm><literal>\Updownarrow</literal>
</term><listitem><para>&#x21D5; Double-line upward-and-downward-pointing arrow
(relation). Similar: single-line upward-and-downward-pointing
arrow&#160;<literal>\updownarrow</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\updownarrow</primary></indexterm><literal>\updownarrow</literal>
</term><listitem><para>&#x2195; Single-line upward-and-downward-pointing arrow (relation). Similar:
double-line upward-and-downward-pointing arrow&#160;<literal>\Updownarrow</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\upharpoonright</primary></indexterm><literal>\upharpoonright</literal>
</term><listitem><para>&#x21BE; Up harpoon, with barb on right side
(relation). Synonym:&#160;<literal>&#92;restriction</literal>.  Not available in plain &tex;. In &latex; you need to load the <filename>amssymb</filename> package.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\uplus</primary></indexterm><literal>\uplus</literal>
</term><listitem><para>&#x228E; Multiset union, a union symbol with a plus symbol in
the middle (binary). Similar: union&#160;<literal>\cup</literal>. Related:
variable-sized operator&#160;<literal>\biguplus</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\Upsilon</primary></indexterm><literal>\Upsilon</literal>
</term><listitem><para>&#x03A5; Upper case Greek letter (ordinary).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\upsilon</primary></indexterm><literal>\upsilon</literal>
</term><listitem><para>&#x03C5; Lower case Greek letter (ordinary).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\varepsilon</primary></indexterm><literal>\varepsilon</literal>
</term><listitem><para>&#x03B5; Small letter script epsilon (ordinary).  This is
more widely used in mathematics than the non-variant lunate epsilon form
<literal>\epsilon</literal>&#160;&#x03F5;. Related: set
membership&#160;<literal>\in</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\vanothing</primary></indexterm><literal>\vanothing</literal>
</term><listitem><para>&#x2205; Empty set symbol. Similar:
<literal>\emptyset</literal>. Related: <literal>\revemptyset</literal>. Not available in plain &tex;. In &latex; you need to load the <filename>amssymb</filename> package.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\varphi</primary></indexterm><literal>\varphi</literal>
</term><listitem><para>&#x03C6; Variant on the lower case Greek letter (ordinary).
The non-variant form is <literal>\phi</literal>&#160;&#x03D5;.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\varpi</primary></indexterm><literal>\varpi</literal>
</term><listitem><para>&#x03D6; Variant on the lower case Greek letter (ordinary).
The non-variant form is <literal>\pi</literal>&#160;&#x03C0;.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\varrho</primary></indexterm><literal>\varrho</literal>
</term><listitem><para>&#x03F1; Variant on the lower case Greek letter (ordinary).
The non-variant form is <literal>\rho</literal>&#160;&#x03C1;.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\varsigma</primary></indexterm><literal>\varsigma</literal>
</term><listitem><para>&#x03C2; Variant on the lower case Greek letter
(ordinary).  The non-variant form is
<literal>\sigma</literal>&#160;&#x03C3;.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\vartheta</primary></indexterm><literal>\vartheta</literal>
</term><listitem><para>&#x03D1; Variant on the lower case Greek letter
(ordinary).  The non-variant form is
<literal>\theta</literal>&#160;&#x03B8;.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\vdash</primary></indexterm><literal>\vdash</literal>
</term><listitem><para>&#x22A2; Provable; turnstile, vertical and a dash
(relation). Similar: turnstile rotated a
half-circle&#160;<literal>\dashv</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\vee</primary></indexterm><literal>\vee</literal>
</term><listitem><para>&#x2228; Logical or; a downwards v shape (binary). Related:
logical and&#160;<literal>\wedge</literal>. Similar: variable-sized
operator&#160;<literal>\bigvee</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\Vert</primary></indexterm><literal>\Vert</literal>
</term><listitem><para>&#x2016; Vertical double bar (ordinary). Similar: vertical single
bar&#160;<literal>\vert</literal>.
</para>
<para>For a norm symbol, you can use the <filename>mathtools</filename> package and add
<literal>\DeclarePairedDelimiter\norm{\lVert}{\rVert}</literal> to your
preamble. This gives you three command variants for double-line
vertical bars that are correctly horizontally spaced: if in the
document body you write the starred version <literal>$\norm*{M^\perp}$</literal>
then the height of the vertical bars will match the height of the
argument, whereas with <literal>\norm{M^\perp}</literal> the bars do not grow
with the height of the argument but instead are the default height,
and <literal>\norm[<replaceable>size command</replaceable>]{M^\perp}</literal> also gives bars that
do not grow but are set to the size given in the <replaceable>size command</replaceable>,
e.g., <literal>\Bigg</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\vert</primary></indexterm><literal>\vert</literal>
</term><listitem><para>&#x007C; Single line vertical bar (ordinary). Similar: double-line
vertical bar&#160;<literal>\Vert</literal>. For such that, as in the definition of a 
set, use&#160;<literal>\mid</literal> because it is a relation.  
</para>
<para>For absolute value you can use the <filename>mathtools</filename> package and add
<literal>\DeclarePairedDelimiter\abs{\lvert}{\rvert}</literal> to your
preamble. This gives you three command variants for single-line vertical
bars that are correctly horizontally spaced: if in the document body you
write the starred version <literal>$\abs*{\frac{22}{7}}$</literal> then the
height of the vertical bars will match the height of the argument,
whereas with <literal>\abs{\frac{22}{7}}</literal> the bars do not grow with
the height of the argument but instead are the default height, and
<literal>\abs[<replaceable>size command</replaceable>]{\frac{22}{7}}</literal> also gives bars
that do not grow but are set to the size given in the <replaceable>size
command</replaceable>, e.g., <literal>\Bigg</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\wedge</primary></indexterm><literal>\wedge</literal>
</term><listitem><para>&#x2227; Logical and (binary).  Synonym:&#160;<literal>\land</literal>.  See also
logical or <literal>\vee</literal>. Similar: variable-sized
operator&#160;<literal>\bigwedge</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\wp</primary></indexterm><literal>\wp</literal>
</term><listitem><para>&#x2118; Weierstrass p (ordinary).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\wr</primary></indexterm><literal>\wr</literal>
</term><listitem><para>&#x2240; Wreath product (binary).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\Xi</primary></indexterm><literal>\Xi</literal>
</term><listitem><para>&#x039E; Upper case Greek letter (ordinary).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\xi</primary></indexterm><literal>\xi</literal>
</term><listitem><para>&#x03BE; Lower case Greek letter (ordinary).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\zeta</primary></indexterm><literal>\zeta</literal>
</term><listitem><para>&#x03B6; Lower case Greek letter (ordinary).
</para>
</listitem></varlistentry></variablelist>

</sect1>
<sect1 label="16.3" id="Math-functions">
<title>Math functions</title>

<indexterm role="cp"><primary>math functions</primary></indexterm>
<indexterm role="cp"><primary>functions, math</primary></indexterm>

<para>These commands produce roman function names in math mode with proper
spacing.
</para>
<variablelist><varlistentry><term><indexterm role="fn"><primary>\arccos</primary></indexterm><literal>\arccos</literal>
</term><listitem><para><inlineequation><mathphrase>\arccos</mathphrase></inlineequation>
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\arcsin</primary></indexterm><literal>\arcsin</literal>
</term><listitem><para><inlineequation><mathphrase>\arcsin</mathphrase></inlineequation>
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\arctan</primary></indexterm><literal>\arctan</literal>
</term><listitem><para><inlineequation><mathphrase>\arctan</mathphrase></inlineequation>
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\arg</primary></indexterm><literal>\arg</literal>
</term><listitem><para><inlineequation><mathphrase>\arg</mathphrase></inlineequation>
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\bmod</primary></indexterm><literal>\bmod</literal>
</term><listitem><para>Binary modulo operator (<inlineequation><mathphrase>x \bmod y</mathphrase></inlineequation>)
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\cos</primary></indexterm><literal>\cos</literal>
</term><listitem><para><inlineequation><mathphrase>\cos</mathphrase></inlineequation>
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\cosh</primary></indexterm><literal>\cosh</literal>
</term><listitem><para><inlineequation><mathphrase>\cosh</mathphrase></inlineequation>
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\cot</primary></indexterm><literal>\cot</literal>
</term><listitem><para><inlineequation><mathphrase>\cot</mathphrase></inlineequation>
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\coth</primary></indexterm><literal>\coth</literal>
</term><listitem><para><inlineequation><mathphrase>\coth</mathphrase></inlineequation>
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\csc</primary></indexterm><literal>\csc</literal>
</term><listitem><para><inlineequation><mathphrase>\csc</mathphrase></inlineequation>
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\deg</primary></indexterm><literal>\deg</literal>
</term><listitem><para><inlineequation><mathphrase>\deg</mathphrase></inlineequation>
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\det</primary></indexterm><literal>\det</literal>
</term><listitem><para><inlineequation><mathphrase>\det</mathphrase></inlineequation>
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\dim</primary></indexterm><literal>\dim</literal>
</term><listitem><para><inlineequation><mathphrase>\dim</mathphrase></inlineequation>
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\exp</primary></indexterm><literal>\exp</literal>
</term><listitem><para><inlineequation><mathphrase>\exp</mathphrase></inlineequation>
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\gcd</primary></indexterm><literal>\gcd</literal>
</term><listitem><para><inlineequation><mathphrase>\gcd</mathphrase></inlineequation>
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\hom</primary></indexterm><literal>\hom</literal>
</term><listitem><para><inlineequation><mathphrase>\hom</mathphrase></inlineequation>
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\inf</primary></indexterm><literal>\inf</literal>
</term><listitem><para><inlineequation><mathphrase>\inf</mathphrase></inlineequation>
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\ker</primary></indexterm><literal>\ker</literal>
</term><listitem><para><inlineequation><mathphrase>\ker</mathphrase></inlineequation>
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\lg</primary></indexterm><literal>\lg</literal>
</term><listitem><para><inlineequation><mathphrase>\lg</mathphrase></inlineequation>
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\lim</primary></indexterm><literal>\lim</literal>
</term><listitem><para><inlineequation><mathphrase>\lim</mathphrase></inlineequation>
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\liminf</primary></indexterm><literal>\liminf</literal>
</term><listitem><para><inlineequation><mathphrase>\liminf</mathphrase></inlineequation>
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\limsup</primary></indexterm><literal>\limsup</literal>
</term><listitem><para><inlineequation><mathphrase>\limsup</mathphrase></inlineequation>
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\ln</primary></indexterm><literal>\ln</literal>
</term><listitem><para><inlineequation><mathphrase>\ln</mathphrase></inlineequation>
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\log</primary></indexterm><literal>\log</literal>
</term><listitem><para><inlineequation><mathphrase>\log</mathphrase></inlineequation>
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\max</primary></indexterm><literal>\max</literal>
</term><listitem><para><inlineequation><mathphrase>\max</mathphrase></inlineequation>
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\min</primary></indexterm><literal>\min</literal>
</term><listitem><para><inlineequation><mathphrase>\min</mathphrase></inlineequation>
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\pmod</primary></indexterm><literal>\pmod</literal>
</term><listitem><para>parenthesized modulus, as in (<inlineequation><mathphrase>\pmod 2^n - 1</mathphrase></inlineequation>)
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\Pr</primary></indexterm><literal>\Pr</literal>
</term><listitem><para><inlineequation><mathphrase>\Pr</mathphrase></inlineequation>
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\sec</primary></indexterm><literal>\sec</literal>
</term><listitem><para><inlineequation><mathphrase>\sec</mathphrase></inlineequation>
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\sin</primary></indexterm><literal>\sin</literal>
</term><listitem><para><inlineequation><mathphrase>\sin</mathphrase></inlineequation>
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\sinh</primary></indexterm><literal>\sinh</literal>
</term><listitem><para><inlineequation><mathphrase>\sinh</mathphrase></inlineequation>
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\sup</primary></indexterm><literal>\sup</literal>
</term><listitem><para><inlineequation><mathphrase>\sup</mathphrase></inlineequation>
<!-- don't try to use \sup with dvi/pdf output since that turned into a -->
<!-- Texinfo command and it's not worth hassling with different versions -->
<!-- when it's just three roman letters anyway. -->
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\tan</primary></indexterm><literal>\tan</literal>
</term><listitem><para><inlineequation><mathphrase>\tan</mathphrase></inlineequation>
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\tanh</primary></indexterm><literal>\tanh</literal>
</term><listitem><para><inlineequation><mathphrase>\tanh</mathphrase></inlineequation>
</para>
</listitem></varlistentry></variablelist>

</sect1>
<sect1 label="16.4" id="Math-accents">
<title>Math accents</title>

<indexterm role="cp"><primary>math accents</primary></indexterm>
<indexterm role="cp"><primary>accents, mathematical</primary></indexterm>

<para>&latex; provides a variety of commands for producing accented letters
in math.  These are different from accents in normal text
(see <link linkend="Accents">Accents</link>).
</para>
<variablelist><varlistentry><term><indexterm role="fn"><primary>\acute</primary></indexterm><literal>\acute</literal>
</term><listitem><indexterm role="cp"><primary>acute accent, math</primary></indexterm>
<para>Math acute accent: <inlineequation><mathphrase>\acute{x}</mathphrase></inlineequation>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\bar</primary></indexterm><literal>\bar</literal>
</term><listitem><indexterm role="cp"><primary>bar-over accent, math</primary></indexterm>
<indexterm role="cp"><primary>macron accent, math</primary></indexterm>
<para>Math bar-over accent: <inlineequation><mathphrase>\bar{x}</mathphrase></inlineequation>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\breve</primary></indexterm><literal>\breve</literal>
</term><listitem><indexterm role="cp"><primary>breve accent, math</primary></indexterm>
<para>Math breve accent: <inlineequation><mathphrase>\breve{x}</mathphrase></inlineequation>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\check</primary></indexterm><literal>\check</literal>
</term><listitem><indexterm role="cp"><primary>check accent, math</primary></indexterm>
<indexterm role="cp"><primary>h&#225;&#269;ek accent, math</primary></indexterm>
<para>Math h&#225;&#269;ek (check) accent: <inlineequation><mathphrase>\check{x}</mathphrase></inlineequation>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\ddot</primary></indexterm><literal>\ddot</literal>
</term><listitem><indexterm role="cp"><primary>double dot accent, math</primary></indexterm>
<para>Math dieresis accent: <inlineequation><mathphrase>\ddot{x}</mathphrase></inlineequation>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\dot</primary></indexterm><literal>\dot</literal>
</term><listitem><indexterm role="cp"><primary>overdot accent, math</primary></indexterm>
<indexterm role="cp"><primary>dot over accent, math</primary></indexterm>
<para>Math dot accent: <inlineequation><mathphrase>\dot{x}</mathphrase></inlineequation>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\grave</primary></indexterm><literal>\grave</literal>
</term><listitem><indexterm role="cp"><primary>grave accent, math</primary></indexterm>
<para>Math grave accent: <inlineequation><mathphrase>\grave{x}</mathphrase></inlineequation>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\hat</primary></indexterm><literal>\hat</literal>
</term><listitem><indexterm role="cp"><primary>hat accent, math</primary></indexterm>
<indexterm role="cp"><primary>circumflex accent, math</primary></indexterm>
<para>Math hat (circumflex) accent: <inlineequation><mathphrase>\hat{x}</mathphrase></inlineequation>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\imath</primary></indexterm><literal>\imath</literal>
</term><listitem><indexterm role="cp"><primary>dotless i, math</primary></indexterm>
<para>Math dotless i.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\jmath</primary></indexterm><literal>\jmath</literal>
</term><listitem><indexterm role="cp"><primary>dotless j, math</primary></indexterm>
<para>Math dotless j.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\mathring</primary></indexterm><literal>\mathring</literal>
</term><listitem><indexterm role="cp"><primary>ring accent, math</primary></indexterm>
<para>Math ring accent: x*.  <!-- don't bother implementing in texinfo -->
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\tilde</primary></indexterm><literal>\tilde</literal>
</term><listitem><indexterm role="cp"><primary>tilde accent, math</primary></indexterm>
<para>Math tilde accent: <inlineequation><mathphrase>\tilde{x}</mathphrase></inlineequation>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\vec</primary></indexterm><literal>\vec</literal>
</term><listitem><indexterm role="cp"><primary>vector symbol, math</primary></indexterm>
<para>Math vector symbol: <inlineequation><mathphrase>\vec{x}</mathphrase></inlineequation>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\widehat</primary></indexterm><literal>\widehat</literal>
</term><listitem><indexterm role="cp"><primary>wide hat accent, math</primary></indexterm>
<para>Math wide hat accent: <inlineequation><mathphrase>\widehat{x+y}</mathphrase></inlineequation>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\widetilde</primary></indexterm><literal>\widetilde</literal>
</term><listitem><indexterm role="cp"><primary>wide tilde accent, math</primary></indexterm>
<para>Math wide tilde accent: <inlineequation><mathphrase>\widetilde{x+y}</mathphrase></inlineequation>.
</para>
</listitem></varlistentry></variablelist>

</sect1>
<sect1 label="16.5" id="Spacing-in-math-mode">
<title>Spacing in math mode</title>

<indexterm role="cp"><primary>spacing within math mode</primary></indexterm>
<indexterm role="cp"><primary>math mode, spacing</primary></indexterm>

<para>In a <literal>math</literal> environment, &latex; ignores the spaces that you use
in the source, and instead puts in the spacing according to the normal
rules for mathematics texts.  
</para>
<para>Many math mode spacing definitions are expressed in terms of the math unit
<firstterm>mu</firstterm> given by 1 em = 18 mu, where the em is taken from the current
math symbols family (see <link linkend="Units-of-length">Units of length</link>).
&latex; provides the following commands for use in math mode:
</para>
<variablelist><varlistentry><term><literal>\;</literal>
</term><listitem><indexterm role="fn"><primary>\;</primary></indexterm>
<indexterm role="fn"><primary>\thickspace</primary></indexterm>
<para>Normally <literal>5.0mu plus 5.0mu</literal>.  The longer name is
<literal>\thickspace</literal>.  Math mode only.
</para>
</listitem></varlistentry><varlistentry><term><literal>\:</literal>
</term><term><literal>\&gt;</literal>
</term><listitem><indexterm role="fn"><primary>\:</primary></indexterm>
<indexterm role="fn"><primary>\&gt;</primary></indexterm>
<indexterm role="fn"><primary>\medspace</primary></indexterm>
<para>Normally <literal>4.0mu plus 2.0mu minus 4.0mu</literal>.  The longer name is
<literal>\medspace</literal>.  Math mode only.
</para>
</listitem></varlistentry><varlistentry><term><literal>\,</literal>
</term><listitem><indexterm role="fn"><primary>\,</primary></indexterm>
<indexterm role="fn"><primary>\thinspace</primary></indexterm>
<para>Normally <literal>3mu</literal>.  The longer name is <literal>\thinspace</literal>.  This can
be used in both math mode and text mode. See <link linkend="_005cthinspace">\thinspace</link>.
</para>
</listitem></varlistentry><varlistentry><term><literal>\!</literal>
</term><listitem><indexterm role="fn"><primary>\!</primary></indexterm>
<para>A negative thin space. Normally <literal>-3mu</literal>.  Math mode only.
</para>
</listitem></varlistentry><varlistentry><term><literal>\quad</literal>
</term><listitem><indexterm role="cp"><primary>quad</primary></indexterm>
<indexterm role="fn"><primary>\quad</primary></indexterm>
<para>This is 18mu, that is, 1em. This is often used for space
surrounding equations or expressions, for instance for the space between
two equations inside a <literal>displaymath</literal> environment.  It is available
in both text and math mode.
</para>
</listitem></varlistentry><varlistentry><term><literal>\qquad</literal>
</term><listitem><indexterm role="fn"><primary>\qquad</primary></indexterm>
<para>A length of 2 quads, that is, 36mu = 2em.  It is available in
both text and math mode.
</para></listitem></varlistentry></variablelist>
<para>In this example a thinspace separates the function from the
infinitesimal.
</para>
<screen>\int_0^1 f(x)\,dx
</screen>

</sect1>
<sect1 label="16.6" id="Math-miscellany">
<title>Math miscellany</title>

<indexterm role="cp"><primary>math miscellany</primary></indexterm>

<variablelist><varlistentry><term><indexterm role="fn"><primary>\*</primary></indexterm><literal>\*</literal>
</term><listitem><indexterm role="cp"><primary>discretionary multiplication</primary></indexterm>
<indexterm role="cp"><primary>multiplication symbol, discretionary line break</primary></indexterm>
<para>A <firstterm>discretionary</firstterm> multiplication symbol, at which a line break is
allowed. Without the break multiplication is implicitly indicated by a
space, while in the case of a break a &#x00D7; symbol is
printed immediately before the break. So
</para>
<screen>\documentclass{article}
\begin{document}
Now \(A_3 = 0\), hence the product of all terms \(A_1\) 
through \(A_4\), that is \(A_1\* A_2\* A_3 \* A_4\), is 
equal to zero.
\end{document}
</screen>
<para>will make that sort of output<!-- -->
 <!-- /@w -->(the ellipsis &#8216;<literal>[&#8230;]</literal>&#8217; is here to show the line break at
the same place as in a &tex; output)<!-- -->
:
</para>
<para>Now <inlineequation><mathphrase>A_3 = 0</mathphrase></inlineequation>,
[&#8230;]
<inlineequation><mathphrase>A_1</mathphrase></inlineequation>
through <inlineequation><mathphrase>A_4</mathphrase></inlineequation>, that is <inlineequation><mathphrase>A_1 A_2 \times</mathphrase></inlineequation>
<inlineequation><mathphrase>A_3 A_4</mathphrase></inlineequation>, is
equal to zero.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\cdots</primary></indexterm><literal>\cdots</literal>
</term><listitem><para>A horizontal ellipsis with the dots raised to the center of the line.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\ddots</primary></indexterm><literal>\ddots</literal>
</term><listitem><para>A diagonal ellipsis: <inlineequation><mathphrase>\ddots</mathphrase></inlineequation>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\frac{<replaceable>num</replaceable>}{<replaceable>den</replaceable>}</primary></indexterm><literal>\frac{<replaceable>num</replaceable>}{<replaceable>den</replaceable>}</literal>
</term><listitem><indexterm role="fn"><primary>\frac</primary></indexterm>
<para>Produces the fraction <replaceable>num</replaceable> divided by <replaceable>den</replaceable>.
</para>

</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\left <replaceable>delim1</replaceable> ... \right <replaceable>delim2</replaceable></primary></indexterm><literal>\left <replaceable>delim1</replaceable> ... \right <replaceable>delim2</replaceable></literal>
</term><listitem><indexterm role="fn"><primary>\right</primary></indexterm>
<indexterm role="cp"><primary>null delimiter</primary></indexterm>
<para>The two delimiters need not match; &#8216;<literal>.</literal>&#8217; acts as a <firstterm>null delimiter</firstterm>,
producing no output.  The delimiters are sized according to the math
in between.  Example: <literal>\left( \sum_{i=1}^{10} a_i \right]</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\mathdollar</primary></indexterm><literal>\mathdollar</literal>
</term><listitem><para>Dollar sign in math mode: $.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\mathellipsis</primary></indexterm><literal>\mathellipsis</literal>
</term><listitem><para>Ellipsis (spaced for text) in math mode: &#8230;.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\mathparagraph</primary></indexterm><literal>\mathparagraph</literal>
</term><listitem><para>Paragraph sign (pilcrow) in math mode: &#x00B6;.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\mathsection</primary></indexterm><literal>\mathsection</literal>
</term><listitem><para>Section sign in math mode.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\mathsterling</primary></indexterm><literal>\mathsterling</literal>
</term><listitem><para>Sterling sign in math mode: &#163;.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\mathunderscore</primary></indexterm><literal>\mathunderscore</literal>
</term><listitem><para>Underscore in math mode: _.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\overbrace{<replaceable>math</replaceable>}</primary></indexterm><literal>\overbrace{<replaceable>math</replaceable>}</literal>
</term><listitem><para>Generates a brace over <replaceable>math</replaceable>.
For example, <literal>\overbrace{x+\cdots+x}^{k \;\textrm{times}}</literal>.
</para>        
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\overline{<replaceable>text</replaceable>}</primary></indexterm><literal>\overline{<replaceable>text</replaceable>}</literal>
</term><listitem><para>Generates a horizontal line over <replaceable>tex</replaceable>.
For example, <literal>\overline{x+y}</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\sqrt[<replaceable>root</replaceable>]{<replaceable>arg</replaceable>}</primary></indexterm><literal>\sqrt[<replaceable>root</replaceable>]{<replaceable>arg</replaceable>}</literal>
</term><listitem><para>Produces the representation of the square root of <replaceable>arg</replaceable>.  The
optional argument <replaceable>root</replaceable> determines what root to produce.  For
example, the cube root of <literal>x+y</literal> would be typed as
<literal>\sqrt[3]{x+y}</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\stackrel{<replaceable>text</replaceable>}{<replaceable>relation</replaceable>}</primary></indexterm><literal>\stackrel{<replaceable>text</replaceable>}{<replaceable>relation</replaceable>}</literal>
</term><listitem><para>Puts <replaceable>text</replaceable> above <replaceable>relation</replaceable>.  For example,
<literal>\stackrel{f}{\longrightarrow}</literal>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\underbrace{<replaceable>math</replaceable>}</primary></indexterm><literal>\underbrace{<replaceable>math</replaceable>}</literal>
</term><listitem><para>Generates <replaceable>math</replaceable> with a brace underneath. For example, <literal>\underbrace{x+y+z}_{&gt;\,0}</literal>
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\underline{<replaceable>text</replaceable>}</primary></indexterm><literal>\underline{<replaceable>text</replaceable>}</literal>
</term><listitem><para>Causes <replaceable>text</replaceable>, which may be either math mode or not, to be
underlined.  The line is always below the text, taking account of
descenders.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\vdots</primary></indexterm><literal>\vdots</literal>
</term><listitem><para>Produces a vertical ellipsis.
</para>
</listitem></varlistentry></variablelist>

</sect1>
</chapter>
<chapter label="17" id="Modes">
<title>Modes</title>

<indexterm role="cp"><primary>modes</primary></indexterm>
<indexterm role="cp"><primary>paragraph mode</primary></indexterm>
<indexterm role="cp"><primary>math mode</primary></indexterm>
<indexterm role="cp"><primary>left-to-right mode</primary></indexterm>
<indexterm role="cp"><primary>LR mode</primary></indexterm>

<para>When &latex; is processing your input text, it is always in one of three
modes:
</para>
<itemizedlist><listitem><para>Paragraph mode
</para></listitem><listitem><para>Math mode
</para></listitem><listitem><para>Left-to-right mode, called LR mode for short
</para></listitem></itemizedlist>
<para>Mode changes occur only when entering or leaving an environment, or when
&latex; is processing the argument of certain text-producing commands.
</para>
<para><firstterm>Paragraph mode</firstterm> is the most common; it&#8217;s the one &latex; is in
when processing ordinary text.  In this mode, &latex; breaks the
input text into lines and breaks the lines into pages.
</para>
<para>&latex; is in <firstterm>math mode</firstterm> when it&#8217;s generating a mathematical
formula, either displayed math or within a line.
</para>
<indexterm role="fn"><primary>\mbox, and LR mode</primary></indexterm>
<para>In <firstterm>LR mode</firstterm>, as in paragraph mode, &latex; considers the output
that it produces to be a string of words with spaces between them.
However, unlike paragraph mode, &latex; keeps going from left to
right; it never starts a new line in LR mode.  Even if you put a
hundred words into an <literal>\mbox</literal>, &latex; would keep typesetting
them from left to right inside a single box (and then most likely
complain because the resulting box was too wide to fit on the line).
&latex; is in LR mode when it starts making a box with an
<literal>\mbox</literal> command.  You can get it to enter a different mode inside
the box&#8212;for example, you can make it enter math mode to put a
formula in the box.
</para>
<para>There are also several text-producing commands and environments for
making a box that put &latex; into paragraph mode.  The box made by
one of these commands or environments will be called a <literal>parbox</literal>.
When &latex; is in paragraph mode while making a box, it is said to
be in &#8220;inner paragraph mode&#8221; (no page breaks).  Its normal paragraph
mode, which it starts out in, is called &#8220;outer paragraph mode&#8221;.
</para>

<sect1 label="17.1" id="_005censuremath">
<title><literal>\ensuremath</literal></title>

<para>Synopsis:
</para>
<screen>\ensuremath{<replaceable>formula</replaceable>}
</screen>
<para>The <literal>\ensuremath</literal> command ensures that <replaceable>formula</replaceable> is typeset in
math mode whatever the current mode in which the command is used.
</para>
<para>For instance:
</para>
<screen>\documentclass{report}
\newcommand{\ab}{\ensuremath{(\delta, \varepsilon)}}
\begin{document}
Now, the \ab\ pair is equal to \(\ab = (\frac{1}{\pi}, 0)\), ...
\end{document}
</screen>
<para>One can redefine commands that can be used only in math mode so that
they ca be used in any mode like in the following example given for
<literal>\leadsto</literal>:
</para>
<!-- Vincent 2 Karl : "Tous les chemins mènent à Rome" is a French saying -->
<!-- meaning that there are many different ways to get the same result. I -->
<!-- am not sure whether in English the given example is also funny. -->
<screen>\documentclass{report}
\usepackage{amssymb}
\newcommand{\originalMeaningOfLeadsTo}{}
\let\originalMeaningOfLeadsTo\leadsto
\renewcommand\leadsto{\ensuremath{\originalMeaningOfLeadsTo}}
\begin{document}
All roads \leadsto\ Rome.
\end{document}
</screen>

</sect1>
</chapter>
<chapter label="18" id="Page-styles">
<title>Page styles</title>

<indexterm role="cp"><primary>styles, page</primary></indexterm>
<indexterm role="cp"><primary>page styles</primary></indexterm>

<para>The <literal>\documentclass</literal> command determines the size and position of
the page&#8217;s head and foot.  The page style determines what goes in them.
</para>


<sect1 label="18.1" id="_005cmaketitle">
<title><literal>\maketitle</literal></title>

<indexterm role="cp"><primary>titles, making</primary></indexterm>
<indexterm role="fn"><primary>\maketitle</primary></indexterm>

<para>The <literal>\maketitle</literal> command generates a title on a separate title
page&#8212;except in the <literal>article</literal> class, where the title is placed
at the top of the first page.  Information used to produce the title
is obtained from the following declarations:
</para>
<variablelist><varlistentry><term><indexterm role="fn"><primary>\author{<replaceable>name</replaceable> \and <replaceable>name2</replaceable>}</primary></indexterm><literal>\author{<replaceable>name</replaceable> \and <replaceable>name2</replaceable>}</literal>
</term><listitem><indexterm role="cp"><primary>author, for titlepage</primary></indexterm>
<indexterm role="fn"><primary>\\ for <literal>\author</literal></primary></indexterm>
<indexterm role="fn"><primary>\and for <literal>\author</literal></primary></indexterm>
<para>The <literal>\author</literal> command declares the document author(s), where the
argument is a list of authors separated by <literal>\and</literal> commands.  Use
<literal>\\</literal> to separate lines within a single author&#8217;s entry&#8212;for
example, to give the author&#8217;s institution or address.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\date{<replaceable>text</replaceable>}</primary></indexterm><literal>\date{<replaceable>text</replaceable>}</literal>
</term><listitem><indexterm role="cp"><primary>date, for titlepage</primary></indexterm>
<para>The <literal>\date</literal> command declares <replaceable>text</replaceable> to be the document&#8217;s
date.  With no <literal>\date</literal> command, the current date (see <link linkend="_005ctoday">\today</link>)
is used.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\thanks{<replaceable>text</replaceable>}</primary></indexterm><literal>\thanks{<replaceable>text</replaceable>}</literal>
</term><listitem><indexterm role="cp"><primary>thanks, for titlepage</primary></indexterm>
<indexterm role="cp"><primary>credit footnote</primary></indexterm>
<para>The <literal>\thanks</literal> command produces a <literal>\footnote</literal> to the title,
usually used for credit acknowledgements.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\title{<replaceable>text</replaceable>}</primary></indexterm><literal>\title{<replaceable>text</replaceable>}</literal>
</term><listitem><indexterm role="cp"><primary>title, for titlepage</primary></indexterm>
<indexterm role="fn"><primary>\\ for <literal>\title</literal></primary></indexterm>
<para>The <literal>\title</literal> command declares <replaceable>text</replaceable> to be the title of the
document.  Use <literal>\\</literal> to force a line break, as usual.
</para>
</listitem></varlistentry></variablelist>

</sect1>
<sect1 label="18.2" id="_005cpagenumbering">
<title><literal>\pagenumbering</literal></title>

<indexterm role="fn"><primary>\pagenumbering</primary></indexterm>
<indexterm role="cp"><primary>page numbering style</primary></indexterm>

<para>Synopsis:
</para>
<screen>\pagenumbering{<replaceable>style</replaceable>}
</screen>
<para>Specifies the style of page numbers, according to <replaceable>style</replaceable>; also
resets the page number to 1.  The <replaceable>style</replaceable> argument is one of
the following:
</para>
<variablelist><varlistentry><term><literal>arabic</literal>
</term><listitem><para>arabic numerals
</para>
</listitem></varlistentry><varlistentry><term><literal>roman</literal>
</term><listitem><para>lowercase Roman numerals
</para>
</listitem></varlistentry><varlistentry><term><literal>Roman</literal>
</term><listitem><para>uppercase Roman numerals
</para>
</listitem></varlistentry><varlistentry><term><literal>alph</literal>
</term><listitem><para>lowercase letters
</para>
</listitem></varlistentry><varlistentry><term><literal>Alph</literal>
</term><listitem><para>uppercase letters
</para></listitem></varlistentry></variablelist>

</sect1>
<sect1 label="18.3" id="_005cpagestyle">
<title><literal>\pagestyle</literal></title>

<indexterm role="fn"><primary>\pagestyle</primary></indexterm>
<indexterm role="cp"><primary>header style</primary></indexterm>
<indexterm role="cp"><primary>footer style</primary></indexterm>
<indexterm role="cp"><primary>running header and footer style</primary></indexterm>

<para>Synopsis:
</para>
<screen>\pagestyle{<replaceable>style</replaceable>}
</screen>
<para>The <literal>\pagestyle</literal> command specifies how the headers and footers
are typeset from the current page onwards.  Values for <replaceable>style</replaceable>:
</para>
<variablelist><varlistentry><term><literal>plain</literal>
</term><listitem><para>Just a plain page number.
</para>
</listitem></varlistentry><varlistentry><term><literal>empty</literal>
</term><listitem><para>Empty headers and footers, e.g., no page numbers.
</para>
</listitem></varlistentry><varlistentry><term><literal>headings</literal>
</term><listitem><para>Put running headers on each page.  The document style specifies what
goes in the headers.
</para>
</listitem></varlistentry><varlistentry><term><literal>myheadings</literal>
</term><listitem><para>Custom headers, specified via the <literal>\markboth</literal> or the
<literal>\markright</literal> commands.
</para>
</listitem></varlistentry></variablelist>
<para>Here are the descriptions of <literal>\markboth</literal> and <literal>\markright</literal>:
</para>
<variablelist><varlistentry><term><indexterm role="fn"><primary>\markboth{<replaceable>left</replaceable>}{<replaceable>right</replaceable>}</primary></indexterm><literal>\markboth{<replaceable>left</replaceable>}{<replaceable>right</replaceable>}</literal>
</term><listitem><para>Sets both the left and the right heading.  A &#8220;left-hand heading&#8221;
(<replaceable>left</replaceable>) is generated by the last <literal>\markboth</literal> command before
the end of the page, while a &#8220;right-hand heading&#8221; (<replaceable>right</replaceable>) is
generated by the first <literal>\markboth</literal> or <literal>\markright</literal> that
comes on the page if there is one, otherwise by the last one before
the page.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\markright{<replaceable>right</replaceable>}</primary></indexterm><literal>\markright{<replaceable>right</replaceable>}</literal>
</term><listitem><para>Sets the right heading, leaving the left heading unchanged.
</para>
</listitem></varlistentry></variablelist>

</sect1>
<sect1 label="18.4" id="_005cthispagestyle">
<title><literal>\thispagestyle{<replaceable>style</replaceable>}</literal></title>

<indexterm role="fn"><primary>\thispagestyle</primary></indexterm>

<para>The <literal>\thispagestyle</literal> command works in the same manner as the
<literal>\pagestyle</literal> command (see previous section) except that it
changes to <replaceable>style</replaceable> for the current page only.
</para>

</sect1>
</chapter>
<chapter label="19" id="Spaces">
<title>Spaces</title>

<indexterm role="cp"><primary>spaces</primary></indexterm>
<indexterm role="cp"><primary>white space</primary></indexterm>

<para>&latex; has many ways to produce white (or filled) space.
</para>


<sect1 label="19.1" id="_005chspace">
<title><literal>\hspace</literal></title>

<indexterm role="fn"><primary>\hspace</primary></indexterm>

<para>Synopsis:
</para>
<screen>\hspace{<replaceable>length</replaceable>}
\hspace*{<replaceable>length</replaceable>}
</screen>
<para>Add the horizontal space given by <replaceable>length</replaceable>.  The <replaceable>length</replaceable> is a
rubber length, that is, it may contain a <literal>plus</literal> or <literal>minus</literal>
component, in any unit that &latex; understands (see <link linkend="Lengths">Lengths</link>).
</para>
<para>This command can add both positive and negative space; adding negative
space is like backspacing.
</para>
<para>Normally when &tex; breaks a paragraph into lines it discards white
space (glues and kerns) that would come at the start of a line, so you
get an inter-word space or a line break between words but not both. This
command&#8217;s starred version <literal>\hspace*{...}</literal> puts a non-discardable
invisible item in front of the space, so the space appears in the
output.
</para>
<para>This example make a one-line paragraph that puts &#8216;<literal>Name:</literal>&#8217; an inch
from the right margin.
</para>
<screen>\noindent\makebox[\linewidth]{\hspace{\fill}Name:\hspace{1in}}
</screen>

</sect1>
<sect1 label="19.2" id="_005chfill">
<title><literal>\hfill</literal></title>

<indexterm role="fn"><primary>\hfill</primary></indexterm>

<indexterm role="cp"><primary>stretch, infinite horizontal</primary></indexterm>
<indexterm role="cp"><primary>infinite horizontal stretch</primary></indexterm>
<para>Produce a rubber length which has
no natural space but can stretch horizontally as far as
needed (see <link linkend="Lengths">Lengths</link>).
</para>
<indexterm role="fn"><primary>\fill</primary></indexterm>
<para>The command <literal>\hfill</literal> is equivalent to <literal>\hspace{\fill}</literal>.  For
space that does not disappear at line breaks use
<literal>\hspace*{\fill}</literal> instead (see <link linkend="_005chspace">\hspace</link>).
</para>

</sect1>
<sect1 label="19.3" id="_005c_0028SPACE_0029-and-_005c_0040">
<title><literal>\(SPACE)</literal> and \@</title>

<indexterm role="fn"><primary>\(SPACE)</primary></indexterm>
<indexterm role="fn"><primary>\TAB</primary></indexterm>
<indexterm role="fn"><primary>\NEWLINE</primary></indexterm>
<indexterm role="fn"><primary>\@</primary></indexterm>
<anchor id="_005cAT"/><!-- old name -->

<para>Mark a punctuation character, typically a period, as either ending a
sentence or as ending an abbreviation.
</para>
<para>By default, in justifying a line &latex; adjusts the space after a
sentence-ending period (or a question mark, exclamation point, comma, or
colon) more than the space between words
(see <link linkend="_005cfrenchspacing">\frenchspacing</link>). &latex; assumes that the period ends a
sentence unless it is preceded by a capital letter, in which case it
takes that period for part of an abbreviation.  Note that if a
sentence-ending period is immediately followed by a right parenthesis or
bracket, or right single or double quote, then the inter-sentence space
follows that parenthesis or quote.
</para>
<para>If you have a period ending an abbreviation whose last letter is not a
capital letter, and that abbreviation is not the last word in the
sentence, then follow that period with a backslash-space (<literal>\ </literal>) or
a tie (<literal>~</literal>).  Examples are <literal>Nat.\ Acad.\ Science</literal>, and
<literal>Mr.~Bean</literal>, and <literal>(manure, etc.)\ for sale</literal>.
</para>
<para>For another use of <literal>\ </literal>, see <link linkend="_005c_0028SPACE_0029-after-control-sequence">\(SPACE) after control sequence</link>.
</para>
<para>In the opposite situation, if you have a capital letter followed by a
period that ends the sentence, then put <literal>\@</literal> before that period.
For example, <literal>book by the MAA\@.</literal> will have inter-sentence
spacing after the period.
</para>
<para>In contrast, putting <literal>\@</literal> after a period tells &tex; that the
period does not end the sentence.  In the example <literal>reserved words
(if, then, etc.\@) are different</literal>, &tex; will put interword space
after the closing parenthesis (note that <literal>\@</literal> is before the
parenthesis).
</para>

</sect1>
<sect1 label="19.4" id="_005c_0028SPACE_0029-after-control-sequence">
<title><literal>\ </literal> after control sequence</title>

<para>The <literal>\ </literal> command is often used after control sequences to keep
them from gobbling the space that follows, as in &#8216;<literal>\TeX\ is nice</literal>&#8217;.
And, under normal circumstances, <literal>\</literal><keycap>tab</keycap> and
<literal>\</literal><keycap>newline</keycap> are equivalent to <literal>\ </literal>. For another use of
<literal>\ </literal>, see also <link linkend="_005c_0028SPACE_0029-and-_005c_0040">\(SPACE) and \@</link>.
</para>
<para>Some people prefer to use <literal>{}</literal> for the same purpose, as in
<literal>\TeX{} is nice</literal>. This has the advantage that you can always
write it the same way, namely <literal>\TeX{}</literal>, whether it is followed
by a space or by a punctuation mark. Compare:
</para>
<screen>\TeX\ is a nice system. \TeX, a nice system.

\TeX{} is a nice system. \TeX{}, a nice system.
</screen>
<indexterm role="cp"><primary>package, <literal>xspace</literal></primary></indexterm>
<indexterm role="cp"><primary><literal>xspace</literal> package</primary></indexterm>
<para>Some individual commands, notably those defined with the <literal>xspace</literal>,
package do not follow the standard behavior.
</para>

</sect1>
<sect1 label="19.5" id="_005cfrenchspacing">
<title><literal>\frenchspacing</literal></title>

<indexterm role="fn"><primary>\frenchspacing</primary></indexterm>
<indexterm role="fn"><primary>\nonfrenchspacing</primary></indexterm>
<indexterm role="cp"><primary>spacing, inter-sentence</primary></indexterm>

<para>This declaration (from Plain &tex;) causes &latex; to treat
inter-sentence spacing in the same way as interword spacing.
</para>
<para>In justifying the text in a line, some typographic traditions, including
English, prefer to adjust the space between sentences (or after other
punctuation marks) more than the space between words.  Following this
declaration, all spaces are instead treated equally.
</para>
<para>Revert to the default behavior by declaring <literal>\nonfrenchspacing</literal>.
</para>

</sect1>
<sect1 label="19.6" id="_005cthinspace">
<title><literal>\thinspace</literal>: Insert 1/6em</title>

<indexterm role="fn"><primary>\thinspace</primary></indexterm>

<para><literal>\thinspace</literal> produces an unbreakable and unstretchable space that
is 1/6 of an em.  This is the proper space to use between nested
quotes, as in &#8217;&#8221;.<!-- Abuse @dmn, which is a thin space in Texinfo. -->
</para>

</sect1>
<sect1 label="19.7" id="_005c_002f">
<title><literal>\/</literal>: Insert italic correction</title>

<indexterm role="fn"><primary>\/</primary></indexterm>
<indexterm role="cp"><primary>italic correction</primary></indexterm>

<para>The <literal>\/</literal> command produces an <firstterm>italic correction</firstterm>.  This is a
small space defined by the font designer for a given character,
to avoid the character colliding with whatever follows.  The italic
<emphasis>f</emphasis> character typically has a large italic correction value.
</para>
<para>If the following character is a period or comma, it&#8217;s not necessary to
insert an italic correction, since those punctuation symbols have a
very small height.  However, with semicolons or colons, as well as
normal letters, it can help. Compare
<emphasis>f: f;</emphasis> (in the &tex; output, the &#8216;f&#8217;s are nicely separated)
with <emphasis>f: f;</emphasis>.
</para>
<para>When changing fonts with commands such as <literal>\textit{italic
text}</literal> or <literal>{\itshape italic text}</literal>, &latex; will
automatically insert an italic correction if appropriate (see <link linkend="Font-styles">Font
styles</link>).
</para>
<para>Despite the name, roman characters can also have an italic
correction.  Compare
pdf&tex; (in the &tex; output, there is a small space after the &#8216;f&#8217;)
with pdf&tex;.
</para>
<para>There is no concept of italic correction in math mode; spacing is done
in a different way.
</para>

</sect1>
<sect1 label="19.8" id="_005chrulefill-_005cdotfill">
<title><literal>\hrulefill \dotfill</literal></title>

<indexterm role="fn"><primary>\hrulefill</primary></indexterm>
<indexterm role="fn"><primary>\dotfill</primary></indexterm>

<para>Produce an infinite rubber length (see <link linkend="Lengths">Lengths</link>) filled with a
horizontal rule (that is, a line) or with dots, instead of just white
space.
</para>
<para>When placed between blank lines this example creates a paragraph that is
left and right justified, where the space in the middle is filled with
evenly spaced dots.
</para>
<screen>\noindent Jack Aubrey\dotfill Melbury Lodge
</screen>
<para>To make the rule or dots go to the line&#8217;s end use <literal>\null</literal> at the
start or end.  
</para>
<para>To change the rule&#8217;s thickness, copy the definition and adjust it, as
with <literal>\renewcommand{\hrulefill}{\leavevmode\leaders\hrule height
1pt\hfill\kern\z@}</literal>, which changes the default thickness of
0.4pt to 1pt.  Similarly, adjust the dot spacing as with
<literal>\renewcommand{\dotfill}{\leavevmode\cleaders\hb@xt@
1.00em{\hss .\hss }\hfill\kern\z@}</literal>, which changes the default
length of 0.33em to 1.00em.
</para>

</sect1>
<sect1 label="19.9" id="_005caddvspace">
<title><literal>\addvspace</literal></title>

<indexterm role="fn"><primary>\addvspace</primary></indexterm>
<indexterm role="cp"><primary>vertical space</primary></indexterm>
<indexterm role="cp"><primary>space, inserting vertical</primary></indexterm>

<para><literal>\addvspace{<replaceable>length</replaceable>}</literal>
</para>
<para>Add a vertical space of height <replaceable>length</replaceable>, which is a rubber length
(see <link linkend="Lengths">Lengths</link>).  However, if vertical space has already been added to
the same point in the output by a previous <literal>\addvspace</literal> command
then this command will not add more space than what is needed to make
the natural length of the total vertical space equal to <replaceable>length</replaceable>.
</para>
<para>Use this command to adjust the vertical space above or below an
environment that starts a new paragraph.  For instance, a Theorem
environment is defined to begin and end with <literal>\addvspace{...}</literal>
so that two consecutive Theorem&#8217;s are separated by one vertical space,
not two.
</para>
<para>This command is fragile (see <link linkend="_005cprotect">\protect</link>).
</para>
<para>The error &#8216;<literal>Something's wrong--perhaps a missing \item</literal>&#8217; means that
you were not in vertical mode when you invoked this command; one way to
change that is to precede this command with a <literal>\par</literal> command.
</para>

</sect1>
<sect1 label="19.10" id="_005cbigskip-_005cmedskip-_005csmallskip">
<title><literal>\bigskip \medskip \smallskip</literal></title>

<para>These commands produce a given amount of space, specified by the
document class.
</para>
<variablelist><varlistentry><term><indexterm role="fn"><primary>\bigskip</primary></indexterm><literal>\bigskip</literal>
</term><listitem><indexterm role="fn"><primary>\bigskipamount</primary></indexterm>
<para>The same as <literal>\vspace{\bigskipamount}</literal>, ordinarily about one line
space, with stretch and shrink (the default for the <literal>book</literal> and
<literal>article</literal> classes is <literal>12pt plus 4pt minus 4pt</literal>).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\medskip</primary></indexterm><literal>\medskip</literal>
</term><listitem><indexterm role="fn"><primary>\medskipamount</primary></indexterm>
<para>The same as <literal>\vspace{\medskipamount}</literal>, ordinarily about half of
a line space, with stretch and shrink (the default for the <literal>book</literal>
and <literal>article</literal> classes is <literal>6pt plus 2pt minus 2pt</literal>).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\smallskip</primary></indexterm><literal>\smallskip</literal>
</term><listitem><indexterm role="fn"><primary>\smallskipamount</primary></indexterm>
<para>The same as <literal>\vspace{\smallskipamount}</literal>, ordinarily about a
quarter of a line space, with stretch and shrink (the default for the
<literal>book</literal> and <literal>article</literal> classes is <literal>3pt plus 1pt minus
1pt</literal>).
</para>
</listitem></varlistentry></variablelist>

</sect1>
<sect1 label="19.11" id="_005cvfill">
<title><literal>\vfill</literal></title>

<indexterm role="fn"><primary>\vfill</primary></indexterm>

<indexterm role="cp"><primary>stretch, infinite vertical</primary></indexterm>
<indexterm role="cp"><primary>infinite vertical stretch</primary></indexterm>

<para>End the current paragraph and insert a vertical rubber length
(see <link linkend="Lengths">Lengths</link>) that is infinite, so it can stretch or shrink as far
as needed.
</para>
<para>It is often used in the same way as <literal>\vspace{\fill}</literal>, except that
<literal>\vfill</literal> ends the current paragraph, whereas
<literal>\vspace{\fill}</literal> adds the infinite vertical space below its line
irrespective of the paragraph structure.  In both cases that space will
disappear at a page boundary; to circumvent this see&#160;<link linkend="_005cvspace">\vspace</link>.
</para>
<para>In this example the page is filled, so the top and bottom lines contain
the text &#8216;<literal>Lost Dog!</literal>&#8217; and the third &#8216;<literal>Lost Dog!</literal>&#8217; is exactly
halfway between them.
</para> 
<screen>\begin{document}
Lost Dog!
\vfill
Lost Dog!
\vfill
Lost Dog!
\end{document}
</screen>

</sect1>
<sect1 label="19.12" id="_005cvspace">
<title><literal>\vspace{<replaceable>length</replaceable>}</literal></title>

<indexterm role="fn"><primary>\vspace</primary></indexterm>
<indexterm role="cp"><primary>vertical space</primary></indexterm>
<indexterm role="cp"><primary>space, vertical</primary></indexterm>

<para>Synopsis, one of these two:
</para>
<screen>\vspace{<replaceable>length</replaceable>}
\vspace*{<replaceable>length</replaceable>}
</screen>
<para>Add the vertical space <replaceable>length</replaceable>.  This can be negative or positive,
and is a rubber length (see <link linkend="Lengths">Lengths</link>).
</para>
<para>&latex; removes the vertical space from <literal>\vspace</literal> at a page
break, that is, at the top or bottom of a page.  The starred version
<literal>\vspace*{...}</literal> causes the space to stay.
</para>
<para>If <literal>\vspace</literal> is used in the middle of a paragraph (i.e., in
horizontal mode), the space is inserted <emphasis>after</emphasis> the line with
the <literal>\vspace</literal> command.  A new paragraph is not started.
</para>
<para>In this example the two questions will be evenly spaced vertically on
the page, with at least one inch of space below each.
</para>
<screen>\begin{document}
1) Who put the bomp in the bomp bah bomp bah bomp?
\vspace{1in plus 1fill}

2) Who put the ram in the rama lama ding dong?
\vspace{1in plus 1fill}
\end{document}
</screen>

</sect1>
</chapter>
<chapter label="20" id="Boxes">
<title>Boxes</title>

<indexterm role="cp"><primary>boxes</primary></indexterm>

<para>All the predefined length parameters (see <link linkend="Predefined-lengths">Predefined lengths</link>) can be
used in the arguments of the box-making commands.
</para>


<sect1 label="20.1" id="_005cmbox">
<title><literal>\mbox{<replaceable>text}</replaceable></literal></title>

<indexterm role="fn"><primary>\mbox</primary></indexterm>

<indexterm role="cp"><primary>hyphenation, preventing</primary></indexterm>
<para>The <literal>\mbox</literal> command creates a box just wide enough to hold the
text created by its argument.  The <replaceable>text</replaceable> is not broken into
lines, so it can be used to prevent hyphenation.
</para>

</sect1>
<sect1 label="20.2" id="_005cfbox-and-_005cframebox">
<title><literal>\fbox</literal> and <literal>\framebox</literal></title>

<indexterm role="fn"><primary>\fbox</primary></indexterm>
<indexterm role="fn"><primary>\framebox</primary></indexterm>

<para>Synopses:
</para>
<screen>\fbox{<replaceable>text</replaceable>}
\framebox[<replaceable>width</replaceable>][<replaceable>position</replaceable>]{<replaceable>text</replaceable>}
</screen>
<para>The <literal>\fbox</literal> and <literal>\framebox</literal> commands are like <literal>\mbox</literal>,
except that they put a frame around the outside of the box being created.
</para>
<para>In addition, the <literal>\framebox</literal> command allows for explicit
specification of the box width with the optional <replaceable>width</replaceable> argument
(a dimension), and positioning with the optional <replaceable>position</replaceable>
argument. <!-- xxref -->
</para>
<indexterm role="fn"><primary>\fboxrule</primary></indexterm>
<indexterm role="fn"><primary>\fboxsep</primary></indexterm>
<para>Both commands produce a rule of thickness <literal>\fboxrule</literal> (default
&#8216;<literal>.4pt</literal>&#8217;), and leave a space of <literal>\fboxsep</literal> (default
&#8216;<literal>3pt</literal>&#8217;) between the rule and the contents of the box.
</para>
<para>See <link linkend="_005cframebox-_0028picture_0029">\framebox (picture)</link>, for the <literal>\framebox</literal> command in the
<literal>picture</literal> environment.
</para>

</sect1>
<sect1 label="20.3" id="lrbox">
<title><literal>lrbox</literal></title>

<indexterm role="fn"><primary>lrbox</primary></indexterm>

<para>Synopsis:
</para>
<screen>\begin{lrbox}{\<replaceable>cmd</replaceable>} 
  <replaceable>text </replaceable>
\end{lrbox}
</screen>
<para>This is the environment form of <link linkend="_005csbox"><literal>\sbox</literal></link>.
</para>
<para>The <replaceable>text</replaceable> inside the environment is saved in the box <literal>\<replaceable>cmd</replaceable></literal>,
which must have been declared with <literal>\newsavebox</literal>.
</para>

</sect1>
<sect1 label="20.4" id="_005cmakebox">
<title><literal>\makebox</literal></title>

<indexterm role="fn"><primary>\makebox</primary></indexterm>

<para>Synopsis:
</para>
<screen>\makebox[<replaceable>width</replaceable>][<replaceable>position</replaceable>]{<replaceable>text</replaceable>}
</screen>
<para>The <literal>\makebox</literal> command creates a box just wide enough to contain
the <replaceable>text</replaceable> specified.  The width of the box can be overridden by the
optional <replaceable>width</replaceable> argument.  The position of the text within the box
is determined by the optional <replaceable>position</replaceable> argument, which may take
the following values:
</para>
<variablelist><varlistentry><term><literal>c</literal>
</term><listitem><para>Centered (default).
</para></listitem></varlistentry><varlistentry><term><literal>l</literal>
</term><listitem><para>Flush left.
</para></listitem></varlistentry><varlistentry><term><literal>r</literal>
</term><listitem><para>Flush right.
</para></listitem></varlistentry><varlistentry><term><literal>s</literal>
</term><listitem><para>Stretch (justify) across entire <replaceable>width</replaceable>; <replaceable>text</replaceable> must contain
stretchable space for this to work.
</para></listitem></varlistentry></variablelist>
<para><literal>\makebox</literal> is also used within the <literal>picture</literal> environment
see <link linkend="_005cmakebox-_0028picture_0029">\makebox (picture)</link>.
</para>

</sect1>
<sect1 label="20.5" id="_005cparbox">
<title><literal>\parbox</literal></title>

<indexterm role="fn"><primary>\parbox</primary></indexterm>

<para>Synopsis:
</para>
<screen>\parbox[<replaceable>position</replaceable>][<replaceable>height</replaceable>][<replaceable>inner-pos</replaceable>]{<replaceable>width</replaceable>}{<replaceable>text</replaceable>}
</screen>
<para>The <literal>\parbox</literal> command produces a box whose contents are created
in <literal>paragraph</literal> mode.  It should be used to make a box small
pieces of text, with nothing fancy inside.  In particular, you
shouldn&#8217;t use any paragraph-making environments inside a
<literal>\parbox</literal> argument.  For larger pieces of text, including ones
containing a paragraph-making environment, you should use a
<literal>minipage</literal> environment (see <link linkend="minipage">minipage</link>).
</para>
<para><literal>\parbox</literal> has two mandatory arguments:
</para>
<variablelist><varlistentry><term><replaceable>width</replaceable>
</term><listitem><para>the width of the parbox;
</para></listitem></varlistentry><varlistentry><term><replaceable>text</replaceable>
</term><listitem><para>the text that goes inside the parbox.
</para></listitem></varlistentry></variablelist>
<para>By default &latex; will position vertically a parbox so its center
lines up with the center of the surrounding text line.  When the
optional <replaceable>position</replaceable> argument is present and equal either to &#8216;<literal>t</literal>&#8217;
or &#8216;<literal>b</literal>&#8217;, this allows you respectively to align either the top or
bottom line in the parbox with the baseline of the surrounding text. You
may also specify &#8216;<literal>m</literal>&#8217; for <replaceable>position</replaceable> to get the default
behaviour.
</para>
<para>The optional <replaceable>height</replaceable> argument overrides the natural height of the box.
</para>
<para>The <replaceable>inner-pos</replaceable> argument controls the placement of the text inside
the box, as follows; if it is not specified, <replaceable>position</replaceable> is used.
</para>
<variablelist><varlistentry><term><literal>t</literal>
</term><listitem><para>text is placed at the top of the box.
</para></listitem></varlistentry><varlistentry><term><literal>c</literal>
</term><listitem><para>text is centered in the box.
</para></listitem></varlistentry><varlistentry><term><literal>b</literal>
</term><listitem><para>text is placed at the bottom of the box.
</para></listitem></varlistentry><varlistentry><term><literal>s</literal>
</term><listitem><para>stretch vertically; the text must contain vertically stretchable space
for this to work.
</para></listitem></varlistentry></variablelist>

</sect1>
<sect1 label="20.6" id="_005craisebox">
<title><literal>\raisebox</literal></title>

<indexterm role="fn"><primary>\raisebox</primary></indexterm>

<para>Synopsis:
</para>
<screen>\raisebox{<replaceable>distance</replaceable>}[<replaceable>height</replaceable>][<replaceable>depth</replaceable>]{<replaceable>text</replaceable>}
</screen>
<para>The <literal>\raisebox</literal> command raises or lowers <replaceable>text</replaceable>.  The first
mandatory argument specifies how high <replaceable>text</replaceable> is to be raised (or
lowered if it is a negative amount).  <replaceable>text</replaceable> itself is processed
in LR mode.
</para>
<para>The optional arguments <replaceable>height</replaceable> and <replaceable>depth</replaceable> are dimensions.  If
they are specified, &latex; treats <replaceable>text</replaceable> as extending a certain
distance above the baseline (<replaceable>height</replaceable>) or below (<replaceable>depth</replaceable>),
ignoring its natural height and depth.
</para>

</sect1>
<sect1 label="20.7" id="_005csavebox">
<title><literal>\savebox</literal></title>

<indexterm role="fn"><primary>\savebox</primary></indexterm>

<para>Synopsis:
</para>
<screen>\savebox{<replaceable>\boxcmd</replaceable>}[<replaceable>width</replaceable>][<replaceable>pos</replaceable>]{<replaceable>text</replaceable>}
</screen>
<para>This command typeset <replaceable>text</replaceable> in a box just as with <literal>\makebox</literal>
(see <link linkend="_005cmakebox">\makebox</link>), except that instead of printing the resulting box,
it saves it in the box labeled <replaceable>\boxcmd</replaceable>, which must have been
declared with <literal>\newsavebox</literal> (see <link linkend="_005cnewsavebox">\newsavebox</link>).
</para>

</sect1>
<sect1 label="20.8" id="_005csbox">
<title><literal>\sbox{<replaceable>\boxcmd</replaceable>}{<replaceable>text</replaceable>}</literal></title>

<indexterm role="fn"><primary>\sbox</primary></indexterm>

<para>Synopsis:
</para>
<screen>\sbox{<replaceable>\boxcmd</replaceable>}{<replaceable>text</replaceable>}
</screen>
<para><literal>\sbox</literal> types <replaceable>text</replaceable> in a box just as with <literal>\mbox</literal>
(see <link linkend="_005cmbox">\mbox</link>) except that instead of the resulting box being
included in the normal output, it is saved in the box labeled
<replaceable>\boxcmd</replaceable>.  <replaceable>\boxcmd</replaceable> must have been previously declared with
<literal>\newsavebox</literal> (see <link linkend="_005cnewsavebox">\newsavebox</link>).
</para>

</sect1>
<sect1 label="20.9" id="_005cusebox">
<title><literal>\usebox{<replaceable>\boxcmd</replaceable>}</literal></title>

<indexterm role="fn"><primary>\usebox</primary></indexterm>

<para>Synopsis:
</para>
<screen>\usebox{<replaceable>\boxcmd</replaceable>}
</screen>
<para><literal>\usebox</literal> produces the box most recently saved in the bin
<replaceable>\boxcmd</replaceable> by a <literal>\savebox</literal> command (see <link linkend="_005csavebox">\savebox</link>).
</para>

</sect1>
</chapter>
<chapter label="21" id="Special-insertions">
<title>Special insertions</title>

<indexterm role="cp"><primary>special insertions</primary></indexterm>
<indexterm role="cp"><primary>insertions of special characters</primary></indexterm>

<para>&latex; provides commands for inserting characters that have a
special meaning do not correspond to simple characters you can type.
</para>


<sect1 label="21.1" id="Reserved-characters">
<title>Reserved characters</title>

<indexterm role="cp"><primary>reserved characters</primary></indexterm>
<indexterm role="cp"><primary>characters, reserved</primary></indexterm>
<indexterm role="cp"><primary>special characters</primary></indexterm>
<indexterm role="cp"><primary>characters, special</primary></indexterm>
<para>&latex; sets aside the following characters for special purposes (for
example, the percent sign&#160;<literal>%</literal> is for comments) so they are
called <firstterm>reserved characters</firstterm> or <firstterm>special characters</firstterm>.
</para>
<screen># $ % &amp; { } _ ~ ^ \ 
</screen>
<indexterm role="fn"><primary>\#</primary></indexterm>
<indexterm role="fn"><primary>\$</primary></indexterm>
<indexterm role="fn"><primary>\%</primary></indexterm>
<indexterm role="fn"><primary>\&amp;</primary></indexterm>
<indexterm role="fn"><primary>\_</primary></indexterm>
<indexterm role="fn"><primary>\{</primary></indexterm>
<indexterm role="fn"><primary>\}</primary></indexterm>
<para>If you want a reserved character to be printed as itself, in the text
body font, for all but the final three characters in that list simply
put a backslash&#160;<literal>\</literal> in front of the character.  Thus,
<literal>\$1.23</literal> will produce&#160;<literal>$1.23</literal> in your output.
</para>
<indexterm role="fn"><primary>\~</primary></indexterm>
<indexterm role="fn"><primary>\^</primary></indexterm>
<indexterm role="fn"><primary>\textbackslash</primary></indexterm>
<para>As to the last three characters, to get a tilde in the text body font
use <literal>\~{}</literal> (omitting the curly braces would result in the next
character receiving a tilde accent).  Similarly, to get a get a text
body font circumflex use <literal>\^{}</literal>.  A text body font backslash
results from <literal>\textbackslash{}</literal>.
</para>
<para>To produce the reserved characters in a typewriter font use
<literal>\verb!!</literal>, as below.
</para>
<screen>\begin{center}
  \# \$ \% \&amp; \{ \} \_ \~{} \^{} \textbackslash \\
  \verb!# $ % &amp; { } _ ~ ^ \!
\end{center}
</screen>
<para>In that example the double backslash&#160;<literal>\\</literal> is only there to
split the lines.
</para>

</sect1>
<sect1 label="21.2" id="Symbols-by-font-position">
<title>Symbols by font position</title>

<indexterm role="fn"><primary>\symbol</primary></indexterm>
<indexterm role="cp"><primary>accessing any character of a font</primary></indexterm>
<indexterm role="cp"><primary>font symbols, by number</primary></indexterm>

<para>You can access any character of the current font using its number with
the <literal>\symbol</literal> command. For example, the visible space character
used in the <literal>\verb*</literal> command has the code decimal 32, so it can be
typed as <literal>\symbol{32}</literal>.
</para>
<para>You can also specify numbers in octal (base 8) by using a <literal>'</literal>
prefix, or hexadecimal (base 16) with a <literal>&quot;</literal> prefix, so the previous
example could also be written as <literal>\symbol{'40}</literal> or
<literal>\symbol{&quot;20}</literal>.
</para>

</sect1>
<sect1 label="21.3" id="Text-symbols">
<title>Text symbols</title>

<indexterm role="cp"><primary>text symbols</primary></indexterm>
<indexterm role="cp"><primary>symbols, text</primary></indexterm>

<indexterm role="fn"><primary>textcomp package</primary></indexterm>
<para>&latex; provides commands to generate a number of non-letter symbols
in running text.  Some of these, especially the more obscure ones, are
not available in OT1; you may need to load the <literal>textcomp</literal> package.
</para>
<variablelist><varlistentry><term><indexterm role="fn"><primary>\copyright</primary></indexterm><literal>\copyright</literal>
</term><term><indexterm role="fn"><primary>\textcopyright</primary></indexterm><literal>\textcopyright</literal>
</term><listitem><indexterm role="cp"><primary>copyright symbol</primary></indexterm>
<para>The copyright symbol, &#169;.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\dag</primary></indexterm><literal>\dag</literal>
</term><listitem><indexterm role="cp"><primary>dagger, in text</primary></indexterm>
<para>The dagger symbol (in text).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\ddag</primary></indexterm><literal>\ddag</literal>
</term><listitem><indexterm role="cp"><primary>double dagger, in text</primary></indexterm>
<para>The double dagger symbol (in text).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\LaTeX</primary></indexterm><literal>\LaTeX</literal>
</term><listitem><indexterm role="cp"><primary>&latex; logo</primary></indexterm>
<indexterm role="cp"><primary>logo, &latex;</primary></indexterm>
<para>The &latex; logo.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\LaTeXe</primary></indexterm><literal>\LaTeXe</literal>
</term><listitem><indexterm role="cp"><primary>&latex;2e logo</primary></indexterm>
<indexterm role="cp"><primary>logo, &latex;2e</primary></indexterm>
<para>The &latex;2e logo.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\guillemotleft (&#171;)</primary></indexterm><literal>\guillemotleft (&#171;)</literal>
</term><term><indexterm role="fn"><primary>\guillemotright (&#187;)</primary></indexterm><literal>\guillemotright (&#187;)</literal>
</term><term><indexterm role="fn"><primary>\guilsinglleft (&#8249;)</primary></indexterm><literal>\guilsinglleft (&#8249;)</literal>
</term><term><indexterm role="fn"><primary>\guilsinglright (&#8250;)</primary></indexterm><literal>\guilsinglright (&#8250;)</literal>
</term><listitem><indexterm role="cp"><primary>double guillemets</primary></indexterm>
<indexterm role="cp"><primary>single guillemets</primary></indexterm>
<indexterm role="cp"><primary>left angle quotation marks</primary></indexterm>
<indexterm role="cp"><primary>right angle quotation marks</primary></indexterm>
<indexterm role="cp"><primary>double angle quotation marks</primary></indexterm>
<indexterm role="cp"><primary>single angle quotation marks</primary></indexterm>
<indexterm role="cp"><primary>French quotation marks</primary></indexterm>
<indexterm role="cp"><primary>quotation marks, French</primary></indexterm>
<para>Double and single angle quotation marks, commonly used in French:
&#171;, &#187;, &#8249;, &#8250;.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\ldots</primary></indexterm><literal>\ldots</literal>
</term><term><indexterm role="fn"><primary>\dots</primary></indexterm><literal>\dots</literal>
</term><term><indexterm role="fn"><primary>\textellipsis</primary></indexterm><literal>\textellipsis</literal>
</term><listitem><indexterm role="cp"><primary>ellipsis</primary></indexterm>
<para>An ellipsis (three dots at the baseline): &#8216;&#8230;&#8217;.  <literal>\ldots</literal>
and <literal>\dots</literal> also work in math mode.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\lq</primary></indexterm><literal>\lq</literal>
</term><listitem><indexterm role="cp"><primary>left quote</primary></indexterm>
<indexterm role="cp"><primary>opening quote</primary></indexterm>
<para>Left (opening) quote: &#8216;.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\P</primary></indexterm><literal>\P</literal>
</term><term><indexterm role="fn"><primary>\textparagraph</primary></indexterm><literal>\textparagraph</literal>
</term><listitem><indexterm role="cp"><primary>paragraph symbol</primary></indexterm>
<indexterm role="cp"><primary>pilcrow</primary></indexterm>
<para>Paragraph sign (pilcrow): &#x00B6;.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\pounds</primary></indexterm><literal>\pounds</literal>
</term><term><indexterm role="fn"><primary>\textsterling</primary></indexterm><literal>\textsterling</literal>
</term><listitem><indexterm role="cp"><primary>pounds symbol</primary></indexterm>
<indexterm role="cp"><primary>sterling symbol</primary></indexterm>
<para>English pounds sterling: &#163;.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\quotedblbase (&#8222;)</primary></indexterm><literal>\quotedblbase (&#8222;)</literal>
</term><term><indexterm role="fn"><primary>\quotesinglbase (&#8218;)</primary></indexterm><literal>\quotesinglbase (&#8218;)</literal>
</term><listitem><indexterm role="cp"><primary>double low-9 quotation mark</primary></indexterm>
<indexterm role="cp"><primary>single low-9 quotation mark</primary></indexterm>
<indexterm role="cp"><primary>low-9 quotation marks, single and double</primary></indexterm>
<para>Double and single quotation marks on the baseline:
&#8222; and &#8218;.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\rq</primary></indexterm><literal>\rq</literal>
</term><listitem><indexterm role="cp"><primary>right quote</primary></indexterm>
<indexterm role="cp"><primary>closing quote</primary></indexterm>
<para>Right (closing) quote: &#8217;.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\S</primary></indexterm><literal>\S</literal>
</term><listitem><para>\itemx \textsection
<indexterm role="cp"><primary>section symbol</primary></indexterm>
Section sign: &#x00A7;.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\TeX</primary></indexterm><literal>\TeX</literal>
</term><listitem><indexterm role="cp"><primary>&tex; logo</primary></indexterm>
<indexterm role="cp"><primary>logo, &tex;</primary></indexterm>
<para>The &tex; logo.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\textasciicircum</primary></indexterm><literal>\textasciicircum</literal>
</term><listitem><indexterm role="cp"><primary>circumflex, ASCII, in text</primary></indexterm>
<indexterm role="cp"><primary>ASCII circumflex, in text</primary></indexterm>
<para>ASCII circumflex: ^.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\textasciitilde</primary></indexterm><literal>\textasciitilde</literal>
</term><listitem><indexterm role="cp"><primary>tilde, ASCII, in text</primary></indexterm>
<indexterm role="cp"><primary>ASCII tilde, in text</primary></indexterm>
<para>ASCII tilde: ~.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\textasteriskcentered</primary></indexterm><literal>\textasteriskcentered</literal>
</term><listitem><indexterm role="cp"><primary>asterisk, centered, in text</primary></indexterm>
<indexterm role="cp"><primary>centered asterisk, in text</primary></indexterm>
<para>Centered asterisk: *.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\textbackslash</primary></indexterm><literal>\textbackslash</literal>
</term><listitem><indexterm role="cp"><primary>backslash, in text</primary></indexterm>
<para>Backslash: \.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\textbar</primary></indexterm><literal>\textbar</literal>
</term><listitem><indexterm role="cp"><primary>vertical bar, in text</primary></indexterm>
<indexterm role="cp"><primary>bar, vertical, in text</primary></indexterm>
<para>Vertical bar: |.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\textbardbl</primary></indexterm><literal>\textbardbl</literal>
</term><listitem><indexterm role="cp"><primary>vertical bar, double, in text</primary></indexterm>
<indexterm role="cp"><primary>bar, double vertical, in text</primary></indexterm>
<indexterm role="cp"><primary>double vertical bar, in text</primary></indexterm>
<para>Double vertical bar.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\textbigcircle</primary></indexterm><literal>\textbigcircle</literal>
</term><listitem><indexterm role="cp"><primary>big circle symbols, in text</primary></indexterm>
<indexterm role="cp"><primary>circle symbol, big, in text</primary></indexterm>
<para>Big circle symbol.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\textbraceleft</primary></indexterm><literal>\textbraceleft</literal>
</term><listitem><indexterm role="cp"><primary>left brace, in text</primary></indexterm>
<indexterm role="cp"><primary>brace, left, in text</primary></indexterm>
<para>Left brace: {.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\textbraceright</primary></indexterm><literal>\textbraceright</literal>
</term><listitem><indexterm role="cp"><primary>right brace, in text</primary></indexterm>
<indexterm role="cp"><primary>brace, right, in text</primary></indexterm>
<para>Right brace: }.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\textbullet</primary></indexterm><literal>\textbullet</literal>
</term><listitem><indexterm role="cp"><primary>bullet, in text</primary></indexterm>
<para>Bullet: &#8226;.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\textcircled{<replaceable>letter</replaceable>}</primary></indexterm><literal>\textcircled{<replaceable>letter</replaceable>}</literal>
</term><listitem><indexterm role="cp"><primary>circled letter, in text</primary></indexterm>
<para><replaceable>letter</replaceable> in a circle, as in &#174;.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\textcompwordmark</primary></indexterm><literal>\textcompwordmark</literal>
</term><term><indexterm role="fn"><primary>\textcapitalcompwordmark</primary></indexterm><literal>\textcapitalcompwordmark</literal>
</term><term><indexterm role="fn"><primary>\textascendercompwordmark</primary></indexterm><literal>\textascendercompwordmark</literal>
</term><listitem><indexterm role="cp"><primary>composite word mark, in text</primary></indexterm>
<indexterm role="cp"><primary>cap height</primary></indexterm>
<indexterm role="cp"><primary>ascender height</primary></indexterm>
<para>Composite word mark (invisible).  The <literal>\textcapital...</literal> form
has the cap height of the font, while the <literal>\textascender...</literal> form
has the ascender height.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\textdagger</primary></indexterm><literal>\textdagger</literal>
</term><listitem><indexterm role="cp"><primary>dagger, in text</primary></indexterm>
<para>Dagger: <inlineequation><mathphrase>\dag</mathphrase></inlineequation>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\textdaggerdbl</primary></indexterm><literal>\textdaggerdbl</literal>
</term><listitem><indexterm role="cp"><primary>dagger, double, in text</primary></indexterm>
<indexterm role="cp"><primary>double dagger, in text</primary></indexterm>
<para>Double dagger: <inlineequation><mathphrase>\ddag</mathphrase></inlineequation>.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\textdollar (or <literal>\$</literal>)</primary></indexterm><literal>\textdollar (or <literal>\$</literal>)</literal>
</term><listitem><indexterm role="cp"><primary>dollar sign</primary></indexterm>
<indexterm role="cp"><primary>currency, dollar</primary></indexterm>
<para>Dollar sign: $.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\textemdash (or <literal>---</literal>)</primary></indexterm><literal>\textemdash (or <literal>---</literal>)</literal>
</term><listitem><indexterm role="cp"><primary>em-dash</primary></indexterm>
<para>Em-dash: &#8212; (for punctuation).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\textendash (or <literal>--</literal>)</primary></indexterm><literal>\textendash (or <literal>--</literal>)</literal>
</term><listitem><indexterm role="cp"><primary>e-dash</primary></indexterm>
<para>En-dash: &#8211; (for ranges).
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\texteuro</primary></indexterm><literal>\texteuro</literal>
</term><listitem><indexterm role="cp"><primary>euro symbol</primary></indexterm>
<indexterm role="cp"><primary>currency, euro</primary></indexterm>
<para>The Euro symbol: &#8364;.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\textexclamdown (or <literal>!`</literal>)</primary></indexterm><literal>\textexclamdown (or <literal>!`</literal>)</literal>
</term><listitem><indexterm role="cp"><primary>exclamation point, upside-down</primary></indexterm>
<para>Upside down exclamation point: &#161;.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\textgreater</primary></indexterm><literal>\textgreater</literal>
</term><listitem><indexterm role="cp"><primary>greater than symbol, in text</primary></indexterm>
<para>Greater than: &gt;.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\textless</primary></indexterm><literal>\textless</literal>
</term><listitem><indexterm role="cp"><primary>less than symbol, in text</primary></indexterm>
<para>Less than: &lt;.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\textleftarrow</primary></indexterm><literal>\textleftarrow</literal>
</term><listitem><indexterm role="cp"><primary>arrow, left, in text</primary></indexterm>
<indexterm role="cp"><primary>left arrow, in text</primary></indexterm>
<para>Left arrow.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\textordfeminine</primary></indexterm><literal>\textordfeminine</literal>
</term><term><indexterm role="fn"><primary>\textordmasculine</primary></indexterm><literal>\textordmasculine</literal>
</term><listitem><indexterm role="cp"><primary>feminine ordinal symbol</primary></indexterm>
<indexterm role="cp"><primary>masculine ordinal symbol</primary></indexterm>
<indexterm role="cp"><primary>ordinals, feminine and masculine</primary></indexterm>
<indexterm role="cp"><primary>Spanish ordinals, feminine and masculine</primary></indexterm>
<para>Feminine and masculine ordinal symbols: &#170;, &#186;.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\textperiodcentered</primary></indexterm><literal>\textperiodcentered</literal>
</term><listitem><indexterm role="cp"><primary>period, centered, in text</primary></indexterm>
<indexterm role="cp"><primary>centered period, in text</primary></indexterm>
<para>Centered period: &#x00B7;.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\textquestiondown (or <literal>?`</literal>)</primary></indexterm><literal>\textquestiondown (or <literal>?`</literal>)</literal>
</term><listitem><indexterm role="cp"><primary>question mark, upside-down</primary></indexterm>
<para>Upside down question mark: &#191;.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\textquotedblleft (or <literal>``</literal>)</primary></indexterm><literal>\textquotedblleft (or <literal>``</literal>)</literal>
</term><listitem><indexterm role="cp"><primary>left quote, double</primary></indexterm>
<indexterm role="cp"><primary>double left quote</primary></indexterm>
<para>Double left quote: &#8220;.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\textquotedblright (or <literal>''</literal>)</primary></indexterm><literal>\textquotedblright (or <literal>''</literal>)</literal>
</term><listitem><indexterm role="cp"><primary>right quote, double</primary></indexterm>
<indexterm role="cp"><primary>double right quote</primary></indexterm>
<para>Double right quote: &#8221;.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\textquoteleft (or <literal>`</literal>)</primary></indexterm><literal>\textquoteleft (or <literal>`</literal>)</literal>
</term><listitem><indexterm role="cp"><primary>left quote, single</primary></indexterm>
<indexterm role="cp"><primary>single left quote</primary></indexterm>
<para>Single left quote: &#8216;.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\textquoteright (or <literal>'</literal>)</primary></indexterm><literal>\textquoteright (or <literal>'</literal>)</literal>
</term><listitem><indexterm role="cp"><primary>right quote, single</primary></indexterm>
<indexterm role="cp"><primary>single right quote</primary></indexterm>
<para>Single right quote: &#8217;.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\textquotesingle</primary></indexterm><literal>\textquotesingle</literal>
</term><listitem><indexterm role="cp"><primary>quote, single straight</primary></indexterm>
<indexterm role="cp"><primary>straight single quote</primary></indexterm>
<indexterm role="cp"><primary>single quote, straight</primary></indexterm>
<para>Straight single quote.  (From TS1 encoding.)
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\textquotestraightbase</primary></indexterm><literal>\textquotestraightbase</literal>
</term><term><indexterm role="fn"><primary>\textquotestraightdblbase</primary></indexterm><literal>\textquotestraightdblbase</literal>
</term><listitem><indexterm role="cp"><primary>quote, straight base</primary></indexterm>
<indexterm role="cp"><primary>straight quote, base</primary></indexterm>
<indexterm role="cp"><primary>double quote, straight base</primary></indexterm>
<indexterm role="cp"><primary>straight double quote, base</primary></indexterm>
<para>Single and double straight quotes on the baseline.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\textregistered</primary></indexterm><literal>\textregistered</literal>
</term><listitem><indexterm role="cp"><primary>registered symbol</primary></indexterm>
<para>Registered symbol: &#174;.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\textrightarrow</primary></indexterm><literal>\textrightarrow</literal>
</term><listitem><indexterm role="cp"><primary>arrow, right, in text</primary></indexterm>
<indexterm role="cp"><primary>right arrow, in text</primary></indexterm>
<para>Right arrow.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\textthreequartersemdash</primary></indexterm><literal>\textthreequartersemdash</literal>
</term><listitem><indexterm role="cp"><primary>three-quarters em-dash</primary></indexterm>
<indexterm role="cp"><primary>em-dash, three-quarters</primary></indexterm>
<para>&#8220;Three-quarters&#8221; em-dash, between en-dash and em-dash.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\texttrademark</primary></indexterm><literal>\texttrademark</literal>
</term><listitem><indexterm role="cp"><primary>trademark symbol</primary></indexterm>
<para>Trademark symbol: &#x2122;.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\texttwelveudash</primary></indexterm><literal>\texttwelveudash</literal>
</term><listitem><indexterm role="cp"><primary>two-thirds em-dash</primary></indexterm>
<indexterm role="cp"><primary>em-dash, two-thirds</primary></indexterm>
<para>&#8220;Two-thirds&#8221; em-dash, between en-dash and em-dash.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\textunderscore</primary></indexterm><literal>\textunderscore</literal>
</term><listitem><indexterm role="cp"><primary>underscore, in text</primary></indexterm>
<para>Underscore: _.
</para>
</listitem></varlistentry><varlistentry><term><indexterm role="fn"><primary>\textvisiblespace</primary></indexterm><literal>\textvisiblespace</literal>
</term><listitem><indexterm role="cp"><primary>visible space symbol, in text</primary></indexterm>
<para>Visible space symbol.
</para>
</listitem></varlistentry></variablelist>

</sect1>
<sect1 label="21.4" id="Accents">
<title>Accents</title>

<indexterm role="cp"><primary>accents</primary></indexterm>
<indexterm role="cp"><primary>characters, accented</primary></indexterm>
<indexterm role="cp"><primary>letters, accented</primary></indexterm>

<indexterm role="cp"><primary>package, <literal>babel</literal></primary></indexterm>
<indexterm role="cp"><primary><literal>babel</literal> package</primary></indexterm>
<indexterm role="cp"><primary>multilingual support</primary></indexterm>
<para>&latex; has wide support for many of the world&#8217;s scripts and
languages, through the <literal>babel</literal> package and related support.  This
section does not attempt to cover all that support.  It merely lists
the core &latex; commands for creating accented characters.
</para>
<para>The <literal>\capital...</literal> commands produce alternative forms for use with
capital letters.  These are not available with OT1.
</para>
<variablelist><varlistentry><term><literal>\&quot;</literal>
</term><term><literal>\capitaldieresis</literal>
</term><listitem><indexterm role="fn"><primary>\&quot; (umlaut accent)</primary></indexterm>
<indexterm role="fn"><primary>\capitaldieresis</primary></indexterm>
<indexterm role="cp"><primary>umlaut accent</primary></indexterm>
<indexterm role="cp"><primary>dieresis accent</primary></indexterm>
<para>Produces an umlaut (dieresis), as in &#246;.
</para>
</listitem></varlistentry><varlistentry><term><literal>\'</literal>
</term><term><literal>\capitalacute</literal>
</term><listitem><indexterm role="fn"><primary>\&#8217; (acute accent)</primary></indexterm>
<indexterm role="fn"><primary>\capitalacute</primary></indexterm>
<indexterm role="cp"><primary>acute accent</primary></indexterm>
<para>Produces an acute accent, as in &#243;.  In the <literal>tabbing</literal>
environment, pushes current column to the right of the previous column
(see <link linkend="tabbing">tabbing</link>).
</para>
</listitem></varlistentry><varlistentry><term><literal>\.</literal>
</term><listitem><indexterm role="fn"><primary>\. (dot-over accent)</primary></indexterm>
<indexterm role="cp"><primary>dot accent</primary></indexterm>
<indexterm role="cp"><primary>dot-over accent</primary></indexterm>
<para>Produces a dot accent over the following, as in &#559;.
</para>
</listitem></varlistentry><varlistentry><term><literal>\=</literal>
</term><term><literal>\capitalmacron</literal>
</term><listitem><indexterm role="fn"><primary>\= (macron accent)</primary></indexterm>
<indexterm role="fn"><primary>\capitalmacron</primary></indexterm>
<indexterm role="cp"><primary>macron accent</primary></indexterm>
<indexterm role="cp"><primary>overbar accent</primary></indexterm>
<indexterm role="cp"><primary>bar-over accent</primary></indexterm>
<para>Produces a macron (overbar) accent over the following, as in &#333;.
</para>
</listitem></varlistentry><varlistentry><term><literal>\^</literal>
</term><term><literal>\capitalcircumflex</literal>
</term><listitem><indexterm role="fn"><primary>\^ (circumflex accent)</primary></indexterm>
<indexterm role="fn"><primary>\capitalcircumflex</primary></indexterm>
<indexterm role="cp"><primary>circumflex accent</primary></indexterm>
<indexterm role="cp"><primary>hat accent</primary></indexterm>
<para>Produces a circumflex (hat) accent over the following, as in &#244;.
</para>
</listitem></varlistentry><varlistentry><term><literal>\`</literal>
</term><term><literal>\capitalgrave</literal>
</term><listitem><indexterm role="fn"><primary>\&#8216; (grave accent)</primary></indexterm>
<indexterm role="fn"><primary>\capitalgrave</primary></indexterm>
<indexterm role="cp"><primary>grave accent</primary></indexterm>
<para>Produces a grave accent over the following, as in &#242;.  In the
<literal>tabbing</literal> environment, move following text to the right margin
(see <link linkend="tabbing">tabbing</link>).
</para>
</listitem></varlistentry><varlistentry><term><literal>\~</literal>
</term><term><literal>\capitaltilde</literal>
</term><listitem><indexterm role="fn"><primary>\~ (tilde accent)</primary></indexterm>
<indexterm role="fn"><primary>\capitaltilde</primary></indexterm>
<indexterm role="cp"><primary>tilde accent</primary></indexterm>
<para>Produces a tilde accent over the following, as in &#241;.
</para>
</listitem></varlistentry><varlistentry><term><literal>\b</literal>
</term><listitem><indexterm role="fn"><primary>\b (bar-under accent)</primary></indexterm>
<indexterm role="cp"><primary>bar-under accent</primary></indexterm>
<para>Produces a bar accent under the following, as in o_. See
also <literal>\underbar</literal> hereinafter.
</para>
</listitem></varlistentry><varlistentry><term><literal>\c</literal>
</term><term><literal>\capitalcedilla</literal>
</term><listitem><indexterm role="fn"><primary>\c (cedilla accent)</primary></indexterm>
<indexterm role="fn"><primary>\capitalcedilla</primary></indexterm>
<indexterm role="cp"><primary>cedilla accent</primary></indexterm>
<para>Produces a cedilla accent under the following, as in &#231;.
</para>
</listitem></varlistentry><varlistentry><term><literal>\d</literal>
</term><term><literal>\capitaldotaccent</literal>
</term><listitem><indexterm role="fn"><primary>\d (dot-under accent)</primary></indexterm>
<indexterm role="fn"><primary>\capitaldotaccent</primary></indexterm>
<indexterm role="cp"><primary>dot-under accent</primary></indexterm>
<para>Produces a dot accent under the following, as in &#7885;.
</para>
</listitem></varlistentry><varlistentry><term><literal>\H</literal>
</term><term><literal>\capitalhungarumlaut</literal>
</term><listitem><indexterm role="fn"><primary>\H (Hungarian umlaut accent)</primary></indexterm>
<indexterm role="fn"><primary>\capitalhungarumlaut</primary></indexterm>
<indexterm role="cp"><primary>hungarian umlaut accent</primary></indexterm>
<para>Produces a long Hungarian umlaut accent over the following, as in &#337;.
</para>
</listitem></varlistentry><varlistentry><term><literal>\i</literal>
</term><listitem><indexterm role="fn"><primary>\i (dotless i)</primary></indexterm>
<indexterm role="cp"><primary>dotless i</primary></indexterm>
<para>Produces a dotless i, as in &#8216;i&#8217;.
</para>
</listitem></varlistentry><varlistentry><term><literal>\j</literal>
</term><listitem><indexterm role="fn"><primary>\j (dotless j)</primary></indexterm>
<indexterm role="cp"><primary>dotless j</primary></indexterm>
<para>Produces a dotless j, as in &#8216;j&#8217;.
</para>
</listitem></varlistentry><varlistentry><term><literal>\k</literal>
</term><term><literal>\capitalogonek</literal>
</term><listitem><indexterm role="fn"><primary>\k (ogonek)</primary></indexterm>
<indexterm role="fn"><primary>\capitalogonek</primary></indexterm>
<indexterm role="cp"><primary>ogonek</primary></indexterm>
<para>Produces a letter with ogonek, as in &#8216;&#491;&#8217;.  Not available in
the OT1 encoding.
</para>
</listitem></varlistentry><varlistentry><term><literal>\r</literal>
</term><term><literal>\capitalring</literal>
</term><listitem><indexterm role="fn"><primary>\r (ring accent)</primary></indexterm>
<indexterm role="fn"><primary>\capitalring</primary></indexterm>
<indexterm role="cp"><primary>ring accent</primary></indexterm>
<para>Produces a ring accent, as in &#8216;o*&#8217;.
</para>
</listitem></varlistentry><varlistentry><term><literal>\t</literal>
</term><term><literal>\capitaltie</literal>
</term><term><literal>\newtie</literal>
</term><term><literal>\capitalnewtie</literal>
</term><listitem><indexterm role="fn"><primary>\t (tie-after accent)</primary></indexterm>
<indexterm role="fn"><primary>\capitaltie</primary></indexterm>
<indexterm role="fn"><primary>\newtie</primary></indexterm>
<indexterm role="fn"><primary>\capitalnewtie</primary></indexterm>
<indexterm role="cp"><primary>tie-after accent</primary></indexterm>
<para>Produces a tie-after accent, as in &#8216;oo[&#8217;.  The
<literal>\newtie</literal> form is centered in its box.
</para>
</listitem></varlistentry><varlistentry><term><literal>\u</literal>
</term><term><literal>\capitalbreve</literal>
</term><listitem><indexterm role="fn"><primary>\u (breve accent)</primary></indexterm>
<indexterm role="fn"><primary>\capitalbreve</primary></indexterm>
<indexterm role="cp"><primary>breve accent</primary></indexterm>
<para>Produces a breve accent, as in &#8216;&#335;&#8217;.
</para>
</listitem></varlistentry><varlistentry><term><literal>\underbar</literal>
</term><listitem><indexterm role="fn"><primary>\underbar</primary></indexterm>
<indexterm role="cp"><primary>underbar</primary></indexterm>
<para>Not exactly an accent, this produces a bar under the argument text.
The argument is always processed in horizontal mode.  The bar is
always a fixed position under the baseline, thus crossing through
descenders.  See also <literal>\underline</literal> in <link linkend="Math-miscellany">Math miscellany</link>.
See also <literal>\b</literal> above.
</para>
</listitem></varlistentry><varlistentry><term><literal>\v</literal>
</term><term><literal>\capitalcaron</literal>
</term><listitem><indexterm role="fn"><primary>\v (breve accent)</primary></indexterm>
<indexterm role="fn"><primary>\capitalcaron</primary></indexterm>
<indexterm role="cp"><primary>hacek accent</primary></indexterm>
<indexterm role="cp"><primary>check accent</primary></indexterm>
<indexterm role="cp"><primary>caron accent</primary></indexterm>
<para>Produces a h&#225;&#269;ek (check, caron) accent, as in &#8216;&#466;&#8217;.
</para>
</listitem></varlistentry></variablelist>

</sect1>
<sect1 label="21.5" id="Additional-Latin-letters">
<title>Additional Latin letters</title>

<anchor id="Non_002dEnglish-characters"/><indexterm role="cp"><primary>Latin letters, additional</primary></indexterm>
<indexterm role="cp"><primary>letters, additional Latin</primary></indexterm>
<indexterm role="cp"><primary>extended Latin</primary></indexterm>
<indexterm role="cp"><primary>special characters</primary></indexterm>
<indexterm role="cp"><primary>non-English characters</primary></indexterm>
<indexterm role="cp"><primary>characters, non-English</primary></indexterm>

<para>Here are the basic &latex; commands for inserting letters (beyond
A&#8211;Z) extending the Latin alphabet, used primarily in languages other
than English.
</para>
<variablelist><varlistentry><term><literal>\aa</literal>
</term><term><literal>\AA</literal>
</term><listitem><indexterm role="fn"><primary>\aa (&#229;)</primary></indexterm>
<indexterm role="fn"><primary>\AA (&#197;)</primary></indexterm>
<indexterm role="cp"><primary>aring</primary></indexterm>
<para>&#229; and &#197;.
</para>
</listitem></varlistentry><varlistentry><term><literal>\ae</literal>
</term><term><literal>\AE</literal>
</term><listitem><indexterm role="fn"><primary>\ae (&#230;)</primary></indexterm>
<indexterm role="fn"><primary>\AE (&#198;)</primary></indexterm>
<indexterm role="cp"><primary>ae ligature</primary></indexterm>
<para>&#230; and &#198;.
</para>
</listitem></varlistentry><varlistentry><term><literal>\dh</literal>
</term><term><literal>\DH</literal>
</term><listitem><indexterm role="fn"><primary>\dh (&#240;)</primary></indexterm>
<indexterm role="fn"><primary>\DH (&#208;)</primary></indexterm>
<indexterm role="cp"><primary>Icelandic eth</primary></indexterm>
<indexterm role="cp"><primary>eth, Icelandic letter</primary></indexterm>
<para>Icelandic letter eth: &#240; and &#208;. Not available with OT1
encoding, you need the <filename>fontenc</filename> package to select an alternate
font encoding, such as T1.
</para>
</listitem></varlistentry><varlistentry><term><literal>\dj</literal>
</term><term><literal>\DJ</literal>
</term><listitem><indexterm role="fn"><primary>\dj</primary></indexterm>
<indexterm role="fn"><primary>\DJ</primary></indexterm>
<para>Crossed d and D, a.k.a. capital and small letter d with stroke.  Not
available with OT1 encoding, you need the <filename>fontenc</filename> package to
select an alternate font encoding, such as T1.
</para>
</listitem></varlistentry><varlistentry><term><literal>\ij</literal>
</term><term><literal>\IJ</literal>
</term><listitem><indexterm role="fn"><primary>\ij (ij)</primary></indexterm>
<indexterm role="fn"><primary>\IJ (IJ)</primary></indexterm>
<indexterm role="cp"><primary>ij letter, Dutch</primary></indexterm>
<para>ij and IJ (except somewhat closer together than appears here).
</para>
</listitem></varlistentry><varlistentry><term><literal>\l</literal>
</term><term><literal>\L</literal>
</term><listitem><indexterm role="fn"><primary>\l (&#322;)</primary></indexterm>
<indexterm role="fn"><primary>\L (&#321;)</primary></indexterm>
<indexterm role="cp"><primary>polish l</primary></indexterm>
<para>&#322; and &#321;.
</para>
</listitem></varlistentry><varlistentry><term><literal>\ng</literal>
</term><term><literal>\NG</literal>
</term><listitem><indexterm role="fn"><primary>\ng</primary></indexterm>
<indexterm role="fn"><primary>\NG</primary></indexterm>
<para>Lappish letter eng, also used in phonetics.
</para>
</listitem></varlistentry><varlistentry><term><literal>\o</literal>
</term><term><literal>\O</literal>
</term><listitem><indexterm role="fn"><primary>\o (&#248;)</primary></indexterm>
<indexterm role="fn"><primary>\O (&#216;)</primary></indexterm>
<indexterm role="cp"><primary>oslash</primary></indexterm>
<para>&#248; and &#216;.
</para>
</listitem></varlistentry><varlistentry><term><literal>\oe</literal>
</term><term><literal>\OE</literal>
</term><listitem><indexterm role="fn"><primary>\oe (&#339;)</primary></indexterm>
<indexterm role="fn"><primary>\OE (&#338;)</primary></indexterm>
<indexterm role="cp"><primary>oe ligature</primary></indexterm>
<para>&#339; and &#338;.
</para>
</listitem></varlistentry><varlistentry><term><literal>\ss</literal>
</term><term><literal>\SS</literal>
</term><listitem><indexterm role="fn"><primary>\ss (&#223;)</primary></indexterm>
<indexterm role="fn"><primary>\SS (SS)</primary></indexterm>
<indexterm role="cp"><primary>es-zet German letter</primary></indexterm>
<indexterm role="cp"><primary>sharp S letters</primary></indexterm>
<para>&#223; and SS.
</para>
</listitem></varlistentry><varlistentry><term><literal>\th</literal>
</term><term><literal>\TH</literal>
</term><listitem><indexterm role="fn"><primary>\th (&#254;)</primary></indexterm>
<indexterm role="fn"><primary>\TH (&#222;)</primary></indexterm>
<indexterm role="cp"><primary>Icelandic thorn</primary></indexterm>
<indexterm role="cp"><primary>thorn, Icelandic letter</primary></indexterm>
<para>Icelandic letter thorn: &#254; and &#222;. Not available with OT1
encoding, you need the <filename>fontenc</filename> package to select an alternate
font encoding, such as T1.
</para>
</listitem></varlistentry></variablelist>

</sect1>
<sect1 label="21.6" id="_005crule">
<title><literal>\rule</literal></title>

<indexterm role="fn"><primary>\rule</primary></indexterm>

<para>Synopsis:
</para>
<screen>\rule[<replaceable>raise</replaceable>]{<replaceable>width</replaceable>}{<replaceable>thickness</replaceable>}
</screen>
<para>The <literal>\rule</literal> command produces <firstterm>rules</firstterm>, that is, lines or
rectangles.  The arguments are:
</para>
<variablelist><varlistentry><term><replaceable>raise</replaceable>
</term><listitem><para>How high to raise the rule (optional).
</para>
</listitem></varlistentry><varlistentry><term><replaceable>width</replaceable>
</term><listitem><para>The length of the rule (mandatory).
</para>
</listitem></varlistentry><varlistentry><term><replaceable>thickness</replaceable>
</term><listitem><para>The thickness of the rule (mandatory).
</para></listitem></varlistentry></variablelist>

</sect1>
<sect1 label="21.7" id="_005ctoday">
<title><literal>\today</literal></title>

<indexterm role="fn"><primary>\today</primary></indexterm>
<indexterm role="cp"><primary>date, today&#8217;s</primary></indexterm>

<para>The <literal>\today</literal> command produces today&#8217;s date, in the format
&#8216;<literal><replaceable>month</replaceable> <replaceable>dd</replaceable>, <replaceable>yyyy</replaceable></literal>&#8217;; for example, &#8216;<literal>July 4, 1976</literal>&#8217;.
It uses the predefined counters <literal>\day</literal>, <literal>\month</literal>, and
<literal>\year</literal> (see <link linkend="_005cday-_005cmonth-_005cyear">\day \month \year</link>) to do this.  It is not
updated as the program runs.
</para>
<para>Multilingual packages like <filename>babel</filename> or classes like <filename>lettre</filename>,
among others, will localize <literal>\today</literal>. For example, the following
will output &#8216;<literal>4 juillet 1976</literal>&#8217;:
</para>
<screen>\year=1976 \month=7 \day=4
\documentclass{minimal}
\usepackage[french]{babel}
\begin{document}
\today
\end{document}
</screen>
<indexterm role="cp"><primary>package, <literal>datetime</literal></primary></indexterm>
<indexterm role="cp"><primary><literal>datetime</literal> package</primary></indexterm>
<para>The <literal>datetime</literal> package, among others, can produce a wide variety
of other date formats.
</para>

</sect1>
</chapter>
<chapter label="22" id="Splitting-the-input">
<title>Splitting the input</title>

<indexterm role="cp"><primary>splitting the input file</primary></indexterm>
<indexterm role="cp"><primary>input file</primary></indexterm>

<para>A large document requires a lot of input.  Rather than putting the whole
input in a single large file, it&#8217;s more efficient to split it into
several smaller ones.  Regardless of how many separate files you use,
there is one that is the 
<indexterm role="cp"><primary>root file</primary></indexterm>
<indexterm role="cp"><primary>file, root</primary></indexterm>
<firstterm>root file</firstterm>; it is the one whose name you type
when you run &latex;.
</para>
<para>See <link linkend="filecontents">filecontents</link>, for an environment that allows bundling an
external file to be created with the main document.
</para>


<sect1 label="22.1" id="_005cinclude">
<title><literal>\include</literal></title>

<indexterm role="fn"><primary>\include</primary></indexterm>

<para>Synopsis:
</para>
<screen>\include{<replaceable>file</replaceable>}
</screen>
<para>If no <literal>\includeonly</literal> command is present, the <literal>\include</literal>
command executes <literal>\clearpage</literal> to start a new page
(see <link linkend="_005cclearpage">\clearpage</link>), then reads <replaceable>file</replaceable>, then does another
<literal>\clearpage</literal>.
</para>
<para>Given an <literal>\includeonly</literal> command, the <literal>\include</literal> actions are
only run if <replaceable>file</replaceable> is listed as an argument to
<literal>\includeonly</literal>.  See <link linkend="_005cincludeonly">\includeonly</link>.
</para>
<indexterm role="cp"><primary>nested <literal>\include</literal>, not allowed</primary></indexterm>
<para>The <literal>\include</literal> command may not appear in the preamble or in a file
read by another <literal>\include</literal> command.
</para>

</sect1>
<sect1 label="22.2" id="_005cincludeonly">
<title>\<literal>includeonly</literal></title>

<indexterm role="fn"><primary>\includeonly</primary></indexterm>

<para>Synopsis:
</para>
<screen>\includeonly{<replaceable>file1</replaceable>,<replaceable>file2</replaceable>,...}
</screen>
<para>The <literal>\includeonly</literal> command controls which files will be read by
subsequent <literal>\include</literal> commands.  The list of filenames is
comma-separated. Each element <replaceable>file1</replaceable>, <replaceable>file2</replaceable>, &#8230; must
exactly match a filename specified in a <literal>\include</literal> command for the
selection to be effective.
</para>
<para>This command can only appear in the preamble.
</para>

</sect1>
<sect1 label="22.3" id="_005cinput">
<title><literal>\input</literal></title>

<indexterm role="fn"><primary>\input</primary></indexterm>

<para>Synopsis:
</para>
<screen>\input{<replaceable>file</replaceable>}
</screen>
<para>The <literal>\input</literal> command causes the specified <replaceable>file</replaceable> to be read
and processed, as if its contents had been inserted in the current
file at that point.
</para>
<para>If <replaceable>file</replaceable> does not end in &#8216;<literal>.tex</literal>&#8217; (e.g., &#8216;<literal>foo</literal>&#8217; or
&#8216;<literal>foo.bar</literal>&#8217;), it is first tried with that extension (&#8216;<literal>foo.tex</literal>&#8217;
or &#8216;<literal>foo.bar.tex</literal>&#8217;).  If that is not found, the original <replaceable>file</replaceable>
is tried (&#8216;<literal>foo</literal>&#8217; or &#8216;<literal>foo.bar</literal>&#8217;).
</para>

</sect1>
</chapter>
<chapter label="23" id="Front_002fback-matter">
<title>Front/back matter</title>



<sect1 label="23.1" id="Tables-of-contents">
<title>Tables of contents</title>

<indexterm role="cp"><primary>table of contents, creating</primary></indexterm>

<indexterm role="fn"><primary>\tableofcontents</primary></indexterm>
<indexterm role="fn"><primary>.toc file</primary></indexterm>
<para>A table of contents is produced with the <literal>\tableofcontents</literal>
command.  You put the command right where you want the table of
contents to go; &latex; does the rest for you.  A previous run must
have generated a <filename>.toc</filename> file.
</para>
<para>The <literal>\tableofcontents</literal> command produces a heading, but it does
not automatically start a new page.  If you want a new page after the
table of contents, write a <literal>\newpage</literal> command after the
<literal>\tableofcontents</literal> command.
</para>
<indexterm role="fn"><primary>\listoffigures</primary></indexterm>
<indexterm role="fn"><primary>\listoftables</primary></indexterm>
<indexterm role="fn"><primary>.lof file</primary></indexterm>
<indexterm role="fn"><primary>.lot file</primary></indexterm>
<para>The analogous commands <literal>\listoffigures</literal> and <literal>\listoftables</literal>
produce a list of figures and a list of tables (from <filename>.lof</filename> and
<filename>.lot</filename> files), respectively.  Everything works exactly the same
as for the table of contents.
</para>
<indexterm role="fn"><primary>\nofiles</primary></indexterm>
<para>The command <literal>\nofiles</literal> overrides these commands, and
<emphasis>prevents</emphasis> any of these lists from being generated.
</para>


<sect2 label="23.1.1" id="_005caddcontentsline">
<title><literal>\addcontentsline</literal></title>

<indexterm role="fn"><primary>\addcontentsline</primary></indexterm>
<indexterm role="cp"><primary>table of contents entry, manually adding</primary></indexterm>

<para>Synopsis:
</para>
<screen>\addcontentsline{<replaceable>ext</replaceable>}{<replaceable>unit</replaceable>}{<replaceable>text</replaceable>}
</screen>
<para>The <literal>\addcontentsline</literal> command adds an entry to the specified list
or table where:
</para>
<variablelist><varlistentry><term><replaceable>ext</replaceable>
</term><listitem><para>The extension of the file on which information is to be written,
typically one of: <literal>toc</literal> (table of contents), <literal>lof</literal> (list of
figures), or <literal>lot</literal> (list of tables).
</para>
</listitem></varlistentry><varlistentry><term><replaceable>unit</replaceable>
</term><listitem><para>The name of the sectional unit being added, typically one of the
following, matching the value of the <replaceable>ext</replaceable> argument:
</para>
<variablelist><varlistentry><term><literal>toc</literal>
</term><listitem><para>The name of the sectional unit: <literal>part</literal>, <literal>chapter</literal>,
<literal>section</literal>, <literal>subsection</literal>, <literal>subsubsection</literal>.
</para></listitem></varlistentry><varlistentry><term><literal>lof</literal>
</term><listitem><para>For the list of figures: <literal>figure</literal>.
</para></listitem></varlistentry><varlistentry><term><literal>lot</literal>
</term><listitem><para>For the list of tables: <literal>table</literal>.
</para></listitem></varlistentry></variablelist>
</listitem></varlistentry><varlistentry><term><replaceable>text</replaceable>
</term><listitem><para>The text of the entry.
</para></listitem></varlistentry></variablelist>
<indexterm role="fn"><primary>\contentsline</primary></indexterm>
<para>What is written to the <filename>.<replaceable>ext</replaceable></filename> file is the command
<literal>\contentsline{<replaceable>unit</replaceable>}{<replaceable>text</replaceable>}{<replaceable>num</replaceable>}</literal>, where
<literal><replaceable>num</replaceable></literal> is the current value of counter <literal><replaceable>unit</replaceable></literal>.
</para>
<!-- xx how hardwired are these values?  other unit names? -->


</sect2>
<sect2 label="23.1.2" id="_005caddtocontents">
<title><literal>\addtocontents</literal></title>

<indexterm role="fn"><primary>\addtocontents{<replaceable>ext</replaceable>}{<replaceable>text</replaceable>}</primary></indexterm>

<para>The <literal>\addtocontents</literal>{<replaceable>ext</replaceable>}{<replaceable>text</replaceable>} command adds text
(or formatting commands) directly to the <filename>.<replaceable>ext</replaceable></filename> file that
generates the table of contents or lists of figures or tables.
</para>
<variablelist><varlistentry><term><replaceable>ext</replaceable>
</term><listitem><para>The extension of the file on which information is to be written,
typically one of: <filename>toc</filename> (table of contents), <filename>lof</filename> (list of
figures), or <filename>lot</filename> (list of tables).
</para>
</listitem></varlistentry><varlistentry><term><replaceable>text</replaceable>
</term><listitem><para>The text to be written.
</para></listitem></varlistentry></variablelist>

</sect2>
</sect1>
<sect1 label="23.2" id="Glossaries">
<title>Glossaries</title>

<indexterm role="cp"><primary>glossaries</primary></indexterm>

<indexterm role="fn"><primary>\makeglossary</primary></indexterm>
<para>The command <literal>\makeglossary</literal> enables creating glossaries.
</para>
<indexterm role="fn"><primary>\glossary</primary></indexterm>
<indexterm role="cp"><primary><filename>.glo</filename> file</primary></indexterm>
<para>The command <literal>\glossary{<replaceable>text</replaceable>}</literal> writes a glossary entry for
<replaceable>text</replaceable> to an auxiliary file with the <filename>.glo</filename> extension.
</para>
<indexterm role="fn"><primary>\glossaryentry</primary></indexterm>
<para>Specifically, what gets written is the command
<literal>\glossaryentry{<replaceable>text</replaceable>}{<replaceable>pageno</replaceable>}</literal>, where
<replaceable>pageno</replaceable> is the current <literal>\thepage</literal> value.
</para>
<indexterm role="cp"><primary>glossary package</primary></indexterm>
<para>The <literal>glossary</literal> package on CTAN provides support for fancier
glossaries.
</para>

</sect1>
<sect1 label="23.3" id="Indexes">
<title>Indexes</title>

<indexterm role="cp"><primary>indexes</primary></indexterm>

<indexterm role="fn"><primary>\makeindex</primary></indexterm>
<para>The command <literal>\makeindex</literal> enables creating indexes.  Put this in
the preamble.
</para>
<indexterm role="fn"><primary>\index</primary></indexterm>
<indexterm role="cp"><primary><filename>.idx</filename> file</primary></indexterm>
<para>The command <literal>\index{<replaceable>text</replaceable>}</literal> writes an index entry for
<replaceable>text</replaceable> to an auxiliary file named with the <filename>.idx</filename> extension.
</para>
<indexterm role="fn"><primary>\indexentry</primary></indexterm>
<para>Specifically, what gets written is the command
<literal>\indexentry{<replaceable>text</replaceable>}{<replaceable>pageno</replaceable>}</literal>, where <replaceable>pageno</replaceable>
is the current <literal>\thepage</literal> value.
</para>
<indexterm role="cp"><primary>&#8216;see&#8217; and &#8216;see also&#8217; index entries</primary></indexterm>
<indexterm role="cp"><primary>index entries, &#8216;see&#8217; and &#8216;see also&#8217;</primary></indexterm>
<para>To generate a index entry for &#8216;bar&#8217; that says &#8216;See foo&#8217;, use a
vertical bar: <literal>\index{bar|see{foo}}</literal>.  Use <literal>seealso</literal>
instead of <literal>see</literal> to make a &#8216;See also&#8217; entry.
</para>
<indexterm role="fn"><primary>\seename</primary></indexterm>
<indexterm role="fn"><primary>\alsoname</primary></indexterm>
<para>The text &#8216;See&#8217; is defined by the macro <literal>\seename</literal>, and &#8216;See also&#8217;
by the macro <literal>\alsoname</literal>.  These can be redefined for other
languages.
</para>
<indexterm role="cp"><primary><command>makeindex</command> program</primary></indexterm>
<indexterm role="cp"><primary><command>xindy</command> program</primary></indexterm>
<indexterm role="cp"><primary><filename>.ind</filename> file</primary></indexterm>
<para>The generated <filename>.idx</filename> file is then sorted with an external
command, usually either <command>makeindex</command>
(<ulink url="http://mirror.ctan.org/indexing/makeindex">http://mirror.ctan.org/indexing/makeindex</ulink>) or (the
multi-lingual) <command>xindy</command> (<ulink url="http://xindy.sourceforge.net">http://xindy.sourceforge.net</ulink>).
This results in a <filename>.ind</filename> file, which can then be read to typeset
the index.
</para>
<indexterm role="fn"><primary>\printindex</primary></indexterm>
<indexterm role="cp"><primary>package, <literal>makeidx</literal></primary></indexterm>
<indexterm role="cp"><primary><literal>makeidx</literal> package</primary></indexterm>
<para>The index is usually generated with the <literal>\printindex</literal> command.
This is defined in the <literal>makeidx</literal> package, so
<literal>\usepackage{makeidx}</literal> needs to be in the preamble.
</para>
<indexterm role="fn"><primary>\indexspace</primary></indexterm>
<para>The rubber length <literal>\indexspace</literal> is inserted before each new
letter in the printed index; its default value is &#8216;<literal>10pt plus5pt
minus3pt</literal>&#8217;.
</para>
<indexterm role="cp"><primary>package, <literal>showidx</literal></primary></indexterm>
<indexterm role="cp"><primary><literal>showidx</literal> package</primary></indexterm>
<para>The <literal>showidx</literal> 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.
</para>
<indexterm role="cp"><primary>package, <literal>multind</literal></primary></indexterm>
<indexterm role="cp"><primary><literal>multind</literal> package</primary></indexterm>
<para>The <literal>multind</literal> package supports multiple indexes.  See also the
&tex; FAQ entry on this topic,
<ulink url="http://www.tex.ac.uk/cgi-bin/texfaq2html?label=multind">http://www.tex.ac.uk/cgi-bin/texfaq2html?label=multind</ulink>.
</para>

</sect1>
</chapter>
<chapter label="24" id="Letters">
<title>Letters</title>

<indexterm role="cp"><primary>letters, writing</primary></indexterm>
<indexterm role="cp"><primary>writing letters</primary></indexterm>

<para>Synopsis: 
</para>
<screen>\documentclass{letter}
\address{<replaceable>sender address</replaceable>}
\signature{<replaceable>sender name</replaceable>}
\begin{document}
\begin{letter}{<replaceable>recipient address</replaceable>}
\opening{<replaceable>salutation</replaceable>}
  <replaceable>letter body</replaceable>
\closing{<replaceable>closing text</replaceable>}
\end{letter}
...  more letters ...
\end{document}
</screen>
<para>Produce one or more letters.  
</para>
<para>Each letter is in a separate <literal>letter</literal> environment, whose argument
<replaceable>recipient address</replaceable> often contains multiple lines separated with a
double backslash&#160;(<literal>\\</literal>).  For example, you might have:
</para>
<screen> \begin{letter}{Mr. Joe Smith \\ 
      2345 Princess St. \\ 
      Edinburgh, EH1 1AA}
   ...
 \end{letter}
</screen>
<para>The start of the <literal>letter</literal> environment resets the page number to 1,
and the footnote number to 1 also.
</para>
<para>The <replaceable>sender address</replaceable> and <replaceable>sender name</replaceable> are common to all of the
letters, whether there is one or more, so these are best put in the
preamble.  As with the recipient address, often <replaceable>sender address</replaceable>
contains multiple lines separated by a double
backslash&#160;(<literal>\\</literal>).  &latex; will put the <replaceable>sender name</replaceable>
under the closing, after a vertical space for the traditional
hand-written signature; it also can contain multiple lines.
</para>
<para>Each <literal>letter</literal> environment body begins with a required <literal>\opening</literal> command
such as <literal>\opening{Dear Madam or Sir:}</literal>.  The <replaceable>letter body</replaceable>
text is ordinary &latex; so it can contain everything from
enumerated lists to displayed math, except that commands such as
<literal>\chapter</literal> that make no sense in a letter are turned off.  Each
<literal>letter</literal> environment body typically ends with a <literal>\closing</literal>
command such as <literal>\closing{Yours,}</literal>.
</para>
<indexterm role="fn"><primary>\\ for letters</primary></indexterm>
<para>Additional material may come after the <literal>\closing</literal>.  You can say who
is receiving a copy of the letter with a command like <literal>\cc{the
Boss \\ the Boss's Boss}</literal>.  There&#8217;s a similar <literal>\encl</literal> command for
a list of enclosures.  And, you can add a postscript with <literal>\ps</literal>.
</para>
<para>&latex;&#8217;s default is to indent the signature and the <literal>\closing</literal>
above it by a length of <literal>\longindentation</literal>.  By default this is
<literal>0.5\textwidth</literal>. To make them flush left, put
<literal>\setlength{\longindentation}{0em}</literal> in your preamble.
</para>
<para>To set a fixed date use something like
<literal>\renewcommand{\today}{2015-Oct-12}</literal>.  If put in your preamble
then it will apply to all the letters.
</para>
<para>This example shows only one <literal>letter</literal> environment.  The three lines
marked as optional are typically omitted.
</para>
<screen>\documentclass{letter}
\address{Sender's street \\ Sender's town}
\signature{Sender's name \\ Sender's title}
% optional: \location{Mailbox 13}
% optional: \telephone{(102) 555-0101}
\begin{document}
\begin{letter}{Recipient's name \\ Recipient's address}
\opening{Sir:}
% optional: \thispagestyle{firstpage}
I am not interested in entering a business arrangement with you.
\closing{Your most humble, etc.,}
\end{letter}
\end{document}
</screen>
<para>These commands are used with the <literal>letter</literal> class.
</para>


<sect1 label="24.1" id="_005caddress">
<title><literal>\address</literal></title>

<indexterm role="fn"><primary>\address</primary></indexterm>

<para>Synopsis: 
</para>
<screen>\address{<replaceable>senders address</replaceable>}
</screen>
<para>Specifies the return address as it appears on the letter and on the
envelope.  Separate multiple lines in <replaceable>senders address</replaceable> with a
double backslash&#160;<literal>\\</literal>.
</para>
<para>Because it can apply to multiple letters this declaration is often put
in the preamble.  However, it can go anywhere, including inside an
individual <literal>letter</literal> environment.
</para>
<para>This command is optional: without the <literal>\address</literal> declaration the
letter is formatted with some blank space on top, for copying onto
pre-printed letterhead paper.  (See <link linkend="Overview">Overview</link>, for details on your
local implementation.)  With the <literal>\address</literal> declaration, it is
formatted as a personal letter.
</para>
<para>Here is an example.
</para>
<screen>\address{Stephen Maturin \\
         The Grapes of the Savoy}
</screen>

</sect1>
<sect1 label="24.2" id="_005ccc">
<title><literal>\cc</literal></title>

<indexterm role="fn"><primary>\cc</primary></indexterm>
<indexterm role="cp"><primary>cc list, in letters</primary></indexterm>

<para>Synopsis:
</para>
<screen>\cc{<replaceable>first name</replaceable> \\ 
     ... }
</screen>
<para>Produce a list of names to which copies of the letter were sent.  This
command is optional.  If it appears then typically it comes after
<literal>\closing</literal>.  Separate multiple lines with a double
backslash&#160;<literal>\\</literal>, as in:
</para>
<screen>\cc{President \\
    Vice President}
</screen>

</sect1>
<sect1 label="24.3" id="_005cclosing">
<title><literal>\closing</literal></title>

<indexterm role="fn"><primary>\closing</primary></indexterm>
<indexterm role="cp"><primary>letters, ending</primary></indexterm>
<indexterm role="cp"><primary>closing letters</primary></indexterm>

<para>Synopsis:
</para>
<screen>\closing{<replaceable>text</replaceable>}
</screen>
<para>Usually at the end of a letter, above the handwritten signature, there
is a <literal>\closing</literal> (although this command is optional).  For example,
</para>
<screen>\closing{Regards,}
</screen>

</sect1>
<sect1 label="24.4" id="_005cencl">
<title><literal>\encl</literal></title>

<indexterm role="fn"><primary>\encl</primary></indexterm>
<indexterm role="cp"><primary>enclosure list</primary></indexterm>

<para>Synopsis:
</para>
<screen>\encl{<replaceable>first enclosed object</replaceable> \\ 
       ... }
</screen>
<para>Produce a list of things included with the letter. This command is
optional; when it is used, it typically is put after <literal>\closing</literal>.
Separate multiple lines with a double backslash&#160;<literal>\\</literal>.
</para>
<screen>\encl{License \\
       Passport }
</screen>

</sect1>
<sect1 label="24.5" id="_005clocation">
<title><literal>\location</literal></title>

<indexterm role="fn"><primary>\location</primary></indexterm>

<para>Synopsis:
</para>
<screen>\location{<replaceable>text</replaceable>}
</screen>
<para>The <replaceable>text</replaceable> appears centered at the bottom of the each page.  It only
appears if the page style is <literal>firstpage</literal>.
</para>

</sect1>
<sect1 label="24.6" id="_005cmakelabels">
<title><literal>\makelabels</literal></title>

<indexterm role="fn"><primary>\makelabels</primary></indexterm>

<para>Synopsis:
</para>
<screen>\makelabels
</screen>
<para>Create a sheet of address labels from the recipient addresses, one for
each letter. This sheet will be output before the letters, with the idea
that you can copy it to a sheet of peel-off labels.  This command goes
in the preamble.
</para>
<para>Customize the labels by redefining the commands <literal>\startlabels</literal>,
<literal>\mlabel</literal>, and <literal>\returnaddress</literal> in the preamble.  The command
<literal>\startlabels</literal> sets the width, height, number of columns, etc., of
the page onto which the labels are printed.  The command
<literal>\mlabel{<replaceable>sender address</replaceable>}{<replaceable>recipient address</replaceable>}</literal>
produces the two labels (or one, if you choose to ignore the <replaceable>sender
address</replaceable>). The <replaceable>sender address</replaceable> is the value returned by the macro
<literal>\returnaddress</literal> while <replaceable>recipient address</replaceable> is the value passed
in the argument to the <literal>letter</literal> environment.  By default
<literal>\mlabel</literal> ignores the first argument, the <replaceable>sender address</replaceable>.
</para>
<!-- xxx TODO, align on latex2e-fr.texi, see https://mail.gna.org/public/latexrefman-discuss/2015-10/msg00000.html -->

</sect1>
<sect1 label="24.7" id="_005cname">
<title><literal>\name</literal></title>

<indexterm role="fn"><primary>\name</primary></indexterm>

<para>Synopsis:
</para>
<screen>\name{<replaceable>name</replaceable>}
</screen>
<para>Sender&#8217;s name, used for printing on the envelope together with the
return address.
</para>

</sect1>
<sect1 label="24.8" id="_005copening">
<title><literal>\opening</literal></title>

<indexterm role="fn"><primary>\opening</primary></indexterm>
<indexterm role="cp"><primary>letters, starting</primary></indexterm>

<para>Synopsis:
</para>
<screen>\opening{<replaceable>text</replaceable>}
</screen>
<para>This command is required.  It starts a letter, following the
<literal>\begin{letter}{...}</literal>. The mandatory argument <replaceable>text</replaceable> is the
text that starts your letter.  For instance:
</para>
<screen>\opening{Dear John:}
</screen>

</sect1>
<sect1 label="24.9" id="_005cps">
<title><literal>\ps</literal></title>
<indexterm role="fn"><primary>\ps</primary></indexterm>
<indexterm role="cp"><primary>postscript, in letters</primary></indexterm>

<para>Synopsis:
</para>
<screen>\ps{<replaceable>text</replaceable>}
</screen>
<para>Add a postscript.  This command is optional and usually is used after
<literal>\closing</literal>.
</para>
<screen>\ps{P.S. After you have read this letter, burn it. Or eat it.}
</screen>

</sect1>
<sect1 label="24.10" id="_005csignature">
<title><literal>\signature</literal></title>

<para>Synopsis:
</para>
<screen>\signature{<replaceable>first line</replaceable> \\
            ... }
</screen>
<indexterm role="fn"><primary>\signature</primary></indexterm>

<para>The sender&#8217;s name.  This command is optional, although its inclusion is
usual.
</para>
<para>The argument text appears at the end of the letter, after the closing
and after a vertical space for the traditional hand-written
signature. Separate multiple lines with a double
backslash&#160;<literal>\\</literal>.  For example:
</para>
<screen>\signature{J Fred Muggs \\
           White House}
</screen>
<para>&latex;&#8217;s default for the vertical space from the <literal>\closing</literal> text
down to the <literal>\signature</literal> text is <literal>6\medskipamount</literal>, which is
six times 0.7em.
</para>
<para>This command is usually in the preamble, to apply to all the letters in
the document.  To have it apply to one letter only, put it inside a
<literal>letter</literal> environment and before the <literal>\closing</literal>.
</para>
<para>You can include a graphic in the signature, for instance with
<literal>\signature{\vspace{-6\medskipamount}\includegraphics{sig.png}\\
My name}</literal> (this requires writing <literal>\usepackage{graphicx}</literal> in the
preamble).
</para>

<!-- I think this is not a user-level command; it is used to keep from breaking -->
<!-- the page between the closing and the signature -->
<!-- @node \stopbreaks and \startbreaks -->
<!-- @section @code{\stopbreaks} and @code{\startbreaks} -->

<!-- @findex \startbreak -->
<!-- @findex \stopbreaks -->

<!-- @example  -->
<!-- @code{\stopbreaks} -->
<!-- text -->
<!-- @code{\startbreaks} -->
<!-- @end example -->

<!-- The @code{\stopbreaks} inhibits page breaking.  The @code{\startbreaks} resumes -->
<!-- normal page breaking. -->
<!-- -->
<!-- -->
</sect1>
<sect1 label="24.11" id="_005ctelephone">
<title><literal>\telephone</literal></title>

<indexterm role="fn"><primary>\telephone</primary></indexterm>

<para>Synopsis:
</para>
<screen>\telephone{<replaceable>number</replaceable>}
</screen>
<para>The sender&#8217;s telephone number.  This is typically in the preamble, where
it applies to all letters.  This only appears if the <literal>firstpage</literal>
pagestyle is selected.  If so, it appears on the lower right of the
page.
</para>

</sect1>
</chapter>
<chapter label="25" id="Terminal-input_002foutput">
<title>Terminal input/output</title>

<indexterm role="cp"><primary>input/output, to terminal</primary></indexterm>
<indexterm role="cp"><primary>terminal input/output</primary></indexterm>



<sect1 label="25.1" id="_005ctypein">
<title><literal>\typein[<replaceable>cmd</replaceable>]{<replaceable>msg</replaceable>}</literal></title>

<indexterm role="fn"><primary>\typein</primary></indexterm>

<para>Synopsis:
</para>
<screen>\typein[\<replaceable>cmd</replaceable>]{<replaceable>msg</replaceable>}
</screen>
<para><literal>\typein</literal> prints <replaceable>msg</replaceable> on the terminal and causes &latex; to
stop and wait for you to type a line of input, ending with return.  If
the optional <literal>\<replaceable>cmd</replaceable></literal> argument is omitted, the typed input is
processed as if it had been included in the input file in place of the
<literal>\typein</literal> command.  If the <literal>\<replaceable>cmd</replaceable></literal> argument is present, it
must be a command name.  This command name is then defined or
redefined to be the typed input.
</para>

</sect1>
<sect1 label="25.2" id="_005ctypeout">
<title><literal>\typeout{<replaceable>msg</replaceable>}</literal></title>

<indexterm role="fn"><primary>\typeout</primary></indexterm>

<para>Synopsis:
</para>
<screen>\typeout{<replaceable>msg</replaceable>}
</screen>
<para>Prints <literal>msg</literal> on the terminal and in the <literal>log</literal> file.
Commands in <literal>msg</literal> that are defined with <literal>\newcommand</literal> or
<literal>\renewcommand</literal> (among others) are replaced by their definitions
before being printed.
</para>
<para>&latex;&#8217;s usual rules for treating multiple spaces as a single space
and ignoring spaces after a command name apply to <literal>msg</literal>.  A
<literal>\space</literal> command in <literal>msg</literal> causes a single space to be
printed, independent of surrounding spaces.  A <literal>^^J</literal> in
<literal>msg</literal> prints a newline.
</para>

</sect1>
</chapter>
<chapter label="26" id="Command-line">
<title>Command line</title>

<indexterm role="cp"><primary>command line</primary></indexterm>

<indexterm role="fn"><primary>.tex, default extension</primary></indexterm>
<para>The input file specification indicates the file to be formatted;
&tex; uses <filename>.tex</filename> as a default file extension.  If you omit the
input file entirely, &tex; accepts input from the terminal.  You can
also specify arbitrary &latex; input by starting with a backslash.
For example, this processes <filename>foo.tex</filename> without pausing after every
error:
</para>
<screen>latex '\nonstopmode\input foo.tex'
</screen>
<indexterm role="fn"><primary>&#8211;help command-line option</primary></indexterm>
<para>With many, but not all, implementations, command-line options can also
be specified in the usual Unix way, starting with &#8216;<literal>-</literal>&#8217; or
&#8216;<literal>--</literal>&#8217;.  For a list of those options, try &#8216;<literal>latex --help</literal>&#8217;.
</para>
<indexterm role="cp"><primary>&#8216;<literal>*</literal>&#8217; prompt</primary></indexterm>
<indexterm role="cp"><primary>prompt, &#8216;<literal>*</literal>&#8217;</primary></indexterm>
<indexterm role="fn"><primary>\stop</primary></indexterm>
<para>If &latex; stops in the middle of the document and gives you a
&#8216;<literal>*</literal>&#8217; prompt, it is waiting for input.  You can type <literal>\stop</literal>
(and return) and it will prematurely end the document.
</para>
<para>See <link linkend="TeX-engines">&tex; engines</link>, for other system commands invoking &latex;.
</para>

</chapter>
<appendix label="A" id="Document-templates">
<title>Document templates</title>

<indexterm role="cp"><primary>document templates</primary></indexterm>
<indexterm role="cp"><primary>templates, document</primary></indexterm>

<para>Although not reference material, perhaps these document templates will
be useful.  Additional template resources are listed at
<ulink url="http://tug.org/interest.html#latextemplates">http://tug.org/interest.html#latextemplates</ulink>.
</para>


<sect1 label="A.1" id="beamer-template">
<title><literal>beamer</literal> template</title>

<indexterm role="cp"><primary><literal>beamer</literal> template and class</primary></indexterm>
<indexterm role="cp"><primary>template, <literal>beamer</literal></primary></indexterm>

<para>The <literal>beamer</literal> class creates presentation slides.  It has a vast
array of features, but here is a basic template:
</para>
<screen>\documentclass{beamer}

\title{Beamer Class template}
\author{Alex Author}
\date{July 31, 2007}

\begin{document}

\maketitle

% without [fragile], any {verbatim} code gets mysterious errors.
\begin{frame}[fragile]
 \frametitle{First Slide}

\begin{verbatim}
  This is \verbatim!
\end{verbatim}

\end{frame}

\end{document}
</screen>
<para>One web resource for this:
<ulink url="http://robjhyndman.com/hyndsight/beamer/">http://robjhyndman.com/hyndsight/beamer/</ulink>.
</para>

</sect1>
<sect1 label="A.2" id="book-template">
<title><literal>book</literal> template</title>

<indexterm role="cp"><primary>template, <literal>book</literal></primary></indexterm>

<screen>\documentclass{book}
\title{Book Class Template}
\author{Alex Author}

\begin{document}
\maketitle

\chapter{First}
Some text.

\chapter{Second}
Some other text.

\section{A subtopic}
The end.
\end{document}
</screen>

</sect1>
<sect1 label="A.3" id="tugboat-template">
<title><literal>tugboat</literal> template</title>

<indexterm role="cp"><primary>template, TUGboat</primary></indexterm>
<indexterm role="cp"><primary>TUGboat template</primary></indexterm>
<indexterm role="cp"><primary><literal>ltugboat</literal> class</primary></indexterm>

<para><citetitle>TUGboat</citetitle> is the journal of the &tex; Users Group,
<ulink url="http://tug.org/TUGboat">http://tug.org/TUGboat</ulink>.
</para>
<screen>\documentclass{ltugboat}

\usepackage{graphicx}
\usepackage{ifpdf}
\ifpdf
\usepackage[breaklinks,hidelinks]{hyperref}
\else
\usepackage{url}
\fi

%%% Start of metadata %%%

\title{Example \TUB\ article}

% repeat info for each author.
\author{First Last}
\address{Street Address \\ Town, Postal \\ Country}
\netaddress{user (at) example dot org}
\personalURL{http://example.org/~user/}

%%% End of metadata %%%

\begin{document}

\maketitle

\begin{abstract}
This is an example article for \TUB{}.
Please write an abstract.
\end{abstract}

\section{Introduction}

This is an example article for \TUB, linked from
\url{http://tug.org/TUGboat/location.html}.

We recommend the \texttt{graphicx} package for image inclusions, and the
\texttt{hyperref} package if active urls are desired (in the \acro{PDF}
output).  Nowadays \TUB\ is produced using \acro{PDF} files exclusively.

The \texttt{ltugboat} class provides these abbreviations (and many more):
% verbatim blocks are often better in \small
\begin{verbatim}[\small]
\AllTeX \AMS \AmS \AmSLaTeX \AmSTeX \aw \AW
\BibTeX \CTAN \DTD \HTML
\ISBN \ISSN \LaTeXe
\mf \MFB
\plain \POBox \PS
\SGML \TANGLE \TB \TP
\TUB \TUG \tug
\UNIX \XeT \WEB \WEAVE

\, \bull \Dash \dash \hyph

\acro{FRED} -&gt; {\small[er] fred}  % please use!
\cs{fred}   -&gt; \fred
\meta{fred} -&gt; &lt;fred&gt;
\nth{n}     -&gt; 1st, 2nd, ...
\sfrac{3/4} -&gt; 3/4
\booktitle{Book of Fred}
\end{verbatim}

For references to other \TUB\ issue, please use the format
\textsl{volno:issno}, e.g., ``\TUB\ 32:1'' for our \nth{100} issue.

This file is just a template.  The \TUB\ style documentation is the
\texttt{ltubguid} document at \url{http://ctan.org/pkg/tugboat}.  (For
\CTAN\ references, where sensible we recommend that form of url, using
\texttt{/pkg/}; or, if you need to refer to a specific file location,
\texttt{http://mirror.ctan.org/\textsl{path}}.)

Email \verb|tugboat@tug.org| if problems or questions.

\bibliographystyle{plain}  % we recommend the plain bibliography style
\nocite{book-minimal}      % just making the bibliography non-empty
\bibliography{xampl}       % xampl.bib comes with BibTeX

\makesignature
\end{document}
</screen>

</sect1>
</appendix>
<chapter label="" id="Concept-Index">
<title>Concept Index</title>

<index role="cp"></index>

<!-- The name of the `Command Index' node must NOT be altered for ltx-help.el. -->
</chapter>
<chapter label="" id="Command-Index">
<title>Command Index</title>

<index role="fn"></index>

</chapter>
</book>
