Next: Title Page
Up: Creating your Document
Previous: Creating your Document
A typical file, such as a term paper, will begin like this:
\documentclass{article}
\begin{document}
This tells LATEX the following things:
- This example is an
article
. The article style may be used
for any kind of standard paper. An article
is shorter than a
report
.5 The
book
style also exists. It is meant for real books. These
options control section headings and tables of contents and other
things.
- The main text is printed in a 10 point font by
default. There are several text sizes available: 10,
11, and 12 point. This document is printed in 11 point. The various
type sizes within a document are relative to this base size, as
described in subsection 6.3. If no base size is specified,
10 point is assumed. To change to a base size of 11 point or 12 point,
change the document class with an optional parameter, placed inside
square braces immediately after the command name, like this:
\documentclass[11pt]{article}
- There are many other optional parameters which can be used, some
of which will be mentioned later. They are all entered inside the
square brackets and are separated by commas, with no spaces in
between. For example,
\documentclass[twoside,11pt]{report}
\usepackage{doublespace}
sets the document up as an 11-point, double-spaced, double-sided
report.
- The space between the
\documentclass
and the
\begin{document}
commands is called the header area or
preamble. Various control parameters, such as the layout of the
title page (if you want one) go here. The actual text of your
document begins after the \begin{document}
.
There are many packages and options which may be included with the
\usepackage
line or as an option to documentclass
. Packages can also take options, which are specified in brackets before
the package name. You can include multiple packages with a single
\usepackage
command. For example,
\usepackage[red,blue]{foo,bar}
would include the packages
foo
and bar
, giving the red
and blue
options
to both. Some of the common packages and options are:6
- doublespace
- (package) Causes the document to be doublespaced and defines
the
\doublespace
and the \singlespace
commands for
changing document spacing.
- fullpage
- (package) This is the easiest way to set normal margin
widths.7
- simplemargins
- (package) Enables commands to simplify
modifying the margins. This gives more flexibility than fullpage (see
above) but takes a little more effort to use7.
- twocolumn
- (option) Will print text in two vertical columns, side by side.
- epsf
- (package) Allows you to include Encapsulated PostScript in
your document with the
\epsfbox
command.
- times
- (package) To format the whole document in
font.
- palatino
- (package) To format the whole document in
font.
- helvetica
- (package) To format the whole document in
font.
- ncs
- (package) To format the whole document in
font.
- avantgarde
- (package) To format the whole document in
font.
- bookman
- (package) To format the whole document in
font.
- quiet
- (package) Will tell LATEX to run in ``quiet'' mode, suppressing
warning messages.
- latexsym
- (package) Allows you to use symbols that are no longer
defined by default in LATEX2e. See Figure 16 for
a list of these symbols.
Next: Title Page
Up: Creating your Document
Previous: Creating your Document
Alex Rolfe
1999-10-29