This section describes how to typeset a simple paper in the standard way for processing by LATEX. All of the information here is also presented elsewhere in this document, but with a lot more detail; think of this section as ``the short form'' to using LATEX.
The first thing you need to do is to create your LATEX source file.
This file contains all the text for your paper as well as LATEX
commands (to be described shortly). You can use any editor you wish
to create the file; documentation on how to use text editors is
available from Athena. Emacs includes special code set up to make
using LATEX easier, and is a good first choice. You can name your
LATEX file anything you wish; the only requirement is that it end
with the four characters .tex
.
The general format of a LATEX file is shown in the following example.
\documentclass{article} \usepackage{doublespace} \usepackage{fullpage} \title{A Sample Paper} \author{Melissa I. Thompson} \date{\today} \begin{document} \maketitle It was a dark and stormy night, and all of the Athena fileservers had crashed. Poor me, I had to write a paper for one of my HASS-D classes. Luckily, I was able to use a wonderful text formatting program called \LaTeX{}, and everything worked out fine. \end{document}
Here is a description of each part.
\documentclass
command. This command tells LATEX the
general style of your document as well as the style ``options'' you wish
to use. The word in between curly braces ({
and }
) is the
main style. You can specify options for the style in square brackets before
the main style. For example, \documentclass[12pt]{article}
would
use article document class in 12 point type.
usepackage
commands specifies additional packages or
styles to use. For example, the doublespace
package tells LATEX
to doublespace your document, and the fullpage
option says to set
the margins so you have one inch of blank space on all sides. You can
supply options to these packages as well in the same way that you did to
the main package (ie, in square brackets).
\title
, \author
, and \date
commands are
used to specify the title, author and creation date of the document.
The default date is \today
(meaning that you don't need to give
the \date
command if you just want to use the current date).
\begin{document}
line marks the beginning of the
`main' part of the document. The section before this line is called
the preamble. More on this later.
\maketitle
line tells LATEX to insert a title page
in the beginning of your document. The data from each of the
\title
, author
, and \date
commands is used here.
\LaTeX{}
is a special command in LATEX, used to
represent the appropriate magic so that you see ``LATEX'' instead
of ``LaTeX''.
\end{document}
line marks the end of the main part of
the document. In LATEX, something between
\begin{
foo}
and \end{
foo}
is
said to be in the foo environment (more on environments later).