article or amsart for papers, and
book or amsbook for book-length manuscripts.
The main difference between the article/book classes and
the amsart/amsbook classes (which are part of the amslatex
package) is in the "look" of the document. The non-ams classes
set the title matter and section headings in a larger font, which some
people find more attractive.
article/book class, one can put footnotes to
the author or title
containing, for example, a grant acknowledgement, a subject
classification, or the author's address.
This causes problems in the ams classes; with the ams classes you have
to use the commands \thanks{...} (for acknowledgements),
\subjclass{...}, and \address{...} to
provide this information.
\documentclass command and the name of the document
class; multiple options should be placed in a single pair of brackets,
separated by commas; for example,
\documentclass[leqno,draft]{article}.
Here are some useful options that work with all of the mentioned
paper and book classes:
draft option is that embedded pictures do not get
displayed; instead, only an outline of the box taken up by the picture
is shown.
\magnification
command in plain tex. (\magnification does not work in
latex.)
Using this option
is the proper way to "magnify" a document. Don't try to magnify fonts
manually, using fontsizing commands like \larger; since such
commands only affect a single font and leave other fonts as well as
spacing parameters unchanged, this results in a poor looking
document.
amsart/amsbook
classes, right in the
article/book classes)
slides
class works like the article class, but there is one
major difference to be aware of: The \pagestyle commands
do not work in the slides class; if you want to use
customized headers or footers, use the fancyhdr package
(see below).
To load a package,
add a \usepackage{...} instruction
after \documentclass, with the name of the package in
braces. Multiple packages can be included in a single
\usepackage{...} statement, separated by commas; for
example: \usepackage{amsmath, amsthm}.
Here are some packages that are commonly used in mathematical writing.
\usepackage{amsmath, amsthm}.
Documentation. Gratzer's book "Math into LaTeX" provides complete documentation for these and other amslatex packages, and is the only book to do so. Online documentation exists in the form of the "Short Math Guide for LaTeX". This is a reference manual, rather than an introduction or tutorial.
amsfonts package which, among
other things, makes
blackboard bold (\mathbb) and fraktur
(\mathfrak) fonts
available. The amssymb also includes a number of
additional symbols or variants of standard LaTeX symbols, such as a
slanted "less than or equal" sign. (However, I would recommend using
the standard versions, unless there is a particular reason to use the
variant.)
Documentation:
A complete listing of the symbols provided by amssymb,
is given in Appendix A of Gratzer's book, and in
the Short Math Guide for
LaTeX, mentioned above.
xy package described below.
Documentation: Section 5.8 of Gratzer's book.
xy wouldn't be able
to handle.
Documentation.
There is a short guide,
xyguide.ps
and a comprehensive (81 pages) reference manual
xyrefer.ps.
(Both links work only for local users; you can also access the
documentation with the "texdoc" command which should work
on most standard TeX installations: "texdoc xyguide" or "texdoc
xyrefer".)
Despite the size of the reference manual, for simple diagrams
xy is fairly easy to use, and you will
likely get by using just the short guide.
graphicx package allows inclusion of
graphics files produced by other aplications (such as
the free program xfig, available on Unix systems,
Mathematica/Maple,
or commercial software like CorelDraw). (Note the "x" at the end;
the precursor to graphicx
is a package called graphics, but this
package is obsolete and should not be used.)
The graphics files must be in eps (encapsulated postscript) format, so
be sure to save the files in this format. (All of the mentioned
applications can do this.)
Documentation. The main source of documentation is the
document "Using imported graphics in LaTeX2e", which, despite its
hefty size (86 pages), provides an excellent introduction to the
graphicx package, and
to the issues involved in using graphical material in TeX files.
The graphicx package is also documented in the "LaTeX
graphics companion".
Usage.
The graphicx package has numerous features and options,
but the basic use is very simple:
First load the graphicx package with
\usepackage{graphicx}, and then use
the \includegraphics{...} command (note the "s" at the
end!) for every file you want to import into your LaTeX file.
In its simplest form, you just use the \includegraphics
command with
the file name given inside the braces. However, you will usually
want to place this command inside a figure environment,
and probably also wrap it inside \begin{center} ...
\end{center} so that the graphics is horizontally centered.
Furthermore, you may need to scale the graphics so that it fits the
page; this can be accomplished with an optional width
argument,
which sets the width to a specific length (and also scales the height
proportionally).
Here is a simple, complete example, showing how to include a file, plot.eps, in a document. Note that the .eps extension need not be specified.
\documentclass{article}
\usepackage{graphicx}
\begin{document}
\begin{figure}[tbh]
\begin{center}
\includegraphics[width=.8\textwidth]{plot}
\end{center}
\caption{Plot of the function $\sin x$}
\label{sineplot}
\end{figure}
\end{document}
Here are some additional hints when using this package.
\documentclass command
is turned on, the graphics files are not displayed;
only an
outline of the rectangular boxes containing the graphics is shown.
This is useful in order to determine the proper sizing
and placement of the graphics. To override this behavior,
use the option "final" when loading the package:
\usepackage[final]{graphicx}.
With this option, all graphics will be displayed, regardless of
whether or not the draft option is turned on.
figure or
table environment are so-called "floats"; this means that
they may be moved further down in
the document in order to avoid overlong
pages and similar problems. LaTeX tries hard to optimize the
placement, but sometimes this can result in a poor placement, such as in
the middle of a bibliography. This occurs mainly
in documents containing lots of figures.
There are several things one can do to
improve the placement of figures. The first thing to try is to
add an option like "[tbh]" to the \begin{figure} command,
as in the example above. This instructs Tex to try to place the figure
at the top (t) or bottom (b) of the page, or "here" (h), meaning the
place where the figure occurs in the source code. If this does not
help, try the more emphatic version "[tbh!]". As a last resort, you
could remove the \begin{figure} ... \end{figure} wrapper
and use manual spacing commands before and after the figure to achieve
the proper spacing. However, this is a drastic measure that is only
recommended if other attempts fail.
showkeys package
shows these labels explicitly by putting the name of the label
referenced in a small box placed on the margin of the page, or
directly above the reference.
The labels displayed in this manner include citation labels
(\cite{...}), equation
labels (\eqref{...}), and ordinary labels
(\ref{...}).
A great tool when working on a complex document.
Documentation. The showkeys package (dvi file). (Local access only. On most TeX installations, the file can be accessed with the "texdoc showkeys" command.)
\pagestyle{...} command in standard LaTeX. The package
distinguishes between even and odd numbered pages,
and for each allows specifying a left/center/right header, and a
left/center/right footer.
Documentation: Page Layout in LaTeX (dvi file). (Local access only. On most TeX installations, the file can also be accessed with the "texdoc fancyhdr" command.)
Here is an example:
\documentstyle{book}
\usepackage{fancyhdr}
\pagestyle{fancy}
%% L/C/R denote left/center/right header (or footer) elements
%% E/O denote even/odd pages
%% \leftmark, \rightmark are chapter/section headings generated by the
%% book document class
\fancyhead[LE,RO]{\slshape\thepage}
\fancyhead[RE]{\slshape \leftmark}
\fancyhead[LO]{\slshape \rightmark}
\fancyfoot[LO,LE]{\slshape Short Course on Asymptotics}
\fancyfoot[C]{}
\fancyfoot[RO,RE]{\slshape 7/15/2002}
Last modified: Sat 19 Apr 2003 05:25:48 PM CDT A.J. Hildebrand