\input texinfo    @c -*-texinfo-*-
@comment %**start of header 
@comment te@TeX{} 0.9 Local Guide
@comment $Id: tetex.texi,v 1.1 1999/02/06 11:48:00 kiesling Exp kiesling $
@setfilename tetex
@set teTeX-version 0.9
@set manual-revision $Revision: 1.1 $
@settitle te@TeX{} Version @value{xdvi-version} Local Guide

@defindex tx

@setchapternewpage odd

@settitle teTeX Version @value{teTeX-version} Local Guide
@dircategory TeX
@direntry
* teTeX: (tetex).  Local Guide for teTeX 0.9
@end direntry

@ifinfo
This file describes te@TeX{} 0.9.


Copyright (C) 1998, 1999 Free Software Foundation, Inc.

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.
@end ifinfo

@ignore
Permission is granted to process this file through TeX and print the
results, provided the printed document carries copying permission
notice identical to this one except for the removal of this paragraph
(this paragraph not being relevant to the printed manual).

@end ignore
@ifinfo
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.

Permission is granted to copy and distribute translations of this manual
into another language, under the above conditions for modified versions,
except that this permission notice may be stated in a translation approved
by the Free Software Foundation.
@end ifinfo

@titlepage
@title The te@TeX{} @value{teTeX-version} Local Guide 
@subtitle Using te@TeX{} 0.9 on GNU systems.
@author Robert Kiesling
@page
@vskip 0pt plus 1filll

@iftex
The Linux Documentation Project distributed the initial editions of this
document in LinuxDoc-SGML format as "The te@TeX{} HOWTO: The
Linux-te@TeX{} Local Guide."  
@sp 4

@end iftex

Copyright @copyright{} 1998, 1999 Free Software Foundation, Inc.
@sp 2

Published by the Free Software Foundation @*
59 Temple Place - Suite 330 @*
Boston, MA 02111-1307, USA.

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.

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.

Permission is granted to copy and distribute translations of this manual
into another language, under the above conditions for modified versions,
except that this permission notice may be stated in a translation approved
by the Free Software Foundation.

@value{manual-revision}
@end titlepage

@ifinfo

@node Top, Overview, (dir), (dir)
@comment  node-name,  next,  previous,  up
@top te@TeX{} Local Guide

This is the Local Guide for Using te@TeX{} on GNU systems.  It is a 
supplement to the te@TeX{} FAQ, the te@TeX{} Manual, and the documents 
included in the distribution.

@menu
* Overview::		What the te@TeX{} package is.
* Using::               Guide to using teTeX's TeX and LaTeX.
* TeX::                 How to prepare a TeX input file.
* LaTeX::               The LaTeX 2e macro package.
* Postscript fonts::        Using Postscript fonts.
* Source2e::                Printing the documented LaTeX2e source.
* CTAN sites::              Where to find TeX related material on the Net.
* Installation::            Installing the te@TeX{} 0.9 distribution.
* Index::
* Distribution and Copyright::
@end menu

@end ifinfo


@node Overview, Introduction, Top, Top
@comment  node-name,  next,  previous,  up
@chapter Overview of te@TeX{}

@menu
* Introduction::        te@TeX{} at a glance.
* Copyright::           
@end menu

@ifinfo
The Linux Documentation Project distributed the initial editions of this
document in LinuxDoc-SGML format as "The te@TeX{} HOWTO: The
Linux-te@TeX{} Local Guide."  
@txindex The te@TeX{} HOWTO.

Special thanks are due to Amber Ankerholz for her thorough editing and
proofreading of the manuscript, as well as her support and
encouragement.
@end ifinfo


@node Introduction, Copyright, Overview, Overview
@comment  node-name,  next,  previous,  up
@section Introduction.

@txindex @TeX{}
@TeX{} is implemented for practically every serious computer system in
the world---and quite a few ``non-serious'' ones---so implementors
must provide the installation facilities for all of them.  This
accounts in part for te@TeX{}'s complexity, in addition to the inherent
complexity of any @TeX{} installation.  It also accounts for the fact
that installing the system yourself is a significant task, and unless
you are already familiar with @TeX{}, it is easy to get lost in the
numerous executable programs, @TeX{} files, documentation, and fonts.

@txindex te@TeX{}
Fortunately, te@TeX{} is part of the GNU/Linux distribution. You can
@txindex GNU/Linux
install the package much more easily using the system's installation
tools. You may already have te@TeX{} installed on your system.  If so,
you can skip ahead to @ref{Using}.

However, if you want to install the package, the archives necessary for
a workable te@TeX{} installation are on the Internet, in the CTAN
archive network.  There is a list of these sites in @ref{CTAN sites}.
@txindex Comprehensive @TeX{} Archive Network (CTAN)

CTAN is the Comprehensive @TeX{} Archive Network, a series of anonymous
@txindex Comprehensive @TeX{} Archive Network (CTAN)
FTP sites that archive @TeX{} programs, macros, fonts, and documentation.
In the course of using @TeX{} you'll probably become familiar with at
least one CTAN site.  In this document, a pathname like
@file{~/contrib/pstricks} means ``look in the directory
@file{contrib/pstricks} of your nearest CTAN site.'' 

The installation of the generic te@TeX{} distribution described in
@ref{Installation} concentrates on the Intel versions of GNU/Linux.
Installing te@TeX{} on other hardware should require only substituting the
appropriate executable program archive in the installation process.

In addition to the executable programs, the distribution includes all of
the @TeX{} and La@TeX{} packages, @samp{metafont} and its sources,
@txindex @code{metafont}
@samp{bibtex}, @samp{makeindex} and all of the documentation---more
@txindex bibtex
than 4 megabytes' worth.  The documentation covers everything you will
forseeably need to know to get started.  So, you should install all of
the documents.  Not only will you eventually read them, the documents
themselves provide many examples of ``live'' @TeX{} and La@TeX{} code.

@TeX{} was written by Professor Donald Knuth of Stanford University.  It
@txindex Knuth, Donald
is a lower-level typesetting language for all of the higher-level
packages like La@TeX{}.  Essentially, La@TeX{} is a set of @TeX{} macros that
@txindex La@TeX{}
provide convenient, predefined document formats for end users.  If you
like the formats provided by La@TeX{}, you may never need to learn
bare-bones @TeX{} programming.  The difference between the two languages
is like the difference between assembly language and C.  You can have
the speed and flexibility of @TeX{}, or the convenience of La@TeX{}.  

By the way, the letters of the word ``@TeX{}'' are Greek,
tau-epsilon-chi.  It is not a fraternity, but the root of the Greek
word, @emph{techne,} which means art and/or science.  ``@TeX{}'' is not
pronounced like the first syllable in ``Texas.''  The @emph{chi} has
no English equivalent, but @TeX{} is generally pronounced so that it
rhymes with ``yecch,'' to use Professor Knuth's example from @emph{The
@TeX{}Book.}  When writing, ``@TeX{},'' on character devices,
always use the standard capitalization, or the @samp{\TeX@{@}}
macro in typesetting.

@node Copyright, Using, Introduction, Overview
@comment  node-name,  next,  previous,  up
@section Copyright.

The te@TeX{} Local Guide is @copyright{} 1998, 1999 by Robert Kiesling.
Permission is granted to make and distribute verbatim copies of this
manual provided that the copyright notice and this permission notice
are preserved on all copies.

Permission is granted to copy and distribute modified versions of this
manual under the conditions for verbatim copying, provided also that
the sections entitled, ``Distribution,'' and, ``GNU General Public
License'' are included exactly as in the original, and provided that
the entire resulting derived work is distributed under the terms of a
permission notice identical to this one.

Permission is granted to copy and distribute translations of this manual
into another language, under the above conditions for modified versions.
except that the sections entitled, ``Distribution,'' and, ``GNU General
Public License'' may be included in a translation approved by the Free
Software Foundation instead of in the original English.  Please refer to
section @ref{Distribution and Copyright} for terms of copying.



@node Using, Configuration, Copyright, Top
@comment  node-name,  next,  previous,  up
@chapter Using te@TeX{}

Theoretically, at least, everything is installed correctly and is
ready to run.  te@TeX{} is a very large software package.  As with any
complex software package, you'll want to start by learning te@TeX{}
slowly, to avoid being overwhelmed by its complexity.

At the same time, we want the software to do something useful.  So
instead of watching @TeX{} typeset:

@example
``Hello, World!''
@end example

we can format a couple of te@TeX{}'s own documents to test it.  Refer to
@ref{Documentation} for the gory details.

@menu
* Configuration::       Local and user-specific configuration options.
* Documentation::       Printing te@TeX{}, @TeX{}, and La@TeX{} documentation.
@end menu

@node Configuration, Documentation, Using, Using
@comment  node-name,  next,  previous,  up
@section Local and user-specific configuration.

The first thing to do is look at the @file{README} file.  It contains a
@txindex @code{README}
lot of hints on how to configure te@TeX{} for your output device (i.e.,
printer).  The @file{README} file is located in the directory:

@example
/usr/lib/tetex/texmf/doc/tetex
@end example

Read the file over with the command:

@example
less /usr/lib/tetex/texmf/doc/tetex/README
@end example
@txindex @code{less}

or, print it out with the command:
@txindex printing

@example
cat /usr/lib/tetex/texmf/doc/tetex/README >/dev/lp0
@end example
@txindex @code{cat}

assuming that your printer is connected to @file{/dev/lp0}.
Substitute the device driver file that your printer is connected to,
as appropriate.  Or, better still, print it using the @samp{lpr}
command:

@example
lpr /usr/lib/tetex/texmf/doc/tetex/README
@end example
@txindex @code{lpr}

You should have installed the printer daemon that is included with
your distribution of GNU/Linux.  If not, do that now, per the instructions
that come with the package.  

Print out the @file{tetex-FAQ}.  It's located in the same directory as
@txindex @code{tetex-FAQ}
the @file{README} file.  Keep the FAQ handy, because it contains useful
@txindex @code{README}
hints for configuring te@TeX{}'s output drivers for your printer.  We'll
get to that later.  The @file{tetex}-FAQ is also viewable via the
@samp{texconfig} utility.
@txindex @code{texconfig}

Next define a directory to store your own @TeX{} format files.  te@TeX{}
searches the directories listed by the @samp{$TEXINPUTS} environment
@txindex @code{$TEXINPUTS}
variable for local @TeX{} input files:

@example
export TEXINPUTS=".:~/texinputs:"
@end example

to the system-wide @file{/etc/profile} file.  Individual users can set
their own local @samp{$TEXINPUTS} directory, by adding the line in their
@file{~/.profile} or @file{~/.bash_profile} if @samp{bash} is the
@txindex @code{.profile}
@txindex @code{.bash_profile}
@txindex @code{bash}
default shell.  The @samp{$TEXINPUTS} environment variable tells
@txindex @code{$TEXINPUTS}
te@TeX{} to look for users' individual @TeX{} style files in the
@file{~/texinputs} directories under each user's home directory.  It is
critical that a colon appear before and after this directory.  te@TeX{}
is going to append its own directory searches to your own.  You want
te@TeX{} to search the local format files first, so it uses the local
versions of any of the standard files you have edited.

Add the @file{/usr/lib/tetex/bin} directory to the system-wide path
if you're installing te@TeX{} as root.  Again, if you're installing a
personal copy of te@TeX{}, add the directory where the te@TeX{} binaries are
located to @emph{the front} of your @samp{$PATH} with the
@txindex @code{$PATH}
following line in your @file{~/.profile} or
@file{~/.bash_profile}.

@example
export PATH="~/tetex/bin:"$PATH
@end example

Now, log in as @samp{root} and run @samp{texconfig} per the instructions
@txindex @code{texconfig}
in the @file{tetex-FAQ}, and choose the printer that is attached to your
@txindex @code{tetex-FAQ}
system.  Make sure that you configure te@TeX{} for both the correct
printer and printer resolution.

Finally, run the @samp{texhash} program.  This ensures that te@TeX{}'s
@txindex @code{texhash}
internal database is up to date.  The database is actually a
@file{ls-lR} directory listing.  You @emph{must} run @samp{texhash}
@txindex @code{ls-lR}
every time you change the system configuration, or te@TeX{} will not be
able to locate your changes.

@node Documentation, TeX, Configuration, Using
@comment  node-name,  next,  previous,  up
@section Printing the documentation.

You should be logged in as @samp{root} the first few times you run
te@TeX{}.  If you aren't, @samp{metafont} may not be able to create the
necessary directories for its fonts.  The @samp{texconfig} program
@txindex @code{texconfig}
includes an option to make the font directories world-writable, but if
you're working on a multi-user system, security considerations may
make this option impractical or undesirable.

In either instance, if you don't have the appropriate permissions to
write to the directories where the fonts are stored, @samp{metafont}
will complain loudly because it can't make the directories.  You won't
see any output because you have a bunch of zero-length font characters.
This is no problem.  Simply log out, re-login as @samp{root}, and repeat
the offending operation.
@txindex @code{metafont}

The nice thing about te@TeX{} is that, if you blow it, no real harm is
done.  It's not like a compiler, where you can trash the root partition
if a pointer goes astray.  What, you haven't read the te@TeX{} manual
yet?  Of course you haven't.  It's still in the distribution, in source
code form, waiting to be output.

So, without further delay, read the te@TeX{} manual.  It's located in
the directory:

@example
/usr/lib/tetex/texmf/doc/tetex
@end example

The La@TeX{} source for the manual is called @file{teTeXDOC.tex}.  (The
@code{.tex} extension is used for both @TeX{} and La@TeX{} files.  Some
editors, like Emacs, can tell the difference.)  There is also a file
@file{teTeXDOC.dvi} included with the distribution, which you might
want to keep in a safe place---say, another directory---in case you
want to test your @code{.dvi} drivers later.  With that out of the
way, type:

@example
latex te@TeX{}DOC.tex
@end example

La@TeX{} will print several warnings.  The first: 

@example
LaTeX Warning: Label(s) may have changed. Rerun to get the
cross-references right.
@end example

is standard.  It's common to build a document's Table of Contents by
@txindex Table of Contents
La@TeX{}ing the document twice.  So, repeat the command.  The other
warnings can be safely ignored.  They simply are informing you that some
of the FTP paths mentioned in the documentation are too wide for their
alloted spaces.  @ref{Paragraphs} and @ref{Tolerances} describe
horizontal spacing in more detail.

te@TeX{} will have generated several files from @file{te@TeX{}DOC.tex}.
The one that we're interested in is @file{te@TeX{}DOC.dvi}.  This is the
device-independent output that you can send either to the screen or the
printer.  If you're running te@TeX{} under the X Windows System, you can
preview the document with @samp{xdvi}.
@txindex @code{xdvi}

For the present, let's assume that you have a HP LaserJet II.  You
would give the command:

@example
dvilj2 teTeXDOC.dvi 
@end example
@txindex @code{dvilj2}

which writes a PCL output file from @samp{te@TeX{}DOC.dvi}, including
soft fonts that will be downloaded to the LaserJet.  This is @emph{not}
a feature of @TeX{} or La@TeX{}, but a feature provided by
@samp{dvilj2}.  Other @code{.dvi} drivers provide features that are
relevant to the devices they support.  @samp{dvilj2} tries to fill the
font requests which were made in the original La@TeX{} document with the
the closest equivalents available on the system.  In the case of a plain
text document like @file{te@TeX{}DOC.tex}, there isn't much difficulty.
All of the fonts requested by @file{te@TeX{}DOC.tex} will be generated
by @samp{metafont}, which is automatically invoked by @samp{dvilj2} if
the fonts aren't already present.  (If you're running @samp{dvilj2} for
the first time, the program may need to generate all of the fonts.)
There are several options that control font generation via
@samp{dvilj2}.  They're outlined in the manual page.  At this point, you
@txindex @code{dvilj2}
shouldn't need to operate @samp{metafont} directly.  If you do, then
@txindex @code{metafont}
something has gone awry with your installation.  All of the @code{.dvi}
drivers will invoke @samp{metafont} directly via the kpathsea
path-searching library---the discussion of which is beyond the scope of
this document---and you don't need to do any more work with
@samp{metafont} for the present.  All of the @samp{metafont} sources for
the Computer Modern font library are provided.
@txindex Computer Modern fonts

You can print @file{teTeXDOC.lj} with the command:

@example
lpr teTeXDOC.lj
@end example
@txindex @code{lpr}

You may also need to install a printer filter that understands PCL.
Refer to the manual pages of your printer management software for more
details.

The nine-page @emph{te@TeX{} Guide} provides some useful information
for further configuring your system, some of which I have mentioned,
much that this document doesn't cover.

Some of the information in the next section I haven't been able to test,
because I have a non-Postscript HP Deskjet 400 color ink jet printer
connected to the computer's parallel port.  However, not owning a
Postscript printer is no barrier to printing text and graphics from your
text documents.  Consult the instructions of your operating system
distribution to install Ghostscript, if it isn't already installed on
your system.

@node TeX, Input files, Documentation, Top
@comment  node-name,  next,  previous,  up
@chapter Formatting @TeX{} Documents

@menu
* Input files::         TeX's input file command syntax.
* Statements::          Commands and variables.
* Fonts::               Font commands.
* Paragraphs::          How to format paragraphs.
* Tolerances::          What are those black rectangles after every line?
* Pages::               Page layout.
* Headers::             Page numbers, headers, and footers.
* Titles::              Sections, large text, and macros to format them.
@end menu

@node Input files, Statements, TeX, TeX
@comment  node-name,  next,  previous,  up
@section Input file command syntax.

Preparing documents for @TeX{} typesetting is easy.  Make sure there's a
blank line between the paragraphs of a plain text file, and run file
through the @TeX{} program with the command

@example
tex your_text_file
@end example

The result will be a file of the same base name and the extension
@code{.dvi}.  @TeX{} formats the text in 10-pt., Computer Modern Roman,
@txindex Computer Modern Roman
single-spaced, with justified left and right margins.  If you receive
error messages from special characters like dollar signs, escape them
with a backslash character, @samp{\}, and run @TeX{} on the file again.
You should be able to process the resulting file with the @code{.dvi}
file translator of your choice (see above) to get printed output.

One peculiarity of @TeX{} input is that you must use opening and closing
quotes, which are denoted in the input file with the grave accent and
single quote characters.  Emacs' @TeX{} mode does this for you
@txindex Emacs
automatically:

@example
"These are ASCII-type quotes."
``These are `TeX-style' quotes.''
@end example

@node Statements, Fonts, Input files, TeX
@section TeX statements.

Commands in @TeX{} start with a backslash (@samp{\}).  For example, the
command to change the spacing between lines is:

@example
\baselineskip=24pt
@end example

The baseline is the bottom of the characters on a line, not counting
descenders.  The distance between the baseline of one line and the
next is the @samp{\baselineskip}, and is assigned a value of 24
points.

Measurements or dimensions in @TeX{} are often given in the following 
units:

@example
pt                % Point        1/72 in.
pc                % Pica:        12 pt.
in                % Inch:        72.27 pt.
cm                % Centimeter:  2.54 cm = 1 in.
mm                % Millimeter:  10 mm = 1 cm.
@end example
@txindex point (pt.)
@txindex pica (pc.)
@txindex inch (in.)
@txindex centimeter (cm.)
@txindex millimeter (mm.)

Some commands do not take assignments.  For example:

@example
\smallskip        % Approximately 3 pt.
\medskip          % Two \smallskips.
\bigskip          % Two \medskips.
@end example
@txindex @code{smallskip}
@txindex @code{medskip}
@txindex @code{bigskip}

A @samp{\smallskip} inserts a 3-pt. vertical space in the
@txindex @code{smallskip}
document.  The measurements are approximate because @TeX{} needs to
adjust the dimensions for page breaks, section headings, and other
units of vertical space.  This is true for horizontal spacing as well.

@example
\hsize=6.5in
@end example
@txindex @code{hsize}

This command sets the line length to a width of 6.5 inches.  @TeX{} tries
to fill the line by adjusting the spacing between words and some
letters.  If @TeX{} cannot fill a line to within its tolerances, it
produces a warning message, and adjusts the horizontal spacing within
the line as best it can.  Formatting tolerances are discussed in
@ref{Tolerances}.

There are many other commands that specify horizontal and vertical
dimensions and tolerances, and the most commonly used commands are
described below.

@node Fonts, Paragraphs, Statements, TeX
@comment  node-name,  next,  previous,  up
@section @TeX{} font commands.

In @TeX{}, the default font is 10-pt. Computer Modern Roman.  To specify
@txindex Computer Modern Roman
a typeface, like italic, bold, or monospaced, use the following
commands.

@example
\rm          % Roman (the default).
\it          % Italics.
\bf          % Bold.
\tt          % Monospaced (teletype).
\sl          % Oblique (slanted).
@end example
@txindex @code{rm}
@txindex @code{it}
@txindex @code{bf}
@txindex @code{tt}
@txindex @code{sl}

The commands change the typeface where they appear in the text, as in
the following example.

@example
This text is Roman, \it and this text is italic.  \bf This text is
bold, and \rm this text is in Roman again.
@end example

To specify a font for your document, use the @samp{\font}
command:

@example
\font\romantwelve=cmr12
@end example
@txindex @code{font}

This creates the font command @samp{\romantwelve}, which, when
used in the text, changes the font to Computer Modern Roman, 12 pt.

@example
\romantwelve
This is the Computer Modern Roman font at 12 points.
@end example

For information about the fonts in the te@TeX{} distribution 
look at the file:

@example
/usr/lib/tetex/texmf/doc/fonts/fontname/fontname.dvi
@end example
@txindex @code{fontname.dvi}

If you want to print a sample of a font, @TeX{} the file:

@example
/usr/lib/tetex/texmf/tex/plain/base/fontchart.tex
@end example
@txindex @code{fontchart.tex}

and fill in the name of the font you want to print at the prompt.

You can also change the size of a font to get different effects.  
Font magnification is exponential, and specified with the
@samp{scaled \magstep} statements, which are placed after the font
specification:
@txindex @code{magstep}

@example
\font\sfmedium=cmss12 scaled \magstep 1
@end example
@txindex @code{font}

This command will give you a sans serif font that is 120 percent the
size of the 12-pt. Computer Modern sans serif font.  Fonts can be
magnified in steps from 0 to 5.  Each step provides an additional
120 percent magnification.

@node Paragraphs, Tolerances, Fonts, TeX
@comment  node-name,  next,  previous,  up
@section Formatting paragraphs. 

As mentioned above, @TeX{} typesets text in 10-point Computer Modern
Roman by default.  The length of a line is the value of
@samp{\hsize}, which defaults to 6.5 in.  If you want to change
@txindex @code{hsize}
the value of @samp{\hsize} to 5.5 in. for example, use this
command:  

@example
\hsize=5.5in
@end example

In @TeX{} a @dfn{dimension} is an adjustable unit of length, either
@txindex dimension
horizontal or vertical.  The amount by which a dimension can be
increased or decreased can be specified in its definition.  Closely
related to a dimension is a @dfn{skip}, which is a dimension that
@txindex skip
is placed in one of @TeX{}'s internal registers.  Skips are defined with
the @samp{\newskip} statement.  The @samp{\smallskip}
@txindex @code{newskip}
@txindex @code{smallskip}
dimension, as defined by @TeX{} is:

@example
\newskip\smallskipamount \smallskipamount=3pt plus 1pt minus 1pt
@end example
@txindex @code{smallskipamount}

So the @samp{\smallskip} command is also shorthand for:

@example
\vskip\smallskipamount
@end example

There are a number of dimensions that control the page layout.  They
are summarized in @ref{Pages}.

@TeX{} formats paragraphs with justified left and right margins.  If you
want the text to be left justified only, use this command:

@example
\raggedright
@end example
@txindex @code{raggedright}

To typeset a line that is justified to the right margin, use the
@samp{rightline} command:
@txindex @code{rightline}

@example
\rightline@{This is the line to be typeset.@}
@end example

The @samp{\line} command typesets the text of its argument to
@txindex @code{line}
fill the entire line:

@example
\line@{This text will be spaced to fit the entire line.@}
@end example

The @samp{\hfil} command adds space to fill out the line where
@txindex @code{hfil}
it occurs.  So, for example, the @samp{\rightline} command is
@txindex @code{rightline}
equivalent to:

@example
\line@{\hfilThis line will be right justified.@}
@end example
@txindex @code{line}
@txindex @code{hfil}

To typeset a line that is centered, use the @samp{\centerline}
command.  

@example
\centerline@{This is the line to be centered.@}
@end example
@txindex @code{centerline}

To change the left margin, set the value of @samp{\hoffset}, as
in this example:

@example
\hoffset=1.5in
@end example
@txindex @code{hoffset}

The @samp{\parindent} command specifies the amount that the
@txindex @code{parindent}
first line of every paragraph is indented.

@example
\parindent=.5in
@end example

Two other dimensions, @samp{\leftskip} and
@txindex @code{leftskip}
@samp{\rightskip}, will indent the right and left margins,
@txindex @code{rightskip}
respectively, of the paragraphs that come after them.

@example
\leftskip=.5in
\rightskip=.5in
@end example
@txindex @code{leftskip}
@txindex @code{rightskip}

The control word @samp{\narrower} is equivalent to:

@example
\leftskip=\parindent
\rightskip=\parindent
@end example

That is, @samp{\narrower} narrows the paragraph margins by the
@txindex @code{narrower}
value of @samp{\parindent}.
@txindex @code{parindent}

As mentioned in the previous section, the @samp{\baselineskip}
@txindex @code{baselineskip}
specifies the distance between lines.  The default is 12 pt.  To
approximate double-spaced text, use the following command.
@txindex double-spaced text

@example
\baselineskip=\baselineskip*1.6
@end example

The @samp{\parskip} command specifies the distance in addition to
@txindex @code{parskip}
@samp{\baselineskip} between paragraphs.  By default, no extra space is
@txindex @code{baselineskip}
added, but the distance between paragraphs can stretch as much as 1
pt. to fill the page correctly.  To put a blank line between paragraphs,
use this command:

@example
\parskip=\baselineskip
@end example



@node Tolerances, Pages, Paragraphs, TeX
@comment  node-name,  next,  previous,  up
@section Tolerances.  (What are those black rectangles after every line?)

@TeX{} normally formats text to strict tolerances.  If, for some reason,
text cannot be formatted to within those tolerances, @TeX{} produces a
warning message and formats the text the best it can.  If the text
must be stretched too much to fit the line, @TeX{} warns you that the
@samp{\hbox} is underfull.  Text that must be squeezed to fit
@txindex @code{hbox}
in the line produces an overfull @samp{\hbox} warning.

For each overfull @samp{\hbox}, @TeX{} places a @dfn{slug}, a
@txindex slug
black rectangle, after the line.  The slug indicates that the line
could not be formatted to within the specifications set by the
@samp{\hbadness} parameter.
@txindex @code{hbadness}

The fit of the text within its specified dimensions is measured by its
@dfn{badness}, which is a number between 0 and 10000.  A badness of 0 is
@txindex @code{badness}
@txindex badness
a perfect fit, and a badness of 10000 means that the line probably will
never fit.  The default value of @samp{\hbadness} is 1000.  If you set
@samp{\hbadness} to 10000, @TeX{} does not report underfull lines.
@txindex @code{hbadness}

Sometimes @TeX{} allows a line to extend past the right margin.  This is an
aesthetic decision on the part of @TeX{}'s author.  The amount is
determined by the @samp{\hfuzz} parameter, which defaults to 0.1 pt.  If
@txindex @code{hfuzz}
the text does not fit within the line, the @samp{\tolerance} parameter
@txindex @code{tolerance}
determines how @TeX{} will handle the overfull @samp{\hbox}.  The default
@txindex @code{hbox}
value of @samp{\tolerance} is 200.  Setting @samp{\tolerance} to 1000
suppresses overfull @samp{\hbox} warnings and the printing of slugs.

@node Pages, Headers, Tolerances, TeX
@comment  node-name,  next,  previous,  up
@section Page layout.

In addition to the left margin and line length dimensions that are
described in the previous section, @TeX{} also lets you specify top and
bottom margins, and vertical spacing.

Like the @samp{\hsize} and @samp{\hoffset} dimensions described in the
@txindex @code{hsize}
@txindex @code{hoffset}
previous section, @TeX{} also provides the @samp{\vsize} and
@txindex @code{vsize}
@samp{\voffset} statements.  The default for @samp{\vsize} is 8.9 in.,
@txindex @code{voffset}
and @samp{\voffset} defaults to 0.

Normally, te@TeX{} places the beginning of the first line of text 1
in. below the top of the paper and 1 in. from the left edge.  You can
start the text closer to the top of the page with the command:

@example
\voffset=-0.5in
@end example

If you want to add vertical space in a document, the commands
@samp{\smallskip}, @samp{\medskip}, and @samp{\bigskip} will add
@txindex @code{smallskip}
@txindex @code{medskip}
@txindex @code{bigskip}
approximately 3, 6, and 12 points of blank vertical space.  These
measurements are approximate; @TeX{} will adjust them by as much as 1
pt. so the page is filled correctly.

The @samp{\vfill} command adds an adjustable vertical space between
@txindex @code{vfill}
paragraphs on a page.  It is infinitely stretchable, so it will add
vertical space to fill as much of the rest of the page as possible.  If
you want to specify a dimension, use @samp{\vskip} as in:
@txindex @code{vskip}

@example
\vskip 10pt
@end example

The commands @samp{\hss} and @samp{\vss} are similar to @samp{\hfil} and
@txindex @code{hss}
@txindex @code{vss}
@txindex @code{hfil}
@samp{\vfill}, but they provide dimensions that are infinitely
@txindex @code{vfill}
shrinkable as well as infinitely stretchable.

The @samp{\vskip} and @samp{\vfill} commands produce flexible lengths.
@txindex @code{vskip}
@txindex @code{vfill}
They do not add space where no text exists, for example, at the top of a
page.  Use @samp{\vglue} if you want to add an absolute space.
@txindex @code{vglue}

@TeX{} fills the @samp{\vsize} dimension with as much text as possible
@txindex @code{vsize}
before it starts a new page.  To force a page break, use the
@samp{\vfill \eject} sequence.  If @samp{\vfill} is not used, the text
@txindex @code{eject}
before the @samp{\break} will be spaced to fill the page.
@txindex @code{break}

If you want @TeX{} to be more flexible about its vertical page sizing,
place the @samp{\raggedbottom} command in your document.  @TeX{} will then
@txindex @code{raggedbottom}
adjust the bottom margin of each page slightly to make vertical spacing
more consistent.

@node Headers, Titles, Pages, TeX
@comment  node-name,  next,  previous,  up
@section Running headers and footers.
@txindex headers
@txindex footers

te@TeX{} by default places the page number at the bottom center of the
page.  If you want to change the location and style of the page number,
you can specify alternate headers and footers by changing definitions of
@samp{\headline} and @samp{\footline}.  The default value for
@txindex @code{headline}
@txindex @code{footline}
@samp{\footline} contains the @samp{\folio} command, which prints the
@txindex @code{folio}
page number.  The default value for @samp{\headline} is @samp{\hfil}, so
@txindex @code{hfil}
a blank line is printed.

The @samp{\pageno} command is a synonym for @TeX{}'s internal page counter.
@txindex @code{pageno}
You can change the page number by changing the value of @samp{\pageno}.
If @samp{\pageno} is negative, the numbers are printed as Roman
numerals.  

@example
\pageno=10 
\pageno=-1 
@end example

The command @samp{\nopagenumbers} is shorthand for:

@example
\headline=@{\hfil@}
\footline=@{\hfil@}
@end example
@txindex @code{headline}
@txindex @code{footline}
@txindex @code{hfil}

The default footline also contains the font command @samp{\tenrm}, which
sets the page number's font to 10-pt. Roman.  If you want to print the
page number in 12-pt. Roman, for example, you would first define a
12-pt. Roman font, and use that in the definition of @samp{\footline}.
Font commands are discussed in @ref{Fonts}.

@example
\font\twelvrm=cmr12
\footline=@{\hss\twelvrm\folio\hss@}
@end example
@txindex @code{font}
@txindex @code{footline}

You can put a @dfn{rule}, a horizontal line, at the top of each page by
@txindex rule
redefining @samp{\headline} as:
@txindex @code{headline}

@example
\headline=@{\hrulefill@}
@end example
@txindex @code{hrulefill}

To specify different headers for even and odd pages use the
@samp{\ifodd} command, which has the form:
@txindex @code{ifodd}

@example
\ifodd[condition][true-action]\else[false-action]
@end example

An example @samp{\headline} that uses different headers for
@txindex @code{headline}
even and odd pages would be:

@example
\headline=@{\ifodd\pageno odd-page-header \else even-page-header@}
@end example

The @samp{\ifodd} statement uses the first argument if the page number
@txindex @code{ifodd}
is odd, and the second argument otherwise.

@node Titles, LaTeX, Headers, TeX
@comment  node-name,  next,  previous,  up
@section Large type, sections, and macros.
@txindex sections
@txindex macros

@TeX{} provides only the @samp{\beginsection} macro for section headings.
@txindex @code{beginsection}
It leaves a space above its argument, prints the text of the heading in
bold type, adds a @samp{\smallskip} after the text of the heading, and
@txindex @code{smallskip}
starts the next paragraph with no indent.

The La@TeX{} chapter and section commands described below add section
numbering, and will print the section names and numbers in the page
headings, and automatically add the sections to the Table of Contents.  
@txindex Table of Contents

In plain @TeX{}, you must write these functions yourself.  The @samp{\def}
@txindex @code{def}
command allows you to define new commands.  Suppose you want to print a
chapter title.  First, you define the font that you want to use.  A
large, sans serif font for chapter titles would be defined like this:

@example
\font\chapterfontsans=cmss12 scaled \magstep 4
@end example
@txindex @code{font}
@txindex @code{magstep}

You can use the @samp{\chapterfontsans} command anywhere you want
to switch to this font, which is approximately 24 points in height.
However, in this example, it will be used primarily in the command
@samp{\chaptertitlesans}.  Here is its definition:

@example
\def\chaptertitlesans#1@{\hbox@{@}\bigskip\bigskip
  \noindent@{\leftline@{\chapterfontsans#1@}@}
  \par\bigskip\bigskip\noindent@}
@end example

The first line, @samp{\hbox@{@}\bigskip}, anchors a 12-pt. space at
@txindex @code{hbox}
@txindex @code{bigskip}
the top of the page by placing an empty @samp{\hbox@{@}} there.  The
line with the chapter title is not indented, nor is the paragraph which
immediately follows it.  If you place a blank line between the
@samp{\sschaptertitle} macro and the next paragraph, the final
@samp{\noindent} applies to the blank line, not the text of the
@txindex @code{noindent}
following paragraph.  To format correctly, use the
@samp{\sschaptertitle} as in the example below.

@txindex macro parameters

The @samp{#1} statement in the definition is replaced by the first
argument to @samp{\chaptertitlesans}; that is, the title of the chapter.
@TeX{} macro parameters are declared with @samp{\#1}, @samp{#2},
@samp{#3}, and so on.  An example usage of @samp{\chaptertitlesans}
would be:

@example
\chaptertitlesans@{Chapter 1@}
This is the starting text of the first paragraph of the chapter.  
The paragraph will not be indented.  The chapter's title is 
``Chapter 1.''
@end example



@node LaTeX, Structure, Titles, Top
@comment  node-name,  next,  previous,  up
@chapter The LaTeX Macro Package

@menu
* Structure::             How to structure a LaTeX document.
* LaTeX commands::        Defining LaTeX commands.
* Document classes::      The major document formats.
* Characters::            Type styles and special characters.
* Margins and spacing::   Changing margins and line spacing.
* Chapters and sections:: Formatting and referencing titles.
* Paragraph dimensions::  How to format paragraphs.
* Boxes::                 LaTeX (and TeX) place text in boxes.
* Quotations::            Formatting displayed text.
* Lists::                 LaTeX has many ways to format lists.
* Headers and footers::   Material at the top and bottom of pages.
* Math::                  Formatting equations.
* Vertical formatting::   Tabs, tables, and columns.
* Footnotes::             Numbered and unnumbered footnotes.
* Multiple input files::  Commands to handle multiple input files.
* Contents and Index::    Tables of Contents, references, and indexing.
* Graphics and floats::   Text elements that can move to optimize formatting.
* Packages::              How to include prewritten LaTeX code.
@end menu

@node Structure, LaTeX commands, LaTeX, LaTeX
@comment  node-name,  next,  previous,  up
@section Structure of LaTeX documents.

La@TeX{} source documents have a few more rules than documents prepared
for @TeX{} , but with complex documents, La@TeX{} can greatly simplify the
formatting process.

La@TeX{} is a @dfn{document markup language}. It tries to separate the
@txindex document markup language
output style from the document's logical content.  For example,
formatting a section heading with @TeX{} would require specifying 36
points of white space above the heading, setting the heading itself in
bold, 24-pt. type, then copying the heading text and page number to
the Table of Contents, then leaving 24 points of white space after the
heading.  One look at the example @TeX{} macro above should give you
some idea of what is involved with creating the @TeX{} code.

On the other hand, La@TeX{} has the @samp{\section@{@}} command, which does
@txindex @code{section}
all of the work for you.  If you need to change the format of the
section headings throughout your document, you can change the definition
of @samp{\section@{@}} instead of the text in the document.

All La@TeX{} documents have three sections: a @dfn{preamble}, the
@txindex preamble
@dfn{body} text, and a @dfn{postamble}.  The preamble, at a minimum,
@txindex body
@txindex postamble
specifies the type of document to be produced---the @dfn{document
class}---and a statement that signals the beginning of the document's
@txindex document class
body text.  For example:

@example
\documentclass@{article@}
\begin@{document@}
@end example

The document's postamble is usually very simple.  Except in
specialized cases, it contains only the statement:

@example
\end@{document@}
@end example

Note the @samp{\begin@{document@}} and @samp{\end@{document@}} pairing.
@txindex @code{document} environment
In La@TeX{}, this is called an @dfn{environment}.  All text must appear
@txindex environment
within an environment, and many commands are effective only in the
environments in which they're called.  The @samp{document} environment
is the only instance where La@TeX{} enforces this convention, however.
That is, it's the only environment that is required in a document.  (An
exception is @samp{letter} class, which also requires you to declare
@txindex @code{letter} document class
@samp{\begin@{letter@}} and @samp{\end@{letter@}}.  See @ref{Letters}.)
However, many formatting features are specified as environments.
They're described in the following sections.

@node LaTeX commands, Document classes, Structure, LaTeX
@comment  node-name,  next,  previous,  up
@section Structure of LaTeX documents.

The statement @samp{\newcommand} defines a LaTeX command.  
@txindex @code{newcommand}
If you wanted to include someone's name in a document, you could
define a command to do it:

@example
\newcommand\john@{John Smith@}
@end example

If you want to change the definition of a command, use
@samp{\renewcommand} with the new definition.
@txindex @code{renewcommand}

@example
\renewcommand\john@{John Smith, Jr.@}
@end example

These two statements, @samp{\newcommand} and @samp{\renewcommand},
@txindex @code{renewcommand}
provide error and argument checking, which @TeX{}'s @samp{\def} command
@txindex @code{def}
doesn't.

You can define a command that accepts arguments, as in this example: 

@example
\newcommand\friend[1]@{My friend is #1.  @}
@end example
@txindex @code{newcommand}

The number of arguments is given in the square brackets immediately
before the definition, which is the text between the braces.

The new command would be used in a document as:

@example
\friend@{Jim@}
\friend@{Joe@}
\friend@{John@}
@end example

The output would appear as:

@example
My friend is Jim.  My friend is Joe.  My friend is John.
@end example

@node Document classes, Articles and reports, La@TeX{} commands, La@TeX{}
@comment  node-name,  next,  previous,  up
@section Document classes.

Each La@TeX{} document class provides environments to format lists,
quotations, footnotes, and other text elements.

Document classes can be called with arguments.  For example,
instead of the default, 10-pt. type used as the base point size,
you could specify:

@example
\documentclass[12pt]@{article@}
@end example
@txindex @code{documentclass}

The option @samp{12pt} tells La@TeX{} to format the document using 12
points as the base font size.  The document class also adjusts the font
size of elements that use larger or smaller fonts, like footnotes and
section headings.

The standard document classes that are described in the following
sections.  The @samp{report} class is similar to @samp{article} class,
@txindex @code{report} document class
but produces a title page and starts each section on a new page.  The
@samp{book} class can format major sections of a books, an Index, Tables
of Contents, and bibliographies.  The @samp{letter} class includes
@txindex @code{letter} document class
special definitions for addresses, salutations, and closings, and can
format address labels.

@menu
* Articles and reports::  Formatting short articles and reports.
* Books::             Format for book-length documents.
* Letters::           Special formats for business letters.
* Slides::            Formats for presentation materials.
@end menu

@node Articles and reports, Standard options, Document classes, Document classes
@comment  node-name,  next,  previous,  up
@subsection Articles and reports.

The @samp{article} and @samp{report} classes are similar.  The main
@txindex @code{article} document class
@txindex @code{report} document class
differences are that @samp{report} creates a title page by default and
begins each section on a new page.  @samp{report} class also has some
extra options to print on both sides of the page.

To create a title page that has a title, abstract, and the author's
name, you could type, for example,

@example
\title@{The Breeding Habits of Cacti@}
\author@{John Q. Public@}
\abstract@{Description of how common desert cacti search
for appropriate watering holes to perform their breeding
rituals.@}
@end example
@txindex @code{title}
@txindex @code{author}
@txindex @code{abstract}

in the document preamble.  The command @samp{\maketitle}, given at the
@txindex @code{maketitle}
start of the document, prints the @samp{\title} in @samp{\LARGE} type
@txindex @code{title}
@txindex @code{LARGE}
centered on a separate page in @samp{report} class, or at the top of the
@txindex @code{report} document class
first page in @samp{article} class.  The argument to the @samp{\author}
@txindex @code{article} document class
@txindex @code{author}
command is printed below the title in @samp{\large} type.  The
@txindex @code{large}
@samp{\abstract} environment is used only in @samp{report} class, and
@txindex @code{abstract}
prints the abstract below the author's name.  

Whether La@TeX{} creates a separate title page is determined by the
@samp{titlepage} and @samp{notitlepage} options.  There are a few other
@txindex @code{titlepage}
@txindex @code{notitlepage}
differences between the two classes.  They are described below.

@menu
* Standard options::  \documentclass Options that Article and Report recognize.
* Page headers::      How to format page headers.
@end menu

@node Standard options, Page headers, Articles and reports, Articles and reports
@comment  node-name,  next,  previous,  up
@subsubsection Options in Article and Report class.
@txindex @code{article} document class
@txindex @code{report} document class

The @samp{article} and @samp{report} classes recognize the following
options:

@table @samp
@item a4paper
@txindex @code{a4paper}
Page size for A4 paper.
@item a5paper
@txindex @code{a5paper}
Page size for A5 paper.
@item b5paper
@txindex @code{b5paper}
Page size for B5 paper.
@item letterpaper
@txindex @code{letterpaper}
Page size for U.S. letter paper.
@item legalpaper
@txindex @code{legalpaper}
Page size for U.S. legal paper.
@item executivepaper
@txindex @code{executivepaper}
Page size for U.S. executive paper (7.25 in. by 10.5 in.)
@item landscape
@txindex @code{landscape}
Format page with landscape orientation.
@item 10pt
@txindex @code{10pt}
Default font size of 10 pt.
@item 11pt
@txindex @code{11pt}
Default font size of 11 pt.
@item 12pt
@txindex @code{12pt}
Default font size of 12 pt.
@item oneside
@txindex @code{oneside}
Format for one-sided printing.
@item twoside
@txindex @code{twoside}
Format pages for two-sided printing.
@item draft
@txindex @code{draft}
Relaxed format for draft copies.
@item final
@txindex @code{final}
Stricter formatting for final copies.
@item titlepage
@txindex @code{titlepage}
Print a separate title page.  
(Default for Report class.)
@item notitlepage
@txindex @code{notitlepage}
Print title at the top of the first page.
(Default for Article class.)
@item onecolumn
@txindex @code{onecolumn}
Format text in one column.
@item twocolumn
@txindex @code{twocolumn}
Format text in two columns.
@item leqno
@txindex @code{leqno}
Print equation numbers to the left.
@item fleqn
@txindex @code{fleqn}
Print equations at the left margin.
@item openbib
@txindex @code{openbib}
Set margins for bibliography.
@end table

In addition, @samp{report} class recognizes these options:

@table @samp
@item openright
@txindex @code{openright}
Start chapters and parts on right-hand pages.
@item openany
@txindex @code{openany}
Start chapters and parts on either page.
(Default for article class.)
@end table

The @samp{report} class defines the @samp{\chapter} command, which
@txindex @code{chapter}
@samp{article} class does not.  Also, in @samp{report} class, the
@samp{\part} command starts a new page.  In @samp{article} class
@txindex @code{part}
@samp{\part} starts the new document part on the same page. Chapter,
part, and section commands are described in @ref{Chapters and
sections}.

If you want to format a report for both sides of the pages, and
have chapters and parts start on the right-hand pages, you would
declare the options in the @samp{\documentclass} statement as:

@example
\documentclass[twoside,openright]@{report@}
@end example

Other commands, like @samp{\appendix} and @samp{\tableofcontents} are
similar.  They vary mainly in how they format pages for two-sided
printing.

@node Page headers, Books, Standard options, Articles and reports
@comment  node-name,  next,  previous,  up
@subsubsection Page headers.
@txindex headers

Documents formatted with the @samp{twoside} option have the left (even)
@txindex @code{twoside}
pages formatted with the page number at the top left of the page and the
name of the chapter at the top right of the page.  Right-hand page
headings are formatted with the section title at the top left of the
page and the page number at the top right.  Documents formatted with the
@samp{oneside} option have the name of the chapter at the top left of
the page, and the page number at the top right.

Page headers and footers are described in greater detail in @ref{Headers
and footers}.

@node Books, Letters, Page headers, Document classes
@comment  node-name,  next,  previous,  up
@subsection Books.
@txindex @code{book} document class

The @samp{book} class defines extra commands for handling prefaces,
Tables of Contents, indices, and other standard sections of books.

The @samp{book} class also formats chapter and section numbering
commands differently than in the other classes, as described in
@ref{Chapters and sections}.

The @samp{\maketitle} command generates a title page by default, using
@txindex @code{maketitle}
the text defined by the @samp{\title}, @samp{\author}, and @samp{\date}
@txindex @code{title} 
@txindex @code{author}
@txindex @code{date}
commands.  The text in the argument of the @samp{\thanks} command is
formatted at the bottom of the page, in @samp{\footnotesize}
text.  It contains any miscellaneous information the author wishes to
include.

The statements @samp{\frontmatter}, @samp{\mainmatter}, and
@txindex @code{frontmatter}
@txindex @code{mainmatter}
@txindex mainmatter
@samp{\backmatter} define the major sections of the book.  The
@txindex @code{backmatter}
@dfn{front matter} of a book, the Copyright, Preface, Table of Contents,
@txindex front matter
and so on, is paginated separately from the main text.  The 
@dfn{back matter}
contains the Index, and any appendices, bibliographies, and end
@txindex back matter
notes.

If the @samp{\openright} and @samp{twoside} options are given in the
@txindex @code{openright}
@txindex @code{twoside}
preamble, as in:

@example
\documentclass[twoside,openright]@{book@}
@end example


Each of these sections start on right-hand pages, as do chapters and
parts.  The text between the @samp{\frontmatter} and @samp{\mainmatter}
@txindex @code{frontmatter}
@txindex @code{mainmatter}
commands is formatted with separate page numbers, which are printed
using roman numerals.  The text after the @samp{\mainmatter}
command is formatted with the pages numbered starting with 1 by default
and printed with arabic numerals.

The @samp{\tableofcontents} command specifies where the Table of
@txindex @code{tableofcontents}
Contents should be located.  It is generally part of the front matter,
so the command should be placed between the @samp{\frontmatter} and
@txindex @code{frontmatter}
@samp{\mainmatter} commands.  When formatting a document that has a
@txindex @code{mainmatter}
Table of Contents, you must run La@TeX{} at least twice on the input
@txindex Table of Contents
file or files, so that the starting page numbers of the chapters and
sections are correct in the @code{.toc} file, which contains the page
numbering information.

La@TeX{} generates the Table of Contents file with the base name of the
input file and the extension @code{.toc}.  If the input file's name is
@file{book.tex}, La@TeX{} generates the Table of Contents information in
the file @file{book.toc}.  Similarly, La@TeX{} generates an index file
with the extension @code{.idx}, if the document has the
@samp{\makeindex} command in the preamble.

In addition, the @samp{book} class can format lists of figures,
lists of tables, appendices, and bibliographies.  The @samp{theindex}
environment formats the Index in two columns, and provides formatting
for Index entries and sub-entries.

Information on how to format and generate an Index and Table of
Contents is given in @ref{Contents and Index}. 

Because most book-length documents are too large to be handled
conveniently as a single input file, it is often better to divide the
input into a main document and use the @samp{\input} statment to include
each of the book's sections as a separate file.  Multiple input files
are described in @ref{Multiple input files}.

The main input file for a book manuscript might look something like
this:

@example
\documentclass@{book@}
\title@{My Book@}
\author@{John Q. Author@}
\makeindex
\begin@{document@}
\frontmatter
\maketitle
\include@{preface@}
\tableofcontents
\mainmatter
\include@{chapter1@}
\include@{chapter2@}
\include@{chapter3@}
\backmatter
\begin@{theindex@}
\include@{bookindex@}
\end@{theindex@}
@end example

@txindex Index
La@TeX{} assumes that all of the input files named in the @samp{\include}
statements have the extension @code{.tex}.  If the file is named
@file{book.tex}, the output for the Table of Contents is in
@file{book.toc} and the Index information is in @file{book.idx}.  To
generate a formatted La@TeX{} index, you must use the file @file{book.idx}
as input to the @samp{makeindex} program to generate the file
@txindex @code{makeindex}
@file{bookindex.tex}.

The first time you run La@TeX{} on the input file, you will likely get an
error message telling you that @file{bookindex.tex} does not exist.
Of course, that's because the index entries haven't yet been
generated.  A way around this is to use the shell command:

@example
touch bookindex.tex
@end example

This creates the empty file, @file{bookindex.tex}, and La@TeX{} will not
complain about the as yet nonexistent index input, which still needs to
be generated from the auxiliary file, @file{book.idx}.

Another method is to use the @samp{\includeonly} command,
@txindex @code{includeonly}
described in @ref{Multiple input files}.

As with any document that contains a Table of Contents, you should run
the file at least twice through La@TeX{} to make sure that page numbers,
as well as other cross references, are correct.  La@TeX{} provides the
following messages if there are undefined cross references, or if the
page numbers have changed:

@example
LaTeX Warning: There were undefined references.

LaTeX Warning: Label(s) may have changed. Rerun to get 
cross-references right.
@end example

Indexes and Tables of Contents are described in @ref{Contents
and Index}.

@node Letters, Slides, Books, Document classes
@comment  node-name,  next,  previous,  up
@subsection Letters.

The @samp{letter} class uses special commands to format business
@txindex @code{letter} document class
letters.

The @samp{letter} environment takes one argument, the address of the
letter's addressee.  The @samp{\address} command, which must appear in
@txindex @code{address}
the document preamble, defines the return address.  The
@samp{\signature} command defines the sender's name as it appears after
@txindex @code{signature}
the closing.

The La@TeX{} source of a simple business letter might look like this.

@example
\documentclass[12pt]@{letter@}
\signature@{John Q. Public@}
\address@{123 Main St.\\Los Angeles, CA.  96005\\Tel: 123/456-7890@}
\begin@{document@}
\begin@{letter@}@{ACME Brick Co.\\100 Ash St.\\San Diego, CA 96403@}
\opening@{Dear Sir/Madam:@}

With regard to one of your bricks that I found on my living room
carpet surrounded by shards of my broken front window...

(Remainder of the body of the letter.)

\closing@{Sincerely,@}

\end@{letter@}
\end@{document@}
@end example

The addresses include double backslashes, which specify
where the line breaks should occur.

These are the  commands that @samp{letter} class recognizes:

@table @samp
@item \name
@txindex @code{name}
Name of the letter's sender.
@item \signature
@txindex @code{signature}
Sender's name in the signature.
@item \address
@txindex @code{address}
Sender's address.
@item \location
@txindex @code{location}
Sender's location.
@item \telephone
@txindex @code{telephone}
Sender's telephone number.
@item \makelabels
@txindex @code{makelabels}
Write address to mailing label list.
@item \stopbreaks
@txindex @code{stopbreaks}
Don't use paragraph breaks.
@item \startbreaks
@txindex @code{startbreaks}
Restore normal paragraph breaks.
@item \opening
@txindex @code{opening}
Print the sender's address and the date
on the first page of the letter.
@item \closing
@txindex @code{closing}
Print closing text, then @samp{\signature} if it 
is defined; if not print sender's name.
@item \cc
@txindex @code{cc}
Print Cc: and name of addressee in the 
argument.
@item \encl
@txindex @code{encl}
Print Enclosure: and name of the enclosure
in the argument.
@item \ps
@txindex @code{ps}
Skip line and print next paragraph.
@item \startlabels
@txindex @code{startlabels}
Print an address label from the address given
in the argument.
@end table

The @samp{\location} and @samp{\telephone} commands are
@txindex @code{location}
@txindex @code{telephone}
used to format elements in the headers of multi-page letters, 

The @samp{\makelabels} command generates a mailing label for every
@txindex @code{makelabels}
@txindex mailing labels
@samp{letter} environment declaration.  It is placed in the document
@txindex @code{letter} environment
preamble, before the @samp{\begin@{document@}} statement.  The address
that is given as the argument to each @samp{\begin@{letter@}}
command is printed on a separate page after the final page of the last
letter of the input file.  If you want to print a label but no letter,
declare an empty @samp{letter} environment---one with no text between
the @samp{\begin@{letter@}} and @samp{\end@{letter@}}
declarations.

@node Slides, Characters, Letters, Document classes
@comment  node-name,  next,  previous,  up
@subsection Slides.
@txindex slides

This class formats transparencies and other presentation materials.  The
document class @samp{slides} omits sections and multiple-column
formatting completely.  It adds several page styles, and commands to set
and print the date and time.  The @samp{\normalsize} font is 20 pt.  The
default font shape is sans serif, although it can be reconfigured.

Although @samp{slides} recognizes the standard paper-size options in the
@samp{\documentclass} declaration, it provides a way to use non-standard
page sizes by setting the @samp{\papersize} measurement directly.  The
@txindex @code{papersize}
default page margins are proportional to this measurement, and
@samp{\evensidemargin} and @samp{\oddsidemargin} are narrower than in
@txindex @code{evensidemargin}
@txindex @code{oddsidemargin}
other document classes.

Unlike other document classes, @samp{slides} uses absolute type
sizes:

@table @samp
@item \tiny
@txindex @code{tiny}
14 pt.
@item \small
@txindex @code{small}
17 pt.
@item \footnotesize
@txindex @code{footnotesize}
\small
@item \scriptsize
@txindex @code{scriptsize}
\small
@item \normalsize
@txindex @code{normalsize}
20 pt.
@item \large
@txindex @code{large}
24 pt.
@item \Large
@txindex @code{Large}
29 pt.
@item \LARGE
@txindex @code{LARGE}
34 pt.
@item \huge
@txindex @code{huge}
41 pt.
@item \Huge
@txindex @code{Huge}
\huge
@end table

These font sizes are not set by a @samp{\documentclass} option, but the
default font can be redefined in a file @file{./sfonts.cfg}.  
@txindex @code{sfonts.cfg}

Here are the options that @samp{slides} class recognizes:

@table @samp
@item a4paper
@txindex @code{a4paper}
297 mm. (height) x 210 mm. (width)
@item a5paper
@txindex @code{a5paper}
210 mm. x 148 mm.
@item b5paper
@txindex @code{b5paper}
250 mm. x 176 mm.
@item letterpaper
@txindex @code{letterpaper}
11 in. x 8.5 in.
@item legalpaper
@txindex @code{legalpaper}
14 in. x 8.5 in.
@item executivepaper
@txindex @code{executivepaper}
10.5 in. x 7.25 in.
@item landscape
@txindex @code{landscape}
Reverses height and width of the paper.
@item clock
@txindex @code{clock}
Provide time document was formatted.
@item draft
@txindex @code{draft}
Relaxed formatting.
@item final
@txindex @code{final}
Stricter formatting.
@item titlepage
@txindex @code{titlepage}
Print a separate title page.
@item notitlepage
@txindex @code{notitlepage}
Don't print a separate title page.  (The default.)
@item onecolumn
@txindex @code{onecolumn}
One-column formatting.  
@item twocolumn
@txindex @code{twocolumn}
Prints an error message.
@item leqno
@txindex @code{leqno}
Print equation numbers flush left.
@item fleqn
@txindex @code{fleqn}
Print equations flush left.
@end table

The default options are @samp{letterpaper, final}.  The
@samp{\maketitle} command prints the title and author at the top of the
@txindex @code{maketitle}
first slide.

There are different page styles in @samp{slides} class.  They are:
@txindex page style

@table @samp
@item plain
@txindex @code{plain} page style
Print slide number at the bottom of the slide.
@item headings
@txindex @code{headings}
Same as plain.
@item overlay
@txindex @code{overlay}
Print the overlay number. at the bottom of the slide.
@item note
@txindex @code{note}
Print the note number. at the bottom of the slide.
Also print time in mm:ss if clock option is
specified.
@item empty
@txindex @code{empty}
No headers or footers.
@end table

The default page style is @samp{headings}.

The @samp{note} page style places the clock time in a @samp{\fbox} at
@txindex @code{fbox}
the lower right corner of the page.  The commands @samp{\settime} and
@txindex @code{settime}
@samp{\addtime} set and increment the time by the number of seconds
@txindex @code{addtime}
given in their arguments.

@node Characters, Emphasizing, Slides, LaTeX
@comment  node-name,  next,  previous,  up
@section Accented and non-alphabetic characters.

Character styles are partially a function of the fonts specified in
the document.  However, bold and italic character emphasis should be
available for every font present on the system.  Underlining, too, can
be used, though its formatting presents special problems.  Refer to 
@ref{Packages}.

@menu
* Emphasizing::       How to emphasize text.
* NFSS fonts::        LaTeX's New Font Selection Scheme.
* Type size::         Changing the type size.
* Special characters::  Accented and non-alphabetic characters.
@end menu

@node Emphasizing, NFSS fonts, Characters, Characters
@comment  node-name,  next,  previous,  up
@subsection Emphasizing text.

You can specify text to be emphasized in several ways.  The most
portable is the @samp{\em} command.  All text within its scope
@txindex @code{em}
is italicized by default.  For example:

@example
This word will be @{\em emphasized.@}
@end example

If you have italicized text that runs into text which is not
italicized, you can specify an italic correction factor to be used.
The command for this is @samp{\/}; that is, a backslash and a
@txindex @code{\/}
forward slash.

@example
This example @{\em formats\/@} correctly.

This example does @{\em not@} format correctly.
@end example

Slightly less portable, but still acceptable in situations where they're
used singly, are the commands @samp{\it}, @samp{\bf}, and @samp{\tt},
@txindex @code{it}
@txindex @code{bf}
@txindex @code{tt}
which specify that the characters within their scope be printed using
italic, bold, and monospaced (teletype) typefaces, respectively.

@example
@{\tt This text will be printed monospaced,@}
@{\it this text will be italic,@} and
@{\bf this text will be bold\dots@} all in one paragraph.
@end example

The command @samp{\dots} prints a series of three periods for ellipses,
@txindex @code{dots}
which will not break across a line.

@node NFSS fonts, Type size, Emphasizing, Characters
@comment  node-name,  next,  previous,  up
@subsection The New Font Selection Scheme.

Most recent versions of La@TeX{} include commands that account for
instances where one emphasis command would supersede another.

@example
This is @{\it not @{\bf bold italic!@}@}
@end example

What happens is that te@TeX{} formats the text with the italic typeface
until it encounters the @samp{\bf} command, at which point it switches
to boldface type.

To get around this, the PSNFSS scheme of selecting font shapes requires
@txindex Postscript New Font Selection Scheme (PSNFSS)
three parameters for each typeface: shape, series, and family.  Not all
font sets will include all of these styles.  La@TeX{} will print a
warning, however, if it needs to substitute another font.

You can specify the following font shapes:

@table @samp
@item \textup@{text@}
@txindex @code{textup}
Upright shape (the default).
@item \textit@{text@}
@txindex @code{textit}
Italic.
@item \textsl@{text@}
@txindex @code{textsl}
Slanted.
@item \textsc@{text@}
@txindex @code{textsc}
Small caps.
@end table

These are the two series that most fonts have:

@table @samp
@item \textmd@{text@}
@txindex @code{textmd}
Medium series (the default).
@item \textbf@{text@}
@txindex @code{textbf}
Boldface series.
@end table

There are generally three families of type available.

@table @samp
@item \textrm@{text@}
@txindex @code{textrm}
Roman (the default).
@item \textsf@{text@}
@txindex @code{textsf}
Sans serif.
@item \texttt@{text@}
@txindex @code{texttt}
Ttypewriter (monospaced, Courier-like).
@end table

Setting font styles using these parameters, you can combine effects.

@example
\texttt@{\textit@{This example could result in a font
substitution, because many fonts don't include a typewriter 
italic typeface.@}@}
@end example

The font family defaults to Computer Modern, which is a bit-mapped font.
Other font families are usually Postscript-format Type 1 fonts.  See
@ref{Postscript fonts} for details of how to specify them.

@node Type size, Special characters, NFSS fonts, Characters
@comment  node-name,  next,  previous,  up
@subsection Type size.
@txindex type size

In La@TeX{}, type sizes are proportional to help the document maintain a
balanced appearance.  The default is 10 pt.  If you specify the option
@samp{12pt} in the @samp{\documentclass} statement, all of the type
sizes are scaled relative to the 12-pt. type size.

These are the La@TeX{} type size commands:

@example
\tiny
\scriptsize
\footnotesize
\small
\normalsize
\large
\Large
\LARGE
\huge
\Huge
@end example
@txindex @code{tiny}
@txindex @code{scriptsize}
@txindex @code{footnotesize}
@txindex @code{small}
@txindex @code{normalsize}
@txindex @code{large}
@txindex @code{Large}
@txindex @code{LARGE}
@txindex @code{huge}
@txindex @code{Huge}

The exception is the @samp{slides} class, which uses absolute type
@txindex @code{slides} document class
sizes and font declarations from a configuration file.  See
@ref{Slides}.

@node Special characters, Margins and spacing, Type size, Characters
@comment  node-name,  next,  previous,  up
@subsection Accented and non-alphabetic characters.
@txindex accented characters

There are also many forms of accents and special characters, which are
available for typesetting.  This is only a few of them.  (Try
printing these on your own printer.)

@example
\'@{o@}	\`@{e@}	\^@{o@}	\"@{u@}	\=@{o@} \c@{c@} `? `!
\copyright	\pounds		\dag
@end example

Finally, there are characters that are used as meta or escape
characters in @TeX{} and La@TeX{}.  One of them, the dollar sign, is
mentioned above.  The complete set of meta characters, which need to be
escaped with a backslash to be used literally, is:

@example
# $ % & _ @{ @} 
@end example
@txindex escape characters

In addition to the La@TeX{} symbols mentioned above, here are some of the
special symbols that @TeX{} recognizes:

@example
\aleph      \Re        \nabla       \triangle  \shart
\hbar       \Im        \surd        \backslash \clubsuit
\imath      \partial   \top         \forall    \diamondsuit
\jmath      \infty     \bot         \exists    \heartsuit
\ell        \prime     \|           \neg       \spadesuit
\wp         \emptyset  \angle       \flat 
@end example      

These symbols must be formatted in @TeX{}'s @dfn{math mode}.  The simplest
@txindex math mode
way to do this is to enclose the symbol with dollar signs:

@example
C:$\backslash$DOS$\backslash$
@end example

More information on formulas and mathematical symbols is given in 
@ref{Math}.

There are also different alphabets available, like Greek and Cyrillic.
La@TeX{} provides many facilities for setting non-English text, which are
covered by some of the other references mentioned here.  The Greek
alphabet and mathematical symbols are also described in @ref{Math}.

@node Margins and spacing, Chapters and sections, Special characters, La@TeX{}
@comment  node-name,  next,  previous,  up
@section Margins and line spacing.
@txindex margins
@txindex line spacing

Changing margins in a @TeX{} or La@TeX{} document is not a
straightforward task.  Much depends on the relative indent of the text
you're trying to adjust the margin for.  The placement of the
margin-changing command is also significant.

For document-wide changes to La@TeX{} documents, the @samp{\evensidemargin}
@txindex @code{evensidemargin}
and @samp{\oddsidemargin} commands are available.  They affect the
@txindex @code{oddsidemargin}
left-hand margins of the even-numbered and odd-numbered pages,
respectively.  For example:

@example
\evensidemargin=1in
\oddsidemargin=1in
@end example

adds on inch to the left-hand margin of the even and odd pages @emph{in
addition} to the standard one-inch, left-hand margin.  These commands
affect the entire document and will shift the entire body of the text
right and left across a page, regardless of any local indent, so they're
safe to use with La@TeX{} environments like @samp{verse} and
@samp{list}.

Below is a set of margin-changing macros I wrote.  They have a different
effect from the commands mentioned above.  Because they use plain @TeX{}
commands, they're not guaranteed to honor the margins of any La@TeX{}
environments that may be in effect, but you can place them anywhere in a
document and change the margins from that point on.

@example
%%  margins.sty -- v. 0.1   by Robert Kiesling
%%  Copies of this code may be freely distributed in verbatim form.
%%
%%  Some elementary plain TeX margin-changing commands. Lengths are
%%  in inches:
%%  \lmargin@{1@}      %% sets the document's left margin in 1 inch.
%%  \lindent@{1@}      %% sets the following paragraphs' indent in 
%%                     1 inch.
%%  \rindent@{1@}      %% sets the following paragraphs' right margins
%%                   %% in 1 inch.
%%  \llength@{3@}      %% sets the following lines' lengths to 3 inches.
%%
\ProvidesPackage@{margins@}[2/10/99]
\message@{Margins macros...@}
\def\lmargin#1@{\hoffset = #1 in@}
\def\lindent#1@{\leftskip = #1 in@}
\def\rindent#1@{\rightskip = #1 in@}
\def\llength#1@{\hsize = #1 in@}
%%
%% (End of margins macros.)
@end example
@txindex @code{margins.sty}

Place this code in a file called @file{margins.sty} in your local
@samp{$TEXINPUTS} directory.  The commands are explained in the
@txindex @code{$TEXINPUTS}
commented section of the file.  To include them in a document, use the
command:

@example
\usepackage@{margins@}
@end example

in the document preamble.

Setting line spacing also has its complexities.  The @samp{\baselineskip}
@txindex @code{baselineskip}
measurement is the distance between lines of text.  It is given as an
absolute measurement.  For example:

@example
\baselineskip=24pt
@end example

or even better:

@example
\setlength@{\baselineskip@}@{24pt@}
@end example
@txindex @code{setlength}

The difference between the two forms is that @samp{\setlength} will
respect any scoping rules that may be in effect when you use the
command.

The problem with using baselineskip is that it also affects the
distance between section headings, footnotes, and the like.  You need
to take care that baselineskip is correct for whatever text elements
you're formatting.  There are, however, La@TeX{} macro packages, like
@file{setspace.sty}, which will help you in these circumstances.
@txindex @code{setspace.sty}
See @ref{Packages}.

Other ways to format paragraphs are also described in @ref{Packages}.

@node Chapters and sections, Article titles, Margins and spacing, La@TeX{}
@comment  node-name,  next,  previous,  up
@section Chapters and sections.

Sectioning commands define sections, parts, chapters, and
paragraphs. The commands format the title, start new pages or
paragraphs as necessary, add the correct part, chapter, or section
numbers, and generate corresponding entries in the Table of Contents
and page headings.

@menu
* Article titles::      Titles in Article class.
* Report titles::       Titles in Report class.
* Book titles::         Titles in Book class.
@end menu

@node Article titles, Report titles, Chapters and sections, Chapters and sections
@comment  node-name,  next,  previous,  up
@subsection Titles in Article class.

Each document class defines sections and other organizational parts
differently.  In @samp{article} class, parts are the largest
organizational unit.

@example
\part@{The first dissertation.@}
@end example
@txindex @code{part}

LaTeX formats the title as ``Part 1: The first dissertation.'' in
the @samp{\huge} type size.  The paragraph immediately
@txindex @code{huge}
following the title is not indented.

Sections also break the text where they occur.  LaTeX prints the
section number and heading in @samp{\Large} type on a line by
@txindex @code{Large}
itself.  

@example
\section@{Review of the literature.@}
@end example
@txindex @code{section}

Subsections and subsubsections are defined similarly to sections:

@example
\subsection@{Periodicals.@}
\subsubsection@{Smith's works.@}
@end example
@txindex @code{subsection}
@txindex @code{subsubsection}

Paragraphs after sections are normally indented.  

Section numbers are updated starting with 1 for the first
@samp{\section} command, 1.1 for the next
@samp{\subsection}, 1.1.1 for the next
@samp{\subsubsection}, and so on.

If you want unnumbered sections, use the format:

@example
\section*@{Review of the literature.@}
\subsection*@{Periodicals.@}
\subsubsection*@{Smith's works.@}
@end example
@txindex @code{section*}
@txindex @code{subsection*}
@txindex @code{subsubsection*}

The starred form of the commands do not add the section to the table of
contents, however.  You must do this explicitly, with the
@samp{\makecontentsline} command, described in @ref{Contents and Index}.
@txindex @code{makecontentsline}

Paragraph commands are similar to section commands, but they place a
title in bold type at the start of a paragraph, and do not cause a
break in the text.  

@example
\paragraph@{The ls command.@}
\subparagraph@{Command line options.@}
@end example
@txindex @code{paragraph}
@txindex @code{subparagraph}

The @samp{\paragraph} command provides a numbered heading and
does not indent the paragraph.  Paragraphs that begin with
@samp{\subparagraph} are indented and do not have section
numbers.

@node Report titles, Book titles, Article titles, Chapters and sections
@comment  node-name,  next,  previous,  up
@subsection Titles in Report class.

The @samp{report} class contains the same sectioning commands used by
@txindex @code{report} document class
the @samp{article} class, but it adds a few more commands.
@txindex @code{article} document class

The @samp{\chapter} command starts a new page, prints the
@txindex @code{chapter}
numbered chapter title at the top of the page, and adds the chapter
entry to the Table of Contents.

@example
\chapter@{From the Beginning@}
@end example

The starred version of the @samp{\chapter} command does not
produce a table of contents entry.  You must add one using the
@samp{\addcontentsline} command, described in @ref{Contents and Index}.
@txindex @code{addcontentsline}

@example
\chapter*@{Introduction@}
\addcontentsline@{toc@}@{chapter@}@{Introduction@}
@end example

The @samp{\chapter} and @samp{\part} commands start the new chapter or
@txindex @code{chapter}
@txindex @code{part}
part on a right-hand page if the @samp{openright} option is in effect.
@txindex @code{openright}

@node Book titles, Paragraph dimensions, Report titles, Chapters and sections
@comment  node-name,  next,  previous,  up
@subsection Titles in Book class.

Sectioning commands in the @samp{book} class are similar to
@txindex @code{book} document class
@samp{article} class, but the @samp{openright} option is in effect by
@txindex @code{article} document class
default.

These commands are special cases of the @samp{\chapter*} command.  They
@txindex @code{chapter*}
reset the chapter and section number to 0, and have predefined titles.
For example, the @samp{\tableofcontents} command produces the title
@txindex @code{tableofcontents}
``Table of Contents.''

@example
\tableofcontents
\listoffigures
\listoftables
\appendix
@end example
@txindex @code{listoffigures}
@txindex @code{listoftables}
@txindex @code{appendix}

@node Paragraph dimensions, Boxes, Book titles, LaTeX
@comment  node-name,  next,  previous,  up
@section Paragraph dimensions.
@txindex paragraphs

As mentioned in @ref{Input files}, In @TeX{} and La@TeX{} input files,
paragraphs are separated by blank lines.

Internally, a paragraph is represented as a rectangular region bounded
by a @samp{\parbox}, which is composed of a stack of @TeX{}
@txindex @code{parbox}
@samp{\hbox}es.  A @samp{\parbox} can be placed anywhere on a page, and
@txindex @code{hbox}
may have specific dimensions, or its width and height may be adjustable.

Like @TeX{}, La@TeX{} uses the dimension @samp{\hsize} to set the width
@txindex @code{hsize}
of text on a page.  The default is 6.5 in.  Paragraphs, unless they
begin a chapter, part, or start with the @samp{\paragraph} command, are
@txindex @code{paragraph}
indented 20 pt., the default value of @samp{\parindent}.  Paragraphs
@txindex @code{parindent}
normally have @samp{\baselineskip} space between them; that is, they are
@txindex @code{baselineskip}
spaced the same as the lines within paragraphs.  The space between
paragraphs is set by the @samp{\parskip} dimension, which defaults to 0,
@txindex @code{parskip}
but can stretch as much as 1 pt.

Paragraphs are normally justified on the right and left margins.  If you
want paragraphs to be justified to the left margin only, use the command
@samp{\raggedleft}.  The command @samp{\raggedright} right-justifies the
@txindex @code{raggedleft}
paragraphs.  The command @samp{\centering} centers the lines.
@txindex @code{centering}

These commands also have corresponding environments:

@table @samp
@item \raggedright
Flush left.
@item \raggedleft
Flush right.
@item \centering
Center.
@end table
@txindex @code{raggedleft}
@txindex @code{raggedright}
@txindex @code{centering}

@node Boxes, Uses of boxes, Paragraph dimensions, LaTeX
@comment  node-name,  next,  previous,  up
@section Boxes.

La@TeX{} generates a one-line paragragraph box with the @samp{\makebox}
command.  The first argument specifies how wide to make the box.  LaTeX
formats the text so it fills the box evenly.  An optional second
argument specifies whether to format the text to the left side of the
box (@samp{l}) or to the right (@samp{r}).

@example
\makebox@{2in@}@{Text in a box.@}
\makebox@{2in@}[l]@{Text on the left.@}
\makebox@{2in@}[r]@{Text on the right.@}
@end example
@txindex @code{makebox}

If you need a box that is only as wide as the text it contains, use
the @samp{\mbox} command.
@txindex @code{mbox}

@example
\mbox@{The box is only this wide.@}
@end example

The @samp{\framebox} and @samp{\fbox} statements are like
@txindex @code{framebox}
@txindex @code{fbox}
@samp{\makebox} and @samp{\mbox}, but they draw a visible border around
@txindex @code{makebox}
@txindex @code{mbox}
the box.

As I said above, the statement @samp{\parbox} creates a stack of
@samp{\hbox}es.  The statement also creates a rectangular region for the
@txindex @code{hbox}
paragraph.  The first argument to @samp{\parbox} is the width of the
@txindex @code{parbox}
box, and therefore the paragraph.  The second argument is the text.  The
box's vertical dimension adjusts to the height of the paragraph.

@example
\parbox@{3in@}@{The text of a paragraph....@}
@end example

The paragraph's center normally is aligned with the line where the
command appears.  An optional argument aligns the top (@samp{t}) or
bottom (@samp{b}) of the box with the line.

@example
\parbox[t]@{3in@}@{The text of the paragraph, aligned at the top....@}
\parbox[b]@{3in@}@{The text of the paragraph, aligned at the bottom....@}
@end example
@txindex @code{parbox}

@menu
* Uses of boxes::        Commands and environments that use boxes.
@end menu

@node Uses of boxes, Quotations, Boxes, Boxes
@comment  node-name,  next,  previous,  up
@section Commands and environments that use boxes.

The @samp{minipage} environment uses a box to format a small page
@txindex @code{minipage}
on the actual page.  It takes the same arguments as the
@samp{\parbox} command, but instead of defining the boundary of
paragraph text only, @samp{minipage} allows most of the formatting
features of a standard page.

@example
\begin@{minipage@}[t]@{3in@}
\begin@{tabbing@}
@{\tt tabbing@}    \= environment    \= within \\
a \> @{\tt minipage@} \>environment 
\end@{tabbing@}
\end@{minipage@}
@end example
@txindex @code{tabbing}

The @samp{tabbing} environment is described in @ref{Vertical formatting}.

The @samp{\marginpar} command places the text of the paragraph in the
@txindex @code{marginpar}
@txindex margin notes
right margin.  The parameter @samp{\marginparwidth} specifies the
@txindex @code{marginparwidth}
width of the margin note, and @samp{\marginparsep} specifies the
@txindex @code{marginparsep}
distance between the text in the margin and the main text on the page.
To place the text in the left margin, use @samp{\revmarginpar}.
@txindex @code{revmarginpar}

@node Quotations, Lists, Uses of boxes, LaTeX
@comment  node-name,  next,  previous,  up
@section Quotations and other displayed text.


La@TeX{} provides many environments for formatting displayed material.
You can include quoted text with the @samp{quotation} environment.

@example
\begin@{quotation@}
Start of paragraph to be quoted...

... end of paragraph.
\end@{quotation@}
@end example
@txindex @code{quotation}

For shorter quotes, use the @samp{quote} environment.
@txindex @code{quote}

To format verse, use the @samp{verse} environment.

@example
\begin@{verse@}
Because I could not stop for death\\
He kindly stopped for me
\end@{verse@}
@end example
@txindex @code{verse}

The double backslashes show where to start new lines.  Otherwise,
La@TeX{} fills the lines in a @samp{verse} environment, as in any other
environment.

If you would like to include quoted text exactly as it appears in the
input file, for example, program listings, use the @samp{verbatim}
environment.  The type is monospaced in the @samp{\normalsize}
font.  La@TeX{} does not fill lines or interpret commands in the
@samp{verbatim} environment.

In @samp{verse} and @samp{quotation}, the text is indented by the value
@txindex @code{verse}
@txindex @code{quotation}
of @samp{\itemindent}.  The space between the quotation or verse and the
@txindex @code{itemindent}
main text is the value of @samp{\itemsep}.
@txindex @code{itemsep}

In @samp{quote} and @samp{verbatim} environments, the text is not
@txindex @code{quote}
@txindex @code{verbatim}
indented, but there is still a gap between the main text and the
displayed material.

The @samp{abstract} environment is used for the title pages in
@txindex @code{abstract}
@samp{report} and @samp{article} classes.  It formats a centered
@txindex @code{article} document class
paragraph with the title ``Abstract,'' and prints the abstract in
@samp{\normalsize} type if there is a separate title page, and in
@txindex @code{normalsize}
@samp{\small} type if not.
@txindex @code{small}

These environments use the internal La@TeX{} command @samp{\list@{@}}
@txindex @code{list}
and therefore its formatting parameters.  For further details, refer to
@ref{Lists}.

@node Lists, Headers and footers, Quotations, LaTeX
@comment  node-name,  next,  previous,  up
@section Lists.

Lists come in several flavors.  To format a bulleted list, use the
@samp{list} environment:

@example
\begin@{list@}
\item
This is the first item of the list.
\item 
This is the second item of the list...
\item
... and so on.
\end@{list@}
@end example

A numbered list uses the @samp{enumerate} environment:

@example
\begin@{enumerate@}
\item 
Item No. 1.
\item
Item No. 2.
\item
\dots
\end@{enumerate@}
@end example
@txindex @code{enumerate}

A descriptive list uses the @samp{description} environment.

@example
\begin@{description@}
\item@{Oven@} Dirty, needs new burner.
\item@{Refrigerator@}  Dirty.  Sorry.
\item@{Sink and drainboard@}  Stained, drippy, cold water faucet.
\end@{description@}
@end example
@txindex @code{description}

A @samp{trivlist} is like a normal list, but sets the list margins to
@txindex @code{trivlist}
the right and left margins, and uses the default @samp{\parskip}.  Other
@txindex @code{parskip}
list environments, as well as display environments like @samp{verbatim}
@txindex @code{verbatim}
and @samp{center}, use @samp{trivlist} to do the work of formatting the
@txindex @code{center}
@txindex @code{trivlist}
list items, An empty @samp{\item} in a @samp{trivlist} makes a new item
@txindex @code{item}
with no label.

Each of these environments uses the internal command
@samp{\list@{@}}.  The format of the list---indentation, spacing
@txindex @code{list}
between items, and so on, is determined by the following parameters:

@table @samp
@item \topsep
@txindex @code{topsep}
Height between preceding paragraph of text and start 
of the list.  The measurement is in addition to 
@samp{\partopsep} for the first item.
@item \parsep
@txindex @code{parsep}
The distance between paragraphs in the list.
Defaults to @samp{\parskip}.
@item \partopsep
@txindex @code{partopsep}
The height above the first item in the list.
@item \labelwidth
@txindex @code{labelwidth}
The width of the label of the current item.
@item \labelsep
@txindex @code{labelsep}
Distance between the label and the text of the item.
@item \itemindent
@txindex @code{itemindent}
Indent from the left margin of the item text.
@item \listparindent
@txindex @code{listparindent}
Indent of the first line of the item text.
Defaults to @samp{\parindent}.
@item \lastskip
@txindex @code{lastskip}
Height after the last paragraph of the list in
addition to @samp{\parindent}.
@end table

@node Headers and footers, Math, Lists, LaTeX
@comment  node-name,  next,  previous,  up
@section Headers and footers.
@txindex headers
@txindex footers

La@TeX{} defines four standard formats for headers and footers: empty,
plain, headings, and myheadings.

The @samp{\pagestyle} command sets the page style to one of
@txindex @code{pagestyle}
these four, starting with the next page:

@table @samp
@item \pagestyle@{plain@}
@txindex @code{plain}
The default pages style: the page number is centered at 
the bottom of the page.
@item \pagestyle@{empty@}
@txindex @code{empty}
No headers or footers.
@item \pagestyle@{headings@}
@txindex @code{headings}
Print section number and page number at the 
 top of the page.
@item \pagestyle@{myheadings@}
@txindex @code{myheadings}
Print custom information in the page heading.
@end table

The command @samp{\thispagestyle} sets the page style of the
@txindex @code{thispagestyle}
current page.

You can change the information that appears at the top of the page in
the @samp{headings} and @samp{myheadings} page styles with the
@samp{\markright} and @samp{\markboth} commands.  The former is used for
@txindex @code{markright}
@txindex @code{markboth}
documents that are formatted for one side of the page, and the latter
defines header titles for both the left-hand and right-hand pages of
two-sided documents.

For two-sided printing, the default titles of the @samp{headings} page
@txindex @code{headings}
style are the chapter and section in @samp{book} and @samp{article}
@txindex @code{book} document class
@txindex @code{article} document class
classes, and the section and subsection in @samp{report} class.  For
@txindex @code{report} document class
one-sided printing, the chapter is printed at the top of the page in
@samp{book} and @samp{article} class, and at the top of the section in
@samp{report} class.

In the @samp{myheadings} page style, you must supply the title
@txindex @code{myheadings}
information.  The @samp{\markright} command takes one argument, the
@txindex @code{markright}
title that appears at the top of every page.  The @samp{\markboth}
@txindex @code{markboth}
command takes two arguments, the left page heading and the right page
heading.

@example
\markright@{right_page_heading@}
\markboth@{left_page_heading@}@{right_page_heading@}
@end example

These commands define the values of the internal registers
@samp{\leftmark} and @samp{\rightmark}.  In @samp{myheadings} page
@txindex @code{leftmark}
@txindex @code{rightmark}
style, they are empty by default, although the page number is still
printed at the upper left of the left-hand pages and the upper right of
right-hand pages.  Here is the definition of the @samp{myheadings}
page headings:

@example
\def\@@evenhead@{\thepage\hfil\slshape\leftmark@}
\def\@@oddhead@{@{\slshape\rightmark@}\hfil\thepage@}
@end example

If you want to create page styles of your own, there are extension
packages to do that for you.  Refer to @ref{Packages}.


@node Math, Math mode, Headers and footers, LaTeX
@comment  node-name,  next,  previous,  up
@section Math and equations.

@menu
* Math mode::           LaTeX formats things differently in math mode.
* Symbols and type::      Math symbols and type styles.
* Formulas::            Commands to format formulas.
* Horizontal::          Adjusting the horizontal and vertical formatting. 
@end menu

@node Math mode, Symbols and type, Math, Math
@comment  node-name,  next,  previous,  up
@subsection Math mode.

A primary goal of @TeX{}'s design is to typeset mathematical formulas.
There are three La@TeX{} environments that facilitate using @TeX{}'s math
mode.  The environments have shorthand abbreviations that can are used
as delimiters for their environments.  These environments are:

@example
Name             Shorthand      Formats
----             ---------      -------
math             \( \) or $ $   In-line equations.
displaymath      \[ \]          Displayed formulas.
equation                        Displayed numbered formulas.
@end example
@txindex @code{math}
@txindex @code{displaymath}
@txindex @code{equation}

To type the fraction 1/2, you could use this:

@example
\[\frac@{1@}@{2@}\]
@end example
@txindex @code{frac}

The example types the fraction in the center of a line by itself.  The
@samp{\frac} command takes two arguments: the first is the numerator of
the fraction and the second is the denominator.

If you want to format the fraction within a paragraph, use the forward
slash.  TeX still uses math mode formatting:

@example
$1/2$
@end example

There are two options to @samp{\documentclass} that determine
how to format the text of an equation and its number on the line.
@samp{fleqn} formats an equation on the left margin.  @samp{leqno}
@txindex @code{fleqno}
@txindex @code{leqno}
formats the equation's reference number on the left margin.

@node Symbols and type, Formulas, Math mode, Math
@comment  node-name,  next,  previous,  up
@subsection Math symbols and type styles.
@txindex math symbols

When @TeX{} is in math mode, it formats text differently.  Letters are
italicized, and the spacing in the input file is ignored.  Instead, TeX
uses special rules that make formulas easier to read.  Additionally,
there are many symbols that TeX recognizes only in math mode.  They
include the Greek letters and mathematical symbols.  For example, if you
wanted to typeset @samp{LaTeX 2e}, you would need to use math mode to
typeset the epsilon:

@example
\LaTeX@{@} 2$\epsilon$
@end example

Among the symbols that are valid in math mode is the Greek alphabet.
Here are the LaTeX symbols of the Greek letters that @TeX{} (and
therefore La@TeX{}) recognizes:

@example
Lowercase:
\alpha      \zeta       \lambda     \varpi      \upsilon
\beta       \eta        \mu         \rho        \phi
\gamma      \theta      \nu         \varrho     \varphi
\delta      \vartheta   \xi         \sigma      \chi
\epsilon    \iota       o           \varsigma   \psi
\varepsilon \kappa      \pi         \tau        \omega

Uppercase:
\Gamma      \Lambda     \Sigma      \Psi
\Delta      \Xi         \Upsilon    \Omega
\Theta      \Pi         \Phi
@end example

These are the math symbols that LaTeX recognizes:  Symbols with braces
(@samp{@{@}}) take arguments.

@example
\coprod             \bigvee             \bigwedge           \biguplus
\bigcap             \bigcup             \intop              \prod
\sum                \bigotimes          \bigoplus           \bigodot
\ointop             \bigsqcup           \smallint           \triangleleft
\triangleright      \bigtriangleup      \bigtriangledown    \wedge
\vee                \cap                \cup                \ddagger
\dagger             \sqcap              \sqcup              \uplus
\amalg              \diamond            \bullet             \wr
\div                \odot               \oslash             \otimes 
\ominus             \oplus              \mp                 \pm
\circ               \bigcirc            \setminus           \cdot
\ast                \times              \star               \propto
\sqsubseteq         \sqsupseteq         \parallel           \mathrel
\dashv              \vdash              \nearrow            \searrow
\nwarrow            \swarrow            \Leftrightarrow     \Leftarrow
\Rightarrow         \not                \leq                \geq
\succ               \prec               \approx             \succeq
\preceq             \supset             \subset             \supseteq
\subseteq           \in                 \ni                 \gg 
\ll                 \leftrightarrow     \leftarrow          \gets 
\rightarrow         \to                 \mapstochar         \mapsto
\sim                \simeq              \perp               \equiv
\asymp              \smile              \frown              \leftharpoonup
\leftharpoondown    \rightharpoonup     \rightharpoondown   \notin
\rightleftharpoons  \doteq              \joinrel            \relbar
\Relbar             \lhook              \hookrightarrow     \rhook
\hookleftarrow      \bowtie             \models             \Longrightarrow 
\longrightarrow     \longleftarrow      \Longleftarrow      \longmapsto
\longleftrightarrow \Longleftrightarrow \iff                \ldotp
\cdotp              \colon              \mathinner          \vdots
\ddots              \acute              \grave              \ddot
\tilde              \bar                \breve              \check
\hat                \vec                \dot                \widetilde
\widehat            \sqrtsign           \overrightarrow@{@}   \overleftarrow@{@}
\overbrace@{@}        \underbrace@{@}       \skew@{@}@{@}@{@}         \rightarrowfill
\leftarrowfill      \braceld            \bracerd            \bracelu
\braceru            \downbracefill      \upbracefill        \lmoustache
\rmoustache         \arrowvert          \Arrowvert          \Vert
\|                  \vert               \uparrow            \downarrow 
\updownarrow        \Uparrow            \Downarrow          \Updownarrow
\backslash          \rangle             \langle             \rbrace
\lbrace             \rceil              \lceil              \rfloor
\lfloor             \lgroup             \rgroup             \bracevert
\mathparagraph      \mathsection        \mathdollar         \mathit 
\mathunderscore     \mathellipsis 
@end example

In math mode, LaTeX can use a special calligraphic font, called
@samp{\mathcal}, to format uppercase letters.  
@txindex @code{mathcal} font

@example
\[\frac@{@{\mathcal A@}x@}@{n@}\]
@end example

In addition, La@TeX{} provides math mode versions of the standard
character shapes and weights.  They are derived from the math
fonts: @samp{cmmr} and @samp{cmmi} and the bold extended fonts
@samp{cmbx}.

@table @samp
@item \mathrm
cmmr fonts.
@item \mathbf
cmbx.
@item \mathsf
cmss.
@item \mathit
cmmi.
@item \mathtt
cmtt.
@end table
@txindex @code{mathrm}
@txindex @code{mathbf}
@txindex @code{mathsf}
@txindex @code{mathtt}

Otherwise, LaTeX formats letters in italics, and numbers in roman type.
Some words, like ``sin,'' and, ``cos,'' still use a roman font.  Math
mode provides special definitions for these words:

@example
\arccos             \arcsin            \arctan              \arg
\cos                \cosh              \cot                 \coth
\csc                \deg               \det                 \dim
\exp                \gcd               \hom                 \inf
\ker                \lg                \lim                 \liminf
\limsup             \ln                \log                 \max
\min                \Pr                \sec                 \sin
\sinh               \sup               \tan                 \tanh
@end example

@node Formulas, Horizontal, Symbols and type, Math
@comment  node-name,  next,  previous,  up
@subsection Formatting formulas.

To format superscripts and subscripts, use an underscore or a caret,
respectively: 
@txindex superscripts
@txindex subscripts

@example
x_i
2^n
@end example

LaTeX uses the following commands to typeset formulas:

@table @samp
@item \frac@{numerator@}@{denominator@}
Vertical fraction.
@item \sum
Summation.
@item \int
Integral.
@item \sqrt@{@}
Format the argument under a radical sign.
@end table
@txindex @code{frac}
@txindex @code{sum}
@txindex @code{int}
@txindex @code{sqrt}

The @samp{\sum} and @samp{\int} commands use superscripts and subscripts
to define their beginning and limits:

@example
\sum_n^@{n+1@}
\int_0^\infty
@end example


@node Horizontal, Vertical formatting, Formulas, Math
@comment  node-name,  next,  previous,  up
@subsection Horizontal formatting.

Even though La@TeX{} ignores the spacing in math mode by default, it
provides commands to adjust horizontal spacing explicitly.  Some of the
measurements use TeX's kerning facilities.  Others use glue, and can
@txindex glue
stretch and shrink.

@table @samp
@item \,
1.6667 em.
@item \:
Approx. 1 pc., kerned.
@item \;
Approx. 1 pc., glue.
@item \(space)
Space between words.
@item \!
-1.6667 em.
@end table

The @TeX{} command @samp{\eqalign} indents the line the equation is on,
@txindex @code{eqalign}
as if it were an indented paragraph, and then centers the equation.  It
places a blank line above and below the equation.  The @samp{\eqalignno}
@txindex @code{eqalignno}
command places its argument, the equation number, at the right margin.
@samp{\leqalignno} aligns its argument indented, to the left of the
@txindex @code{leqalignno}
equation.

As mentioned at the start of this chapter, the environments that produce
arrays and multiple-line formulas are @samp{array} and @samp{eqnarray}.
Like many environments that format text into columns, it takes as its
argument a list of column format specifiers, one letter per column:
@samp{l} means to justify the text of the column at the left margin,
@samp{c} centers the text, and @samp{r} right justifies the
text.  Columns are separated by an ampersand (@samp{&}), and rows by
double backslashes (@samp{\\}).

@example
\begin@{array@}@{lll@}
x    &  x    & z \\
x^2  &  x^3  & x^-1 
\end@{array@}
@end example
@txindex @code{array}

An optional argument in square brackets before the column format
specifies whether the array should be aligned at the center of the top
row (@samp{t}) or bottom row (@samp{b}).

@example
\begin@{array@}[t]@{c@}
x      \\
\vdots \\
y
\end@{array@}
@end example
@txindex @code{vdots}

This is similar to the formatting of a @samp{\parbox}, which is
described in @ref{Paragraphs}.
@txindex @code{parbox}

The environment @samp{eqnarray} is similar to @samp{array} but
@txindex @code{eqnarray}
@txindex @code{array}
prints an equation number for each row unless you specify
@samp{\nonumber} on that row.
@txindex @code{nonumber}

@example
\begin@{array@}[t]@{c@}
x      \\
\vdots \\
y      \nonumber
\end@{array@}
@end example


@node Vertical formatting, Footnotes, Horizontal, LaTeX
@comment  node-name,  next,  previous,  up
@section Vertical formatting---tabs, tables, and columns.

Plain @TeX{} provides the @samp{\settabs} command to set
fixed-interval tab stops.  The format is:

@example
\settabs 5 \columns
@end example
@txindex @code{settabs}
@txindex @code{columns}

This sets a tab every one-fifth of the line width.  Lines that
contain tabs begin with the @samp{\+} command and end with a
@samp{\cr} command.  An ampersand (@samp{&}) tells @TeX{} to
go to the next tab stop.
@txindex @code{cr}

@example
\settabs 5 \columns
\+ At the left margin. \cr
\+ & The first tab stop. \cr
\+ & & The second tab stop. \cr
\+ & & & And so on... \cr
@end example
@txindex @code{settabs}
@txindex @code{columns}

In La@TeX{}, the @samp{tabbing} environment supports tabs.  Because
LaTeX ignores extra spaces in the input file, there are commands that
set tab stops only within the @samp{tabbing} environment:
@txindex @code{tabbing}

@table @samp
@item \=
Set a tab stop at this position.
@item \>
Left justified tab stop.
@item \kill
Do not print this line; use to set tabs only.
@item \\
Signals the end of a line
@end table
@txindex @code{kill}

Here is an example of the @samp{tabbing} environment:

@example
\begin@{tabbing@}
First year \= Second year \= Third year \= \kill
1997 \> 1998 \> 1999  \\
2000.00 \> 2345.00 \> 2450.00 
\end@{tabbing@}
@end example

Tables use the @samp{tabular} environment.  The required argument to the
@txindex @code{tabular}
@samp{\begin@{tabular@}} statement are the format for each column in the
table, one letter for each of the columns: (@samp{l}) justifies the text
to the left of the column, (@samp{c}) centers the text, an (@samp{r})
right justifies the text.  Vertical bars (@samp{|}) between the format
letters tell LaTeX to draw lines between the columns.  Within the table
itself, ampersands (@samp{&}) separate columns, and double backslashes
(@samp{\\}) separate rows.

@example
\begin@{tabular@}@{|l|l|l|l|@}
\hline
       & 1996 & 1997 & 1998 \\ 
\hline
Wheat  & 2000 & 2345 & 2650 \\
Corn   & 3580 & 3695 & 3796 \\ 
\hline
\end@{tabular@}
@end example

The @samp{\hline} command draws a horizontal line the width of
the table between the rows.  

If you want to span multiple columns, use the @samp{\multicol} command.
It takes as its arguments the number of columns to span, a format, and
the text of the column.

@example
\begin@{tabular@}@{|l|l|l|l|@}
\hline
        & \multicol@{3@}@{c|@}@{Year@}
\hline
Product & 1996 & 1997 & 1998 \\ 
\hline
Wheat   & 2000 & 2345 & 2650 \\
Corn    & 3580 & 3695 & 3796 \\ 
\hline
\end@{tabular@}
@end example

The @samp{table} environment encloses a @samp{tabular} environment and
@txindex @code{table}
provides an entry in the List of Tables, a caption, and the ability for
@txindex List of Tables
the table to float on the page.  Information about the @samp{table}
environment is in @ref{Graphics and floats}.

La@TeX{} formats text into two columns if you use the @samp{twocolumn}
option in the @samp{\documentclass} statement:

@example
\documentclass[12pt,twocolumn]@{article@}
@end example

For explicit one-column formatting, use the @samp{onecolumn} option.
This is the default for all of the classes, anyway.  There is a complete
list of options to the @samp{\documentclass} statement in @ref{Document
classes}.

There are also packages that do complex, multiple-column formatting.
@ref{Packages} describes where to find them.


@node Footnotes, Multiple input files, Vertical formatting, LaTeX
@comment  node-name,  next,  previous,  up
@section Footnotes

The @samp{\footnote} command places an unnumbered footnote at
@txindex @code{footnote}
the bottom of the page it is formatted on.  

@example
The Institute's\footnote@{The Art Institute of
Chicago.@} Monet exhibiton was a critical success.
@end example

This produces a numbered footnote
in the text where the statement occurs.  

A footnote definition that has the form:

@example
\footnote[n]@{text@}
@end example

Produces footnotes with the number set to @samp{n}.

La@TeX{} doesn't have a single command to produce unnumbered footnotes, but
you can place unnumbered footnotes on a page with two commands:

@example
\textsuperscript@{*@}             % Place the footnote marker --
                                % an asterisk here --
                                % in the text.
\footnotetext@{@}                 % Produce the text of the note, but
                                % no mark.  
@end example
@txindex @code{footnotetext}
@txindex @code{textsuperscript}

If you want to use a numbered, automatically incremented footnote, use:

@example
\textsuperscript@{\thefootnote@}
@end example

separately, with @samp{\footnotetext}.

There are other parameters that control the formatting of footnotes.
They include:

@table @samp
@item \footins
@txindex @code{footins}
The dimension that LaTeX (and TeX) use to 
make space for footnotes.  Can vary from
@samp{\bigskip} to 8 in.
@item \footnotesep
@txindex @code{footnotesep}
The rule between the main text and the 
footnote text.  By default, its definition 
is: @code{\kern-3 \p@@ \hrule \@@width 2in \kern 2.6 \p@@},
which creates a rule 2 in. wide by .4 pt. 
high.
@item \footnotesep
The vertical space above the footnote text.
@end table

In the @samp{minipage} environment, you can use @samp{\thempfn} for the
@txindex @code{minipage}
footnote marker.  It is the same as @samp{\thefootnote} outside of a
@txindex @code{thefootnote}
@samp{minipage}, but it may be redefined.

@node Multiple input files, Contents and Index, Footnotes, LaTeX
@comment  node-name,  next,  previous,  up
@section Multiple input files.

For large documents it is often practical to separate the input into
multiple files.  In La@TeX{}, this is done with the
@samp{\include} command.  Here is the example input file from 
@txindex @code{include}
@ref{Books}.

@example
\documentclass@{book@}
\title@{My Book@}
\author@{John Q. Author@}
\makeindex
\begin@{document@}
\frontmatter
\maketitle
\include@{preface@}
\tableofcontents
\mainmatter
\include@{chapter1@}
\include@{chapter2@}
\include@{chapter3@}
\backmatter
\begin@{theindex@}
\include@{bookindex@}
\end@{theindex@}
@end example

The files @file{chapter1.tex}, @file{chapter2.tex}, and
@file{chapter3.tex} in the current directory are input when La@TeX{}
processes the @samp{\include} commands in the main input file.

It is often time-consuming to run La@TeX{} on a large document.  You can
use the @samp{\includeonly} command to run La@TeX{} on parts of the
@txindex @code{includeonly}
document without having to re-La@TeX{} the entire input.  Instead of
including all of the input files in the example above, you could add the
statement:

@example
\includeonly@{chapter1@}
@end example

and only @file{chapter1.tex} will be included in the input, regardless
of how many @samp{\include} commands there are in the input file.
@txindex @code{include}

@node Contents and Index, Graphics and floats, Multiple input files, LaTeX
@comment  node-name,  next,  previous,  up
@section Tables of Contents and Indexing.

The @samp{\tableofcontents} command formats a Table of Contents where
@txindex @code{tableofcontents}
the command occurs in the input file, normally in the front matter of a
book or report, or the first page of an article.  When La@TeX{}
processes an input file, for example @file{book.cls}, it produces the
auxiliary files @file{book.aux} and @file{book.toc}, which contain the
cross-reference and Table of Contents information.  Usually, you have to
process the input file at least twice so La@TeX{} can resolve the
cross-references.  If La@TeX{} can't, it will warn you:

@example
LaTeX Warning: 
There were undefined references.

LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.
@end example

The commands that format parts, chapters, sections, and subsections
automatically produce Table of Contents entries as well.  The contents
have the form of an outline, with each sub-heading level indented to the
right of the level above it.  The Table of Contents gives each entry's
section number, title, and page number.  The parameter @samp{tocdepth}
@txindex @code{tocdepth}
controls whether the Table of Contents lists sections, subsections, and
@txindex Table of Contents
paragraphs.  In @samp{article} class, for example, the Table of
@txindex @code{article} document class
Contents lists only parts, sections, and subsections.  If you use the
command:

@example
\setcounter@{tocdepth@}@{4@}
@end example

then the @samp{\subsubsection} command generates Table of Contents
entries as well.

The starred forms of the sectioning commands: @samp{\chapter*},
@samp{\\section}, @samp{\subsection*}, and so on, do not produce Table
of Contents entries.  You must add an entry explicitly.  To do this, use
the @samp{\addcontentsline} command:
@txindex @code{addcontentsline}

@example
\addcontentsline@{toc@}@{chapter@}@{Chapter 1@}
@end example

The first argument is the file name extension of auxiliary file where
LaTeX will add the entry.  The tables that LaTeX can format, and their
file extensions, are:

@table @code
@item .toc
Table of Contents.
@item .lot
List of Tables.
@item .lof 
List of Figures.
@end table
@txindex Table of Contents
@txindex List of Tables
@txindex List of Figures

The second argument tells La@TeX{} at what level the entry should occur.
Possible values are @samp{part}, @samp{chapter}, @samp{section}, and
@txindex @code{part}
@txindex @code{chapter}
@txindex @code{section}
@samp{subsection}.  The third argument, of course, is the title of the
@txindex @code{subsection}
entry.

You can use @samp{\addcontentsline} whenever you want to include a piece
@txindex @code{addcontentsline}
of text in a Table of Contents, but another way, which makes the entry
stand out from the text, is the @samp{\caption} command, which is
@txindex @code{caption}
described in @ref{Floats}.

Indexing is a little more involved, because you must use the
@samp{makeindex} program to generate the Index proper.  La@TeX{} will
@txindex @code{makeindex}
gather the raw information if you put the @samp{\makeindex} command in
the document preamble but doesn't actually format the index.  Instead
LaTeX creates a file of the same name as the input file but with the
extension @code{.idx}.  It is then up to @samp{makeindex}, the program,
to generate the formatted Index, which may then be @samp{\include}d in
@txindex @code{include}
the document.

Wherever you want an Index entry in the text, use the
@samp{\index} command:

@example
The work by Hume
\index@{Hume@}%
is significant because...
@end example
@txindex @code{index}

Using a separate line for Index entries is a good idea, because then
there are no spacing problems in the text where the entry occurs.  Be
sure to place the percent sign after the @samp{\index} command, too, so
that the extra carriage return isn't placed in the text.

There are a few commands that the @samp{makeindex} program
recognizes to format and alphabetize the entries.  For example, if you
want to format @samp{cat} in a monospaced font in the Index, the
format of the @samp{\index} command is:

@example
\index@{cat@@@{\tt cat@}@}%
@end example

This causes @samp{makeindex} (the program) to alphabetize the entry
@txindex @code{makeindex}
using the word ``cat,'' and not the backslash of the @samp{\tt}
command.  If you want to include sub-items for an entry, use an
exclamation point:  

@example
\index@{cat@@@{\tt cat@}!Command line arguments@}%
@end example

If you want to list a range of pages for an Index item, you can use the
open (@samp{|(}) and close (@samp{|)}) commands.  If, for example, on
page 42, you have the command:

@example
\index@{Installation|(@}
@end example

and then on page 45 you have the command:

@example
\index@{Installation|)@}
@end example

the Index entry will appear as, ``Installation, 42--45.''  

For the gory details of these and other Index format commands,
see the @samp{makeindex} manual page.

Cross-references use the @samp{\ref} command, for which there
must be a matching @samp{\label} command.  La@TeX{} will replace
the @samp{\ref} command with the section number where the
corresponding @samp{\label} occurs.  

If there is no @samp{\label} for a @samp{\ref}, La@TeX{}
generates its usual warning:

@example
LaTeX Warning: There were undefined references.
@end example

and will place two question marks in the output where the undefined
reference occurs.  But keep in mind that you may have to process the
document twice or even three times with La@TeX{} to resolve all the
cross-references.

If you want the page number of a @samp{\label} to appear in the text and
not the section number, refer to the label with the @samp{\pageref}
command.



@node Graphics and floats, Floats, Contents and Index, LaTeX
@comment  node-name,  next,  previous,  up
@section Graphics and floats.

Two packages exist for including graphics in LaTeX documents: the basic
@samp{graphics} package and the more extensive @samp{graphicx}.  They
@txindex @code{graphics} package
are included with the command:

@example 
\usepackage@{graphics@}
@end example 

and

@example
\usepackage@{graphicx@}
@end example

in the document preamble.  

The @file{graphics.sty} package adds the
@samp{\DeclareGraphicsExtensions} command, which allows you to specify
@txindex @code{DeclareGraphicsExtensions}
graphics translations in the @samp{graphicx} package by their file type,
and provides support for scaling of figures.

The @samp{graphicx} package, when used with the @samp{graphics} and
@samp{keyval} packages, provides for rotation of figures.
@txindex @code{keyval} package

For full graphics support, add the following commands to your document
preamble:

@example
\usepackage@{graphics@}
\usepackage@{keyval@}
\usepackage@{graphicx@}
@end example

Any @code{.dvi} output files that include graphics must be translated
into Postscript before they can be output on most devices.  Refer to
the @samp{dvips} documentation.
@txindex @code{dvips}

In the te@TeX{} distribution, the file @file{grfguide.dvi}, which documents
the graphics packages is located in the directory:

@example
texmf/doc/latex/graphics
@end example

You don't need to process the document yourself with La@TeX{}; you can
make a Postscript version directly with @samp{dvips}:
@txindex @code{dvips}

@example
dvips -f -r <grfguide.dvi >grfguide.ps
@end example

The @samp{-f} command switch tells @samp{dvips} to operate as a filter,
reading from standard input and writing to standard output.
@samp{dvips} output can be configured so its output defaults to
@txindex @code{dvips}
@samp{lpr}.
@txindex @code{lpr}

If you can print Postscript directly to your printer via @samp{lpr}, you
can simply type

@example
dvips -r grfguide.dvi
@end example

The @samp{-r} option tells dvips to output the pages in reverse order so
they stack correctly when they exit a printer.  Use it or not, as
appropriate for your output device.

If your system has printing filters installed, you can print directly
from @samp{dvips}.  If you need to feed the output manually to a
@txindex @code{dvips}
post-processor, the @samp{-f} option is generally the first you should
include in the @samp{dvips} command line.  For more details about how to
use @samp{dvips}, refer to  the manual page.

If you want to process the graphics package documentation from the @TeX{}
source, it is available at:

@example
~CTAN/macros/latex/packages/graphics/grfguide.tex.
@end example

@menu
* Floats::              How to adjust float placement.
@end menu

@node Floats, Packages, Graphics and floats, Graphics and floats
@comment  node-name,  next,  previous,  up
@subsection Variables that control float placement.

A @dfn{float} is an environment that La@TeX{} can move around to fit text
@txindex float
optimally on the pages.  In standard La@TeX{} implementations, the
@samp{table} and @samp{graphics} environments can float.  If there's no
@txindex @code{table} environment
@txindex @code{graphics} environment
optimum way to fit the text with the figure on a page, La@TeX{} places them
after the end of the input file or chapter, that is, at the next
@samp{\clearpage} command.
@txindex @code{clearpage}

Here's a @samp{table} environment that contains the @samp{tabular}
@txindex @code{table} environment
envrionment from the section above.  The @samp{\caption} command in the
example formats a numbered caption and adds the entry to the List of
Tables.
@txindex List of Tables

@example
\begin@{table@}[h]
\begin@{tabular@}@{|l|l|l|l|@}
\hline
       & 1996 & 1997 & 1998 \\ 
\hline
Wheat  & 2000 & 2345 & 2650 \\
Corn   & 3580 & 3695 & 3796 \\ 
\hline
\end@{tabular@}
\caption@{Wheat and corn figures for three years.@}
\end@{table@}
@end example
@txindex @code{tabular}
@txindex @code{hline}

The argument to the @samp{table} environment, @samp{[h]}, in this
@txindex @code{table} environment
example, tells La@TeX{} how it should fit the table into the text. In this
case, La@TeX{} will try to place the table where it appears in the input
text.  If that's not possible, La@TeX{} will place it somewhere later in
the text.  If you don't specify how to locate the table, La@TeX{} uses the
default specifier @samp{[tbp]}.

Here are what each of the placement arguments means:
@table @samp
@item h
Where the environment appears in the text.
@item t
At the top of the page.
@item b
At the bottom of the page.
@item p
On a separate page of floats.
@end table

So the default argument would place a float at the top or bottom of a
page, or on a separate page; in short, anywhere but ``here.''  If you
prefix a placement argument with an exclamation point, @samp{!}, La@TeX{}
adjusts its tolerances to fit the float closer to where it appears in
the text, and negates the effects of a @samp{\suppressfloats} command,
@txindex @code{suppressfloats}
which is described below.  The @samp{h} argument is valid only in
single-column formats.

The @samp{figure} environment is similar to the @samp{table}
@txindex @code{figure} environment
environment, but its caption is added to the List of Figures.

If don't want Tables or Figures to be too crowded on a page, use the
@samp{\suppressfloats} command.  This has the following form:
@txindex @code{suppressfloats}

@example
\suppressfloats[t]
@end example

or

@example
\suppressfloats[b]
@end example

which places no more floats at the top or bottom of that page.  Without
an argument, @samp{\suppressfloats} places no more figures at the top or
@txindex @code{suppressfloats}
bottom of pages.

Additionally, the following parameters affect float placement, in rough
order of precedence:

@table @samp
@item topnumber
@txindex @code{topnumber}
Maximum number of floats at the top of the page.
@item bottomnumber
@txindex @code{bottomnumber}
Maximum number of floats at the bottom of the page.
@item totalnumber
@txindex @code{totalnumber}
Maximum number of floats on a page.
@item \topfraction
@txindex @code{topfraction}
Percent of top of page used for floats.
@item \bottomfraction
@txindex @code{bottomfraction}
Percent of bottom of page used for floats.
@item \floatpagefraction
@txindex @code{floatpagefraction}
Minimum percent of float page used by floats.
@item \dbltopfraction
@txindex @code{dbltopfraction}
Like @samp{\topfraction} for two-column floats.
@item \doublefloatpagefraction
@txindex @code{doublefloatpagefraction}
Like @samp{\floatpagefraction} for two-column floats.
@item \floatsep
@txindex @code{floatsep}
Vertical glue between floats.
@item \dbltextfloatsep
@txindex @code{dbltextfloatsep}
Like @samp{\textfloatsep} for two-column floats.
@item \textfloatsep
@txindex @code{textfloatsep}
Vertical glue between floats and text.
@item \dblfloatsep
@txindex @code{dblfloatsep}
Like @samp{\floatsep} for two-column floats.
@item \intextsep
@txindex @code{intextsep}
Vertical glue above and below a float within
text placed with @samp{h} option.
@end table

The @samp{topnumber} and @samp{bottomnumber} parameters are
@txindex @code{topnumber}
@txindex @code{bottomnumber}
counters.  You set them with the @samp{\setcounter} command:

@example
\setcounter@{topnumber@}@{1@}
\setcounter@{totalnumber@}@{5@}
@end example
@txindex @code{totalnumber}

The remainder are fractions or lengths.  They can be set with
@samp{\renewcommand}:
@txindex @code{renewcommand}

@example
\renewcommand@{\topfraction@}@{.5@}
\renewcommand@{\floatsep@}@{\baselineskip*2@}
@end example
@txindex @code{topfraction}
@txindex @code{floatsep}
@txindex @code{baselineskip}

The @samp{\caption} command need not appear in the @samp{table} or
@txindex @code{caption}
@txindex @code{table} environment
@samp{figure} environment.  The difference is that the command, when it
@txindex @code{figure} environment
is not used in these environments, has the form:

@example
\caption[toc]@{Text of the entry.@}
@end example
@txindex @code{caption}

The argument places the entry in the Table of Contents.  You can also
@txindex Table of Contents
add a caption to the List of Tables: the file with the extension
@txindex List of Tables
@code{lot}, or List of Figures, @code{lof}, because @samp{\caption}
@txindex List of Figures
uses the @samp{\addcontentsline} command, which is described in
@txindex @code{caption}
@txindex @code{addcontentsline}
@ref{Contents and Index}.

@node Packages, Publicly available packages, Floats, La@TeX{}
@comment  node-name,  next,  previous,  up
@section La@TeX{} packages.

You can include La@TeX{} packages with the @samp{\usepackage@{@}}
@txindex @code{usepackage}
command.

@example
\usepackage@{babel@}
@end example
@txindex Babel package

The command above, given in the document preamble, would include the
La@TeX{} style file @file{babel.sty}, a multiple language package, from one
@txindex @code{babel.sty}
of the directories listed by the @samp{$TEXINPUTS} environment
@txindex @code{TEXINPUTS} 
variable, which you and te@TeX{} specified during installation and setup
processes.

@example
\documentclass@{article@}
\usepackage@{babel@}
\begin@{document@}
@end example
@txindex @code{article} document class
@txindex Babel package
@txindex @code{document} environment

Some packages require arguments.  For example, if you want to specify
babel's default language, you can specify it either as an option to the
@samp{\usepackage} command:
@txindex @code{usepackage}

@example
\documentclass@{article@}
\usepackage[german]@{babel@}
@end example
@txindex @code{article} document class
@txindex Babel package

or, as an option to @samp{\documentclass}, in which case 
@txindex @code{documentclass}
it is available to all packages that need to know the document's
default language:

@example
\documentclass[german]@{article@}
\usepackage@{babel@}
@end example
@txindex @code{article} document class
@txindex Babel package

@menu
* Publicly available packages::  Where to find packages that
                                 people have written.
@end menu

@node Publicly available packages, Postscript fonts, Packages, Packages
@comment  node-name,  next,  previous,  up
@subsection Publicly available packages.

As mentioned above, using underlining as a form of text emphasis
presents special problems.  Actually, @TeX{} has no problem underlining
text, because it is a convention of mathematical typesetting.  In
La@TeX{}, you can underline words with the command:

@example
\underline@{text to be underlined@}
@end example
@txindex @code{underline}

The problem is that underlining will not break across lines, and, in
some circumstances, underlining can be uneven.  However, there is a
La@TeX{} macro package, ready-made, that makes underlining the default mode
of text emphasis.  It's called @file{ulem.sty}, and is one of the many
contributed La@TeX{} packages that are freely available via the Internet.
@txindex @code{ulem.sty}

To use @file{ulem.sty}, include the command

@example
\usepackage@{ulem@}
@end example
@txindex @code{usepackage}

in the document preamble.

The packages that are available for La@TeX{} include:

@table @samp
@item ifthen 
@txindex Ifthen
Include conditional statements in your documents.
@item initials 
@txindex Initials
Defines a font for initial dropped capitals.
@item sanskrit 
@txindex Sanskrit package
Font and preprocessor for producing documents in Sanskrit.
@item recipe 
@txindex Recipe
A La@TeX{}2e class to typeset recipes.
@item refman 
@txindex Refman
Variant report and article styles.
@item setspace 
@txindex Setspace
Single, double, and triple line spacing.
@end table

To make the path given in the Catalogue into a fully-qualified URL,
concatenate the path to the host name URL and top-level path of the CTAN
@txindex Comprehensive @TeX{} Archive Network (CTAN)
archive you wish to contact.  For example, the top-level CTAN directory
of the site @file{ftp://ftp.tex.ac.uk} @file{ctan/tex-archive}.  The
complete URL of the directory of the @samp{refman} package would be:

@example
ftp://ftp.tex.ac.uk/ctan/tex-archive/   + 
macros/latex/contrib/supported/refman   =

ftp://ftp.tex.ac.uk/ctan/tex-archive/macros/latex/contrib/supported/refman/
@end example

Some packages have more than one file, so only the path to the
package's directory is given.

When you have the URL in hand, you can retrieve the package from one
of the CTAN archive sites.  You can download a complete list of the
archive's contents as the file @file{FILES.byname}, in the archive's
@txindex @code{FILES.byname}
top-level directory.  You can also search the archive on line for a
keyword with the @samp{ftp} command:
@txindex @code{ftp}

@example
quote site index <keyword>
@end example

A complete list of CTAN sites is given in @ref{CTAN sites}.
@txindex @code{CTAN.sites}

@node Postscript fonts, Source2e, Publicly available packages, Top
@comment  node-name,  next,  previous,  up
@chapter Postscript Fonts

@txindex Postscript fonts
@txindex Type 1 fonts
Public domain, Type 1 fonts used to be much poorer quality than Computer
Modern bitmapped fonts.  This situation has improved in the past several
years, though, but matching the fonts is up to you.  Having several
different font systems on one machine can seem redundant and an
unnecessary waste of disk space.  The Computer Modern fonts can also
seem, well, a little too @emph{formal} for everyday use.  It reminds me
sometimes of bringing out the good China to feed the dog.  At least you
don't need to spend a bundle on professional quality fonts any longer.

One of the major improvements of La@TeX{} 2e over its predecessor was the
inclusion of the New Font Selection Scheme.  (It's now called PSNFSS.)
@txindex Postscript New Font Selection Scheme (PSNFSS)
Formerly, @TeX{} authors would specify fonts with commands like:

@example
\font=bodyroman = cmr10 scaled \magstep 1
@end example
@txindex @code{font}

which provides precision but requires the skills of a type designer and
mathematician to make good use of it.  Also, it's not very portable.  If
another system didn't have the font @samp{cmr10} (this is @TeX{}
@txindex @code{cmr10}
nomenclature for Computer Modern Roman, 10 pt., with the default medium
@txindex Computer Modern Roman
stroke weight), somebody would have to re-code the fonts specifications
for the entire document.  PSNFSS, however, allows you to specify fonts
@txindex Postscript New Font Selection Scheme (PSNFSS)
by @dfn{family} (Computer Modern, URW Nimbus, Helvetica, Utopia, and so
@txindex URW Nimbus
@txindex Helvetica
@txindex Adobe Utopia
@txindex font family
forth), @dfn{weight} (light, medium, bold), @dfn{orientation} (upright
@txindex font weight
@txindex font orientation
or oblique), face (Roman, Italic), and base point size.  (See
@txindex font face
@txindex font point size
@ref{Characters} for a description of the commands to specify
typefaces.)  Many fonts are packaged as families.  For example, a
Roman-type font may come packaged with a sans serif font, like
Helvetica, and a monospaced font, like Courier.  You, as the author of a
@txindex Helvetica
@txindex Courier
La@TeX{} document, can specify an entire font family with one command.

There are, as I mentioned, several high-quality font sets available in
the public domain.  One of them is Adobe Utopia.  Another is Bitstream
Charter.  Both are commercial quality fonts that have been donated to
@txindex Adobe Utopia
@txindex Bitstream Charter
the public domain.

These examples happen to be two of my favorites.  If you look around one
of the CTAN sites, you will find these and other fonts archived
there. There are enough fonts around that you'll be able to design
documents as you want them to look, including English text.  Since
@TeX{} was originally designed for mathematical typesetting, there is
a full range of mathematical fonts available, as well as Cyrillic,
Greek, Kana, and other alphabets too numerous to mention.
@txindex Cyrillic
@txindex Greek
@txindex Kana

When selecting a font, look for files that have either the @code{.pfa}
or @code{.pfb} extension.  They indicate that these are the scalable
fonts themselves, not simply the metrics files.  Type 1 fonts use
@txindex Type 1 fonts
@code{.pfm} metric files, as opposed to the @code{.tfm} metric files,
@txindex @code{tfm} font metric files 
which bitmapped fonts use.  The two font sets I mentioned above are
included in te@TeX{} distributions, as well as separately.

If you want to use the Charter fonts instead of Computer Modern
bitmapped fonts, and are using the New Font Selection Scheme in LaTeX
2e, all that is necessary is:

@example
\renewcommand@{\familydefault@}@{bch@}
@end example
@txindex @code{renewcommand}
@txindex @code{familydefault}

in the document preamble, where ``bch'' is the common designation for
Bitstream Charter.  The Charter fonts reside in the directory:
@txindex Bitstream Charter font

@example
/usr/lib/tetex/texmf/fonts/type1/bitstrea/charter
@end example

There you'll see the @code{.pfb} files of the Charter fonts:
@txindex Bitstream Charter font
@file{bchb8a.pfb} for Charter Bold, @file{bchr8a.pfb} for Charter Roman,
@txindex @code{bchb8a.pfb}
@txindex @code{bchr8a.pfb}
@file{bchbi8a.pfb} for Charter Bold Italic.  The ``8a'' in the font
@txindex @code{bchbi8a.pfb}
names indicates the character encoding.  At this point, you needn't
worry much about them, because the encodings mostly differ for 8-bit
characters, which have numeric values above 128 decimal.  They mostly
define accents and non-English characters.  The Type 1 font encodings
generally work well for Western alphabets, because they conform to the
ISO 8859 standards for international character sets, which is an added
@txindex ISO 8859
benefit of using them.

To typeset a document that has Charter fonts selected, you would give
the command:

@example
pslatex document.tex
@end example
@txindex @code{pslatex}

@samp{pslatex} is a variant of te@TeX{}'s standard @samp{latex} command,
which defines the directories where the Type 1 fonts are located, as
well as some additional La@TeX{} code to load.  You'll see the notice
screen for @samp{pslatex} followed by the status output of the @TeX{}
job itself.  In a moment, you'll have a @code{.dvi} file, which includes
the Charter font requests.  You can then print the file with
@samp{dvips}, and @samp{gs} if necessary.
@txindex @code{dvips}
@txindex @code{gs}

Installing a Type 1 font set is not difficult, as long as you follow a
few basic steps.  You should unpack the fonts in a subdirectory of the
@file{/usr/lib/tetex/texmf/fonts/type1} directory, where your other Type
1 fonts are located, and then run @samp{texhash} to let the directory
@txindex @code{texhash}
search routines know that the fonts have been added.  Then you need to
add the font descriptions to the file @file{psfonts.map} so @samp{dvips}
knows they're on the system.  The format of the @file{psfonts.map} file
@txindex @code{psfonts.map}
is covered in a couple different places in the references mentioned
above.  Again, remember to run the @samp{texhash} program to update the
te@TeX{} directory database.

It is definitely an advantage to use the X Windows System with te@TeX{}---
@txindex X Windows System
XFree86 under GNU/Linux---because it allows for superior document
@txindex XFree86
previewing.  It's not required, but in general, anything that allows
for easier screen previewing is going to benefit your work, in terms
of the quality of the output.  However, there is a tradeoff with speed
of editing, which is much quicker on character-mode displays.  


@node Source2e, CTAN sites, Postscript fonts, Top
@comment  node-name,  next,  previous,  up
@chapter Printing the La@TeX{} 2e Source Code

@txindex La@TeX{} 2e source code
@TeX{} and La@TeX{} are implementations of a programming methodology called
@dfn{literate programming}, which means programs contain their own
@txindex literate programming
documentation.  The La@TeX{} source file @file{source2e.tex} allows you to
print the fully commented La@TeX{} 2e source code of the distribution,
which is available as part of various operating system distributions and
also from the CTAN archives.  If you don't have the source code, you can
obtain it from one of the anonymous FTP archives in @ref{CTAN sites}.

After obtaining the source distribution, untar it in a directory of
your choice, and extract the La@TeX{} working files with the command:

@example
latex latex.ins
@end example
@txindex @code{latex}
@txindex @code{latex.ins}

The file @file{latex.ins} is a special file, which performs the
@txindex @code{latex.ins}
extraction of the files that you format for the documentation.  You'll
also need to generate a Glossary and Index.  First, use the command:

@example
latex source2e.tex
@end example
@txindex @code{source2e.tex}

When La@TeX{} finishes processing all of the sources, you'll see the
usual warnings about unresolved labels.  You'll need to repeat the
command two more times to resolve all of the cross-references.  

Before that, however, generate the Index and Glossary with the
following commands:

@example
makeindex -s source2e.ist source2e.idx
makeindex -s gglo.ist -o source2e.gls source2e.glo
@end example
@txindex @code{makeindex}

The second @samp{makeindex} command uses a special style file,
@file{gglo.ist}, to generate the contents of the Glossary.  Then, 
repeat the command:

@example
latex source2e.tex
@end example

twice, to resolve all of the cross-references in the document.  

You will then have the file, @file{source2e.dvi}, which you can view
with @samp{xdvi}, or use to make a Postscript file with
@samp{dvips}.
@txindex @code{xdvi}
@txindex @code{dvips}

The following shell script is included in @file{source2e.tex}, and can
be used to generate the complete document automatically.
@txindex @code{source2e.tex}

@example
#!/bin/sh

rm  -f source2e.gls source2e.ind source2e.toc

# First run: 
# Create new standard ltxdoc.cfg file
# Pass the (possibly empty) list of arguments supplied on the
# command line to article class.
#
# If you use A4 paper, running this script with argument
#    a4paper
# may save about 30 pages.
#
echo "\PassOptionsToClass@{$*@}@{article@}" > ltxdoc.cfg


# Now LaTeX the file with this cfg file.
#
latex source2e.tex


# Make the Change log and Glossary.
#
makeindex -s source2e.ist source2e.idx
makeindex -s gglo.ist -o source2e.gls source2e.glo


# Second run: append \includeonly@{@} to ltxdoc.cfg to speed up things
# (this run needed only to get changes and index listed in .toc file)
#
# Note that the index will not be made incorrect by the insertion
# of the table of contents as the front matter uses a diferent page
# numbering scheme.
#
echo "\includeonly@{@}" >> ltxdoc.cfg

latex source2e.tex


# Third and final run, to put everything together.
# First restore the cfg file:
#
echo "\PassOptionsToClass@{$*@}@{article@}" > ltxdoc.cfg
latex source2e.tex
@end example

To format and print the documents in the distribution that are not
part of the source code, like the @code{*guide.tex} and
@code{*.fdd} files, @file{source2e.tex} includes the following
shell script:
@txindex @code{source2e.tex}

@example
#!/bin/sh

# Running this script will process all the dtx fdd and *guide.tex
# and ltnews*.tex files in the La@TeX{} distribution, except the dtx
# files included in source2e.tex. 
# (The shell first script in the comments of source2e.tex will
#  process those.)

# Any command line arguments (eg a4paper) are taken as options to the
# article class.

# This script is likely to take ages!

echo "\PassOptionsToClass@{$*@}@{article@}"                  > ltxdoc.cfg
echo "\batchmode"                                       >> ltxdoc.cfg

# The next four lines produce full indexes and change logs
# you may not want those.
echo "\AtBeginDocument@{\RecordChanges@}"                 >> ltxdoc.cfg
echo "\AtEndDocument@{\PrintChanges@}"                    >> ltxdoc.cfg
echo "\AtBeginDocument@{\CodelineIndex\EnableCrossrefs@}" >> ltxdoc.cfg
echo "\AtEndDocument@{\PrintIndex@}"                      >> ltxdoc.cfg

# If you do not want any code listings, just documentation, then instead
# of the above four lines, uncomment the following:
# echo "\AtBeginDocument@{\OnlyDescription@}"                >> ltxdoc.cfg

echo "\PassOptionsToClass@{$*@}@{article@}"                  > ltxguide.cfg
echo "\batchmode"                                       >> ltxguide.cfg

cp ltxguide.cfg ltnews.cfg


for i in *dtx *fdd *guide.tex ltnews*.tex
do
B=`basename $i .dtx`

if (grep "Include@{$B@}" source2e.tex >/dev/null ; )
then
echo In source2e: $i
else
echo latex $i
  if (latex $i > /dev/null) 
  then
    echo latex $i
    latex $i > /dev/null
    echo makeindex -s gind.ist $B.idx
    makeindex -s gind.ist $B.idx > /dev/null 2> /dev/null
    echo makeindex -s gglo.ist -o $B.gls $B.glo
    makeindex -s gglo.ist -o $B.gls $B.glo > /dev/null 2> /dev/null
    echo latex $i
    latex $i > /dev/null
  else
    echo "!!! LaTeX ERROR: $i. (See $B.log.)"
  fi
fi

done
@end example

You can, of course, format and print each document individually.  For
instructions on how to do that, and general considerations for
formatting the La@TeX{} 2e documentation, refer to @ref{Documentation}.

@node CTAN sites, Installation, Source2e, Top
@comment  node-name,  next,  previous,  up
@appendix List of Internet CTAN Sites

@txindex Comprehensive @TeX{} Archive Network (CTAN)
This is the text of the file @file{CTAN.sites}, which is available
@txindex @code{CTAN.sites}
in the top-level directory of each CTAN archive or mirror site.

@smallexample
In order to reduce network load, it is recommended that you use the
Comprehensive @TeX{} Archive Network (CTAN) host which is located in the
closest network proximity to your site.  Alternatively, you may wish to
obtain a copy of the CTAN via CD-ROM (see help/CTAN.cdrom for details).

Known mirrors of the CTAN reside on (alphabetically, by country):
  ctan.unsw.edu.au (NSW, Australia)       /tex-archive
  mirror.aarnet.edu.au (QLD, Australia)   /pub/tex-archive
  ftp.univie.ac.at (Austria)              /packages/tex
  gd.tuwien.ac.at (Austria)               /publishing/tex/CTAN

  ftp.belnet.be (Belgium)                 /packages/TeX

  ctan.math.mun.ca (Newfoundland, Canada) /tex-archive 
  scratchy.emate.ucr.ac.cr (Costa Rica)   /pub/ctan

  ftp.cstug.cz (The Czech Republic)       /pub/tex/CTAN

  ftp.net.uni-c.dk (Denmark)              /mirror/ftp.tex.ac.uk/tex-archive
  sunsite.auc.dk (Denmark)                /pub/tex/ctan

  ftp.gwdg.de (Germany)                   /pub/dante
  ftp.informatik.uni-hamburg.de (Germany) /tex-archive
  ftp.mpi-sb.mpg.de (Germany)             /pub/tex/mirror/ftp.dante.de
  ftp.tu-chemnitz.de (Germany)            /pub/tex
  ftp.uni-augsburg.de (Germany)           /pub/tex/ctan
  ftp.uni-bielefeld.de (Germany)          /pub/tex
  ftp.uni-stuttgart.de (Germany)          /tex-archive (/pub/tex)

  ftp.ut.ee (Estonia)                     /tex-archive

  ftp.funet.fi (Finland)                  /pub/TeX/CTAN
  ftp.jussieu.fr (France)                 /pub4/TeX/CTAN
  ftp.loria.fr (France)                   /pub/ctan
  ftp.oleane.net (France)                 /pub/mirrors/CTAN/

  ftp.ntua.gr (Greece)                    /mirror/ctan

  ftp.comp.hkbu.edu.hk (Hong Kong)        /pub/TeX/CTAN
  ftp.sztaki.hu (Hungary)                 /pub/tex

  ftp.heanet.ie (Ireland)                 /pub/ctan/tex
  cis.uniRoma2.it (Italy)                 /TeX
  ftp.unina.it (Italy)                    /pub/TeX

  ftp.lab.kdd.co.jp (Japan)               /CTAN
  ftp.meisei-u.ac.jp (Japan)              /pub/CTAN
  ftp.riken.go.jp (Japan)                 /pub/tex-archive
  ftp.u-aizu.ac.jp (Japan)                /pub/tex/CTAN

  ftp.kreonet.re.kr (Korea)               /pub/CTAN

  ftp.cs.ruu.nl (The Netherlands)         /pub/tex-archive

  sunsite.icm.edu.pl (Poland)             /pub/CTAN

  ftp.radio-msu.net (Russia *only*)       /tex-archive
  tex.ihep.su (Russia)                    /pub/TeX/CTAN

  ftpserver.nus.sg (Singapore)            /pub/zi/TeX
  ftp.rediris.es (Spain)                  /mirror/tex-archive
  ftp.nada.kth.se (Sweden)                /pub/tex/ctan-mirror
  sunsite.cnlab-switch.ch (Switzerland)   /mirror/tex

  ftp.ccu.edu.tw (Taiwan)                 /pub/tex
  dongpo.math.ncu.edu.tw (Taiwan)         /tex-archive
  sunsite.bilkent.edu.tr (Turkey)         /pub/tex/ctan

  sunsite.doc.ic.ac.uk (UK)               /packages/tex/uk-tex
  ftp.cdrom.com (West coast, USA)         /pub/tex/ctan
  ftp.cise.ufl.edu (Florida, USA)         /tex-archive
  ftp.duke.edu (North Carolina, USA)      /tex-archive
  ftp.rge.com (New York, USA)             /pub/tex
  joshua.smcvt.edu (Vermont, USA)         /pub/tex
  sunsite.unc.edu (North Carolina, USA)   /pub/packages/TeX
  wuarchive.wustl.edu (Missouri, USA)     /packages/TeX

Known partial mirrors of the CTAN reside on:
  ftp.dcc.uchile.cl (Chile)               /pub/Mirror/ctan
  ftp.germany.eu.net (Germany)            /pub/packages/TeX
  ftp.gust.org.pl (Poland)                /pub/TeX
  sunsite.dsi.unimi.it (Italy)            /pub/TeX
  sunsite.snu.ac.kr (Korea)               /shortcut/CTAN
  ftp.jaist.ac.jp (Japan)                 /pub/TeX/tex-archive
  ftp.fcu.edu.tw (Taiwan)                 /pub2/tex
  ftp.uu.net (Virginia, USA)              /pub/text-processing/TeX

Please send updates to this list to <ctan@@urz.uni-heidelberg.de>.

The participating hosts in the Comprehensive TeX Archive Network are:
  ftp.dante.de  (Mainz, Germany)         
       -- anonymous ftp                   /tex-archive (/pub/tex /pub/archive)
       -- gopher on node gopher.dante.de
       -- email via ftpmail@@dante.de
       -- World Wide Web access on http://www.dante.de/
       -- Administrator: <ftpmaint@@dante.de>

  ftp.tex.ac.uk (Cambridge, UK)
       -- anonymous ftp                   /tex-archive (/pub/tex /pub/archive)
       -- gopher on node gopher.tex.ac.uk
       -- NFS mountable from nfs.tex.ac.uk:/public/ctan/tex-archive
       -- World Wide Web access on http://www.tex.ac.uk/
       -- Administrator: <ctan-uk@@tex.ac.uk>

  ctan.tug.org (Boston, Massachusetts, USA)
       -- anonymous ftp                   /tex-archive (/pub/archive)
       -- World Wide Web access on http://ctan.tug.org/
       -- Administrator: <ctan@@tug.org>
@end smallexample


@node Installation, Distribution and Copyright, CTAN sites, Top
@comment  node-name,  next,  previous,  up
@appendix Installing the te@TeX{} 0.9 Distribution

@txindex te@TeX{} 0.9 beta distribution
The te@TeX{} 0.9 beta distribution is available from @file{ftp.tex.ac.uk},
@file{ftp.dante.de}, and mirror sites in the directory
@file{/tex-archive/systems/unix/tetex-beta}.  The files
@file{tetex-src-0.9.tar.gz} and @file{tetex-texmf-0.9.tar.gz} are
actually links to the most recent versions.

Unpack the @file{tetex-src-0.9.tar.gz} archive in your system's
source directory tree.  These examples use @file{/usr/src}.

@example
tar zxvf tetex-src-0.9.tar.gz
@end example

Change to the @file{tetex-0.9} directory and read the @file{INSTALL.src}
file.  It describes important steps for configuring te@TeX{} during the
installation process, as well as disk space and compiler requirements.

Decide where you want to install the library files, @file{/usr/local} in
this example, and make the following directories.  These examples assume
that you do not have a pre-existing te@TeX{} version installed in the
same location.

@example
mkdir tetex
mkdir tetex/share
mkdir tetex/share/texmf
@end example

Change to the @file{./tetex/share/texmf} directory and unpack the
library files directory tree from @file{tetex-texmf-0.9.tar.gz}.  The
build and installation processes detect this location automatically and
set the value of the @samp{$TETEXDIR} environment variable correctly.
If you want to install the library files somewhere else, the build
process will detect the location.

If the value of @samp{$TETEXDIR} is @file{/usr/local/tetex}, the
installed te@TeX{} directory tree will look like this:

@example
/usr/local/tetex           # The base teTeX directory
/usr/local/tetex/share	   # Shared library files, fonts, and TeX documentation.
/usr/local/tetex/bin/i586-pc-linux-gnu
                           # Platform-specific binaries.
/usr/local/tetex/man	   # Manual pages.
/usr/local/tetex/info	   # Texinfo documentation.
/usr/local/tetex/include   # kpathsea include files.
/usr/local/tetex/lib       # kpathsea library.
@end example

After you have installed the library files in @samp{texmf}, return
to the directory with the unpacked @file{tetex-src-0.9.tar.gz}
archive, @file{/usr/src/tetex-0.9} here, and execute the following
commands at the shell prompt:

@example
./configure
set +o noclobber
make world >make.err 2>&1 & 
@end example

and do something else for a while.  The command @samp{make world} is
shorthand for the command line @samp{make all install strip}.  The file
@file{make.err} contains a transcript of the installation process.

After the binaries have been installed, you can configure te@TeX{} as
described above.

@node Distribution and Copyright, Index, Installation, Top
@appendix Distribution and Copyright

@txindex GNU General Public License
@menu
* Distribution::                 
* GNU GENERAL PUBLIC LICENSE::
@end menu

@node Distribution, GNU GENERAL PUBLIC LICENSE, Distribution and Copyright, Distribution and Copyright
@section Distribution.

te@TeX{} is @emph{free software;} this means everyone is free to use
the software and free to redistribute it on certain conditions.  The
package is not in the public domain.  It is copyrighted and there are
restrictions on its distribution, but these restrictions are designed
to permit everything that a good cooperating citizen would want to do.
What is not allowed is to try to prevent others from further sharing
any version of free software that they might get from you.  The
precise conditions are found in the GNU General Public License that
comes with many of the software packages and also appears following
this section.

One way to get a copy of the package is from someone else who has
it.  You need not ask for our permission to do so, or tell any one
else; just copy it.  If you have access to the Internet, you can get
the latest distribution versions by anonymous FTP.  See the chapter
``Sources'' for more information.

You may also receive the software when you buy a computer.  Computer
manufacturers are free to distribute copies on the same terms that apply
to everyone else.  These terms require them to give you the full
sources, including whatever changes they may have made, and to permit
you to redistribute these packages received from them under the usual
terms of the General Public License.  In other words, the program must
be free for you when you get it, not just free for the manufacturer.

You can also order copies of GNU software from the Free Software
Foundation on CD-ROM.  This is a convenient and reliable way to get a
copy; it is also a good way to help fund our work.  (The Foundation has
always received most of its funds in this way.)  An order form is
included with many distributions, and on our web site in
@file{http://www.gnu.ai.mit.edu/order/order.html}.  For further
information, write to

@example
Free Software Foundation
59 Temple Place, Suite 330
Boston, MA  02111-1307 USA
USA
@end example

The income from distribution fees goes to support the foundation's
purpose: the development of new free software, and improvements to our
existing programs.

If you use GNU software at your workplace, please suggest that the
company make a donation.  If company policy is unsympathetic to the idea
of donating to charity, you might instead suggest ordering a CD-ROM from
the Foundation occasionally, or subscribing to periodic updates.

@node GNU GENERAL PUBLIC LICENSE, (none), Distribution, Distribution and Copyright
@section GNU GENERAL PUBLIC LICENSE

Version 2, June 1991

Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.

@strong{Preamble.}

  The licenses for most software are designed to take away your
freedom to share and change it.  By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software---to make sure the software is free for all its users.  This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it.  (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.)  You can apply it to
your programs, too.

  When we speak of free software, we are referring to freedom, not
price.  Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.

  To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.

  For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have.  You must make sure that they, too, receive or can get the
source code.  And you must show them these terms so they know their
rights.

  We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.

  Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software.  If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.

  Finally, any free program is threatened constantly by software
patents.  We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary.  To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.

  The precise terms and conditions for copying, distribution and
modification follow.

@strong{TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION}

@itemize @bullet
@item
This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License.  The ``Program'' below,
refers to any such program or work, and a ``work based on the Program''
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language.  (Hereinafter, translation is included without limitation in
the term,``modification.'')  Each licensee is addressed as ``you.''

Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope.  The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.

@item
You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.

You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.

@item
You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:

1. You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.

2. You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.

3. If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License.  (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)

These requirements apply to the modified work as a whole.  If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works.  But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.

Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.

In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.

@item
You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:

1. Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,

2. Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,

3. Accompany it with the information you received as to the offer
to distribute corresponding source code.  (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)

The source code for a work means the preferred form of the work for
making modifications to it.  For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable.  However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.

If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.

@item
You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License.  Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.

@item
You are not required to accept this License, since you have not
signed it.  However, nothing else grants you permission to modify or
distribute the Program or its derivative works.  These actions are
prohibited by law if you do not accept this License.  Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.

@item
Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions.  You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.

@item
If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License.  If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all.  For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.

If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.

It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices.  Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.

This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.

@item
If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded.  In such case, this License incorporates
the limitation as if written in the body of this License.

@item
The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time.  Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.

Each version is given a distinguishing version number.  If the Program
specifies a version number of this License which applies to it and ``any
later version,'' you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation.  If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.

@item
If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission.  For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this.  Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
@end itemize

@strong{NO WARRANTY}

@itemize @bullet
@item
BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM ``AS IS'' WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.

@item
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
@end itemize

@strong{END OF TERMS AND CONDITIONS}

@strong{How to Apply These Terms to Your New Programs}

  If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.

  To do so, attach the following notices to the program.  It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the ``copyright'' line and a pointer to where the full notice is found.

@example
[one line to give the program's name and an idea of what it does.
Copyright (C) 19[yy]  [name of author]

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
@end example

Also add information on how to contact you by electronic and paper mail.

If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:

@example
Gnomovision version 69, Copyright (C) 19[yy] [name of author]
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details
type `show w'.  This is free software, and you are welcome
to redistribute it under certain conditions; type `show c' 
for details.
@end example

The hypothetical commands @samp{show w} and @samp{show c}
should show the appropriate parts of the General Public License.  Of
course, the commands you use may be called something other than
@samp{show w} and @samp{show c}; they could even be
mouse-clicks or menu items---whatever suits your program.

You should also get your employer (if you work as a programmer) or your
school, if any, to sign a ``copyright disclaimer'' for the program, if
necessary.  Here is a sample; alter the names:

@example
Yoyodyne, Inc., hereby disclaims all copyright
interest in the program `Gnomovision'
(which makes passes at compilers) written 
by James Hacker.

[signature of Ty Coon] 1 April 1989
Ty Coon, President of Vice
@end example

This General Public License does not permit incorporating your program into
proprietary programs.  If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library.  If this is what you want to do, use the GNU Library General
Public License instead of this License.

@node Index, (none), Distribution and Copyright, Top
@unnumbered Index

@printindex tx

@contents

@bye
