%+++++++++++++++++++++ LaTeX mode ++++++++++++++++++++++++++++++++++++++++++++
%
% latest revision by: Martin Held (held@cosy.sbg.ac.at)
%                 on: Tue Feb 24 10:48:15 MET 1998
% 
% Thomas Auer (tom@icg.tu-graz.ac.at) helped with the revision for LaTeX 2e.
%
%+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

\documentclass[12pt,fleqn]{article}

\usepackage{oldgerm}

\title{\textbf{\LaTeXe\  --- A Short Survey}}
\author{Martin Held\thanks{\texttt{held@cosy.sbg.ac.at}. 
        Thomas Auer (\texttt{tom@icg.tu-graz.ac.at}) helped with a revision 
        for \LaTeXe.} \\
        Universit\"at Salzburg \\
        Institut f\"ur Computerwissenschaften \\
        A--5020 Salzburg, Austria}
\date{February 24, 1998}

\textheight     230mm
\textwidth      165mm
\topmargin      -10mm
\oddsidemargin    0mm
\evensidemargin   0mm


\begin{document}
\bibliographystyle{alpha}
\maketitle

\section{Introduction}

This is a short survey of the \LaTeXe\ typesetting system. Please consult 
the books by Lamport \cite{Lamp94}\footnote{The so-called `\LaTeX\ Book'.}
and Goossens \textit{et al.}\ 
\cite{Goo*94}\footnote{The so-called `Companion'.} 
for detailed introductions to \LaTeXe\ and its many special-purpose packages.
For simplicity, in this short introduction we will use the logo \LaTeX\ 
when referring to \LaTeXe. However, please note that \LaTeX~2.09 is outdated
and does not support all the features offered by \LaTeXe.

Additional supporting documents can be accessed online via the author's WWW 
page 
\texttt{
http://www.cosy.sbg.ac.at/\~{ }held/teaching/anwender\_II/anwender\_II.html\#latex}.



\section{Basics of \LaTeX}
\subsection{Input Characters}

The input to \LaTeX\ is a text file. Unless stated otherwise (in a 
so-called \textit{Local Guide}, for instance), the following characters 
are the only ones that normally appear in a \LaTeX\ input file.
\begin{description}
 \item[letters:] A,\ldots,Z; a,\ldots,z; 
 \item[digits:] 0,\ldots,9;
 \item[punctuation chars:] . : ; . ? ! ` ' " ( ) [ ] - / * @
 \item[special chars:] \# \$ \% \& \_ \{ \} \verb+~ ^ \+  %$
 \item[math chars:] + = $|$ $<$ $>$
\end{description}
Note that the percent sign (\%)
is interpreted by \LaTeX\ as the start of a comment! (\LaTeX\ will ignore the
rest of a line after reading a \% 
sign.)

Similarly, all the other special characters have a special meaning for
\LaTeX. 
In order to produce any of the signs \# \$ \% \& \_ \{ \},    %$
the sign itself has to be preceded by a back slash. That is, \$ %$
is produced by means of \verb+\$+. %$

Some installations of \LaTeX\ may be able to handle German ``umlaut''
(and similar characters that do not belong to English) directly as part of
the input. However, be warned that using those characters may render your
\LaTeX\ document less portable. Thus, I personally prefer to encode 
those characters as explained in Section~\ref{sec:umlaut}.

\subsection{Preparing a \LaTeX\ Document}

A \LaTeX\ document starts with the command \verb+\begin{document}+ and ends
with the command \verb+\end{document}+. The part of the input file preceding 
the \verb+\begin{document}+ command is called the \textit{preamble}.

\begin{verbatim}
\documentclass[12pt,fleqn]{article} % Specifies the document class and the 
                                    % type size. Also, we do not want 
                                    % equations to be centered. 
                                    % The preamble begins here.
\usepackage{oldgerm}                % Enable old German fonts.
\title{\textbf{\LaTeXe\ --- 
           A Short Survey}}         % Declares the document's title.
\author{Martin Held                 % Declares the author's name.
        \thanks{\texttt{held@cosy.sbg.ac.at}.  
        Thomas Auer (\texttt{tom@icg.tu-graz.ac.at}) 
        helped with a revision for \LaTeXe.} \\
        Universit\"at Salzburg \\
        Institut f\"ur Computerwissenschaften \\
        A--5020 Salzburg, Austria}
\date{February 24, 1998}            % Deleting this command produces today's 
                                    % date.
\begin{document}                    % End of preamble and beginning of text.
\bibliographystyle{alpha}           % Specifies the style of citations.
\maketitle                          % Produces the title.

\section{Introduction}              % Declares a section.

This is a short survey of the \LaTeXe\ typesetting system. Please consult...

\bibliography{bib_file}             % Specifies bibliographical database.
\end{document}                      % End of document.
\end{verbatim}

The preamble contains declarations which globally affect the
appearance of the formatted text. Standard classes for ordinary
documents are \texttt{article, report, book, letter}, and
\texttt{slides}. By default every document is formatted for
\texttt{10pt} types.  However, \texttt{11pt} and \texttt{12pt} types
can be requested. Additional document-class options include \texttt{fleqn}
and \texttt{twoside}, among many others. We refer to the \LaTeX\ Book
\cite[pages 176--181]{Lamp94} for details.

User-defined options can be included,
too. However, in this case the environment variable \texttt{TEXINPUTS}
has to be set to the appropriate search path if a user-defined document-class
option or package is not contained in the actual working directory. E.g.,
\begin{quote}
\begin{verbatim}
setenv TEXINPUTS .:$HOME/styles//:$HOME/papers/figures:
\end{verbatim}
\end{quote}

Note that the number of spaces (or line breaks) in the input file does not 
matter. One space is as good as ten spaces. Also, \LaTeX\ only cares about
empty lines (that separate paragraphs), but does not care about how lines
are broken between consecutive non-empty lines.


\subsection{Running \LaTeX}

The typical command sequence for processing a \LaTeX\ document is as follows:
\begin{enumerate}
 \item \label{alg:start}
       Write or modify the document by means of an ASCII editor, and save
       it to a file with extension \textit{.tex}.
 \item Invoke \LaTeX, e.g.: \verb+latex foo.tex+ in order to process the
       \LaTeX\ file \textit{foo.tex}.
 \item In case of \LaTeX\ errors go back to \ref{alg:start}.
 \item Run {\sc Bib}\TeX\ if a bibliographic data 
       base\footnote{See  Section~\ref{sec:bibtex}.} is to be included.
       ({\sc Bib}\TeX\ needs to be re-run only if the contents of the
       \textit{.bbl} and \textit{.blg} files need to be changed.)
 \item Re-run \LaTeX until all symbolic labels for 
       cross-referencing\footnote{See Section~\ref{sec:crossref}.}
       are stable. (\LaTeX\ will
       tell you whether any labels have changed.)
 \item Use a previewer in order to view the \textit{.dvi} file.
       E.g., \verb+xdvi foo.dvi+ under the X11 windowing system.
 \item Back to \ref{alg:start} if changes are to be carried out.
 \item Use a device driver in order to convert the \textit{.dvi} file
       to a file that can be printed on your printer. E.g., 
       \verb+dvips -o foo.ps foo.dvi+ in order to create a PostScript file.
\end{enumerate}
Likely, you can omit most extensions when issueing \LaTeX\ commands. For
instance, the command \verb+latex foo.tex+ can often be abbreviated to
\verb+latex foo+. 


\subsection{Trouble Shooting}

Remember that \LaTeX\ is nothing but a type setting system that has to rely
on your commands. It cannot guess where you meant to insert a parenthesis
but forgot to do so! Thus, it will bark about any syntactical error that it
can detect. However, note that syntactical correctness need not imply a
logical correctness. For instance, \LaTeX\ will be perfectly happy to
set an entire book in \verb+\small+ {\small type size}, which may be different
from what you intended to do.

Here come a few guidelines for trouble shooting when \LaTeX\ did not do 
what you wanted it to do.
\begin{enumerate}
 \item Consult the \LaTeX\ Book and Companion. (Yes, indeed! No kidding.)
 \item Make sure that all parentheses occur in matching pairs. It is
       good practice to enter \verb+{}+ prior to entering anything between
       the parentheses. (Some editors support this and will automatically
       re-position the cursor.)
 \item Similarly, make sure that all \verb+\begin+ and \verb+\end+ 
       commands\footnote{See Section~\ref{sec:structure}.}
       occur in matching pairs. (Some editors support the entering of matching
       commands.)
 \item Also, all math delimiters\footnote{See Section~\ref{sec:math}.} 
       need to occur in matching pairs.
 \item Rerun \LaTeX\ frequently. The load that it will place on the CPU is
       no issue with modern computers, but it will tremendously help you
       with locating problems.
 \item At all positions where one space or empty line is allowed, several
       spaces and empty lines are allowed. It will help your first attempts
       to locate a problem if your \LaTeX\ file is formatted neatly!
 \item Recall that a \%
       sign starts a comment for \LaTeX, and that it will ignore the rest of 
       the line.
\end{enumerate}
And, again, watch your scoping commands! I really mean it --- all scoping
commands need to occur in matching pairs! Misplaced parentheses or delimiters
are the single most common cause for \LaTeX\ error messages!



\section{Commands for Structuring}
\subsection{Sectioning}
A sectional unit is begun by a sectioning command with the unit's
title as its argument.
\begin{quote}
\begin{verbatim}
\section{Commands for Structuring}
\subsection{Sectioning}
\end{verbatim}
\end{quote}
\LaTeX\ automatically generates the (sub)section numbers ---
subsections are numbered within sections. The sectioning commands 
provided by \LaTeX\ include \verb+\part+, \verb+\chapter+,
\verb+\section+, \verb+\subsection+, \verb+\subsubsection+,
\verb+\paragraph+, and \verb+\subparagraph+.  
Note that the set of commands available depends on the document class.
There is also an
\verb+\appendix+ command, which does not directly produce
text. Rather, it causes sectional units to be numbered properly for an
appendix. For omitting the numbers, add a * after the command.

\subsection{Structuring Displayed Material} \label{sec:structure}
\LaTeX\ uses a construction called \textit{environment} in order to group
portions of text that are subordinate to the surrounding text or that
function as equal units. An environment is generated by typing the
commands
\begin{quote}
\verb+\begin{+\textit{name}\} \ldots \verb+\end{+\textit{name}\},
\end{quote}
where \textit{name} denotes the name of the environment. The
\verb+\begin+ and \verb+\end+ commands delimit the scope of the
environment.

Examples for environments are given by \texttt{quote}, for making
quotations, \texttt{verse}, for doing poetry, and by
\texttt{verbatim}, which is used for simulating typed text.

\LaTeX\ provides three predefined environments for making lists:
\texttt{itemize}, \texttt{enumerate}, and \texttt{description}. In all 
three environments, each new list item is begun with an \texttt{item}
command. The following example shows an \texttt{itemize}d list:

\medskip

\begin{minipage}[t]{7cm}
\begin{itemize}
 \item A single list item.  
 \item And yet another one.
\end{itemize}
\end{minipage} \ ~~ \
\begin{minipage}[t]{8cm}
\begin{verbatim}
\begin{itemize}
 \item A single list item.
 \item And yet another one.
\end{itemize}
\end{verbatim}
\end{minipage}

\medskip

\noindent
And here comes an \texttt{enumerate}d list:

\medskip

\begin{minipage}[t]{7cm}
\begin{enumerate}
 \item A single list item.
 \item And yet another one.
\end{enumerate}
\end{minipage} \ ~~ \
\begin{minipage}[t]{8cm}
\begin{verbatim}
\begin{enumerate}
 \item A single list item.
 \item And yet another one.
\end{enumerate}
\end{verbatim}
\end{minipage}

\medskip

\noindent
In the \texttt{description} environment, the \texttt{item} command takes an optional
argument:

\medskip

\begin{minipage}[t]{7cm}
\begin{description}
 \item[Foo:] A single list item.
 \item[FooFoo:] And yet another one.
\end{description}
\end{minipage} \ ~~ \
\begin{minipage}[t]{8cm}
\begin{verbatim}
\begin{description}
 \item[Foo:] A single list item.
 \item[FooFoo:] And yet another one.
\end{description}
\end{verbatim}
\end{minipage}

\medskip

\begin{enumerate}
 \item Of course, \LaTeX\ allows to nest lists, usually up to some fixed
       depth (such as 7). 
 \item If environments are nested, e.g.\ an
       \texttt{enumerate} environment within an \texttt{enumerate}
       environment, then \LaTeX\ automatically chooses different kinds of
       labels for each list. 
 \item \begin{enumerate}
         \item There is a default numbering scheme for nested lists.
         \item Of course, you are free to change the default scheme 
               if you do not like it.
       \end{enumerate}
 \item More customized lists can be generated by using the \texttt{list} 
       environment (\cite[pages 112--115]{Lamp94}).
\end{enumerate}



\section{Type Sizes and Styles}
\subsection{Type Styles}
Most sentences, including this one, are printed in a type style called
`roman'.  Roman is \LaTeX's default type style. \LaTeX\ distinguishes
between three components that specify a type style: \textit{shape},
\textit{series}, \textit{family}, which can be combined in order to
produce more elaborate effects. Shown below are the basic type styles,
together with the declarations that turn them on. 
Quite a few more fancy typefaces and fonts (e.g., 
\textfrak{Fraktur}) are available;
consult the Companion \cite[pages 180--185]{Goo*94}.
\medskip

\noindent
\begin{minipage}[t]{7.0cm}
\textrm{This is a roman type style.} \newline
\textbf{This is a bold type style.} \newline
\textsf{This is a sans serif type style.} \newline
\textsl{This is a slanted type style.} \newline
\textsc{This is a Small Caps type style.}  \newline
\texttt{This is a typewriter type style.}  \newline
\textit{This is an italic type style.}
\end{minipage} \ ~ \
\begin{minipage}[t]{9.0cm}
\begin{verbatim}
\textrm{This is a roman type style.} 
\textbf{This is a bold type style.}
\textsf{This is a sans serif type style.} 
\textsl{This is a slanted type style.} 
\textsc{This is a Small Caps type style.}  
\texttt{This is a typewriter type style.}
\textit{This is an italic type style.}
\end{verbatim}
\end{minipage}

\medskip

The old \LaTeX~2.09 commands for changing type styles (e.g., \verb+\tt+)
still work, but the use of the new commands (e.g., \verb+\texttt+ instead
of \verb+\tt+) is encouraged.


\subsection{Type Sizes}

The following declarations select a type size and also select the
roman style of that size. They are listed below in nondecreasing size.
Note that some declarations may have the same effect, depending on the
document class and default type size used.

\begin{quote}
\begin{verbatim}
\tiny             \scriptsize         \footnotesize        \small
\normalsize       \large              \Large               \LARGE
\huge             \Huge
\end{verbatim}
\end{quote}

Of course, changes of type style and type size can be combined. For instance,
the command \verb+{\textit{\texttt{\LARGE word}}}+ produced this 
{\textit{\texttt{\large word}}}. Note, however, that you should not expect
your \LaTeX\ installation to provide all the
fonts for all imaginable combinations of type styles at all
possible type sizes. (If \LaTeX\ is set up
correctly then a program called {\sf METAFONT} will be invoked automatically
to generate
a missing font, as long as a {\sf METAFONT} source for this font is available.)



\section{Formulae, Figures, and the Like}
\subsection{Displaying Formulae} \label{sec:math}
\LaTeX\ is especially good in displaying mathematical stuff. It
provides the \texttt{displaymath} and \texttt{equation} environments
for displaying formulae. These environments are the same except that
\texttt{equation} numbers the formulae and \texttt{displaymath}
doesn't. For shorthand, \verb+\[+ \ldots \verb+\]+ may be typed
instead of \verb+\begin{displaymath}+ \ldots \verb+\end{displaymath}+.

\medskip

\label{sec:eq:foo}
\label{pg:eq:foo}
\begin{minipage}[t]{6.4cm}
\[ x' + y^{2} = z_{i}^{2} \]
\begin{equation} \label{eq:foo}
   x' + y^{2} = z_{i}^{2}
\end{equation}
\end{minipage} \ ~ \hspace{0.8cm} ~ \
\begin{minipage}[t]{6.8cm}
\begin{verbatim}
\[ x' + y^{2} = z_{i}^{2} \]
\begin{equation} \label{eq:foo}
   x' + y^{2} = z_{i}^{2}
\end{equation}
\end{verbatim}
\end{minipage}

\medskip

A formula that appears in the running text, a so-called in-line
formula, is produced by the \texttt{math} environment. For shorthand,
this environment can be invoked and delimited by
\verb+\(+~\ldots\verb+\)+ or by \$ \ldots\$. Another way for producing
an in-line formula is the \verb+\ensuremath+ command. It is especially
useful for defining a command (cf.\ Section~\ref{sec:commands}) that
can appear in both normal text and formulae. 

Subscripts and superscripts are made with the \_ and \verb+^+
commands.  Fractions are denoted by the / symbol. Large fractions may
also be displayed using the \verb+\frac+ command. A lot of
mathematical symbols can be generated by typing commands that are
related to the English names of the symbols.

\medskip

\begin{minipage}[t]{5cm}
\[ x_{1}^{y^{2}}  \]
\end{minipage} \ ~ \hspace{0.7cm} ~ \
\begin{minipage}[t]{9cm}
\begin{verbatim}
\[ x_{1}^{y^{2}}  \]
\end{verbatim}
\end{minipage}

\begin{minipage}[t]{5cm}
\[ \frac{x + y/2}{x - \frac{y}{z+1}} \]
\end{minipage} \ ~ \hspace{0.7cm} ~ \
\begin{minipage}[t]{9cm}
\begin{verbatim}
\[ \frac{x + y/2}{x - \frac{y}{z+1}} \]
\end{verbatim}
\end{minipage}

\begin{minipage}[t]{5cm}
\[ \sum_{i=1}^{n} \sqrt{x_{i}} \]
\end{minipage} \ ~ \hspace{0.7cm} ~ \
\begin{minipage}[t]{9cm}
\begin{verbatim}
\[ \sum_{i=1}^{n} \sqrt{x_{i}} \]
\end{verbatim}
\end{minipage}

\begin{minipage}[t]{5cm}
\[ \lim_{n \rightarrow \infty} 1/n = 0 \]
\end{minipage} \ ~ \hspace{0.7cm} ~ \
\begin{minipage}[t]{9cm}
\begin{verbatim}
\[ \lim_{n \rightarrow \infty} 1/n = 0 \]
\end{verbatim}
\end{minipage}

\begin{minipage}[t]{5cm}
\[ \int_{0}^{1} x \sin 1/x \, dx \]
\end{minipage} \ ~ \hspace{0.7cm} ~ \
\begin{minipage}[t]{9cm}
\begin{verbatim}
\[ \int_{0}^{1} x \sin 1/x \, dx \]
\end{verbatim}
\end{minipage}

\medskip

\noindent
All these formulae have been generated as off-line formulae. The
following example demonstrates the effect of replacing \$ \ldots\$ by
\verb+\[+ \ldots\verb+\]+:
$ \sqrt{\lim_{n \rightarrow \infty} \int_{-n}^{n} \frac{1}{x^{2}} \sin x \, dx} $;
and off-line: 
\[ \sqrt{\lim_{n \rightarrow \infty} \int_{-n}^{n} \frac{1}{x^{2}} \sin x \,
dx. }\]
And this is the corresponding math code (without \$ \ldots\$ or
\verb+\[+ \ldots\verb+\]+):
\begin{verbatim}
\sqrt{\lim_{n\rightarrow\infty} \int_{-n}^{n} \frac{1}{x^{2}} \sin x \, dx}.
\end{verbatim}
Note that symbols like $\int$ are variable-sized. Their sizes
do not only depend on the type size used but also on whether they are
displayed in-line, i.e.\ within \$ \ldots\$, or off-line, i.e.\ within
\verb+\[+ \ldots\verb+\]+.
\LaTeX\ supports a variety of special mathematical symbols, see
\cite[pages 41--44]{Lamp94}. Those symbols include 
\begin{itemize}
 \item \textit{(binary) operation symbols}, e.g.\ $\pm$ (\verb+$\pm$+),
   $\cap$ (\verb+$\cap$+), and $\cup$ (\verb+$\cup$+);
 \item \textit{relation symbols}, e.g.\ $\leq$ (\verb+$\leq$+), $\subset$
       (\verb+$\subset$+), and $\propto$ (\verb+$\propto$+);
 \item \textit{arrow symbols}, e.g.\ $\leftarrow$ (\verb+$\leftarrow$+),
       $\Rightarrow$ (\verb+$\Rightarrow$+), $\mapsto$
       (\verb+$\mapsto$+);
 \item \textit{miscellaneous symbols}, e.g.\ $\aleph$ (\verb+$\aleph$+),
       $\forall$ (\verb+$\forall$+), and $\exists$ (\verb+$\exists$+);
 \item \textit{delimiters}, e.g.\ $\{$ (\verb+$\{$+), $\lfloor$
       (\verb+$\lfloor$+), $\rangle$ (\verb+$\rangle$+).
\end{itemize}
Observe that all these symbols can only be used in the so-called math
mode, i.e., within the scope of \$ \ldots\$ or \verb+\[+
\ldots\verb+\]+.

Delimiters can also be used in multi-line formulae. The commands 
\verb+\left+ and \verb+\right+ are used in order to make them `fit around'.
\begin{quote}
\begin{verbatim}
\[   \vec{a} + \vec{b} = \left(   
                         \begin{array}{c} c_{x} \\ c_{y} \end{array} 
                         \right\}        \]   
\end{verbatim}
\end{quote}
This piece of code produces the following multi-line formula.
\[ \vec{a} + \vec{b} = \left(   
                       \begin{array}{c} c_{x} \\ c_{y} \end{array} 
                       \right\}        \]   
For coding sequences of equations it is convenient to use the \texttt{eqnarray}
environment, which is very much like a special three-column \texttt{array}
environment in math mode.
\begin{eqnarray}
   x        &   =    &  2y - 3z \\
   5x + 7y  &  \geq  &  a + b + c + d + e + f + g + h + i + \nonumber \\
            &        &  j + k + l + m + n + o + p + q
\end{eqnarray}
\begin{verbatim}
\begin{eqnarray}
   x        &   =    &  2y - 3z \\
   5x + 7y  &  \geq  &  a + b + c + d + e + f + g + h + i + \nonumber \\
            &        &  j + k + l + m + n + o + p + q
\end{eqnarray}
\end{verbatim}

Note that the alignment is handled by \LaTeX. You can put \verb+\tiny+
around the \verb+eqnarray+ construct, and it will again be aligned properly:

{\tiny
\begin{eqnarray}
   x        &   =    &  2y - 3z \\
   5x + 7y  &  \geq  &  a + b + c + d + e + f + g + h + i + \nonumber \\
            &        &  j + k + l + m + n + o + p + q
\end{eqnarray}
}

\LaTeX\ is also good in producing Greek and other (foreign)
letters. The command for producing a Greek letter is obtained by
placing a \verb+\+ in front of the name of the letter. For instance,
\verb+$\gammma$+ produces a $\gamma$.  Uppercase Greek letters are
generated by capitalizing the first letter of the command name, as
long as the uppercase Greek letter is not the same as its roman
equivalent. For instance, \verb+$\Gamma$+ produces $\Gamma$.

\subsection{Figures}
Since pictures and tables cannot be split at page breaks \LaTeX\
provides two environments, \texttt{figure} and \texttt{table}, that
can float to convenient places, such as the top of a page. The
\texttt{figure} environment is generally used for pictures and the
\texttt{table} environment for tabular information.  However, \LaTeX\
does not really care what these environments are used for. As far as
it is concerned, it tries to find suitable positions, as long as
possible, for placing their contents without generating half-empty
pages.
\begin{quote}
\verb+\begin{figure}[!tbph]+ \newline
The body of the figure goes here. You may want to leave
some space by using the \verb+\vspace{...}+ command. \newline
\verb+\caption{+The caption goes here.\} \newline
\verb+\end{figure}+ \newline
\end{quote}
\LaTeX's decision where to place a floating object can be influenced
by specifying any combination of the parameters \texttt{t, b, p} and
\texttt{h}, where \texttt{t} means that you suggest to place the
figure at the top of the (following) page, relative to the position of
the text around the place where you have specified the figure in your
input file. Similarly, \texttt{b} stands for bottom. A \texttt{p}
indicates that \LaTeX\ is allowed to generate an extra page of floats,
which does not contain any text. If you are really keen on having the
figure put exactly where you have specified it, you may want to try
\texttt{h} --- for `here'; \LaTeX\ sometimes even cares about your
wishes. If you add a \texttt{!} to the location, \LaTeX\ tries harder
to satisfy your request.

The \texttt{table} environment works similarly to the \texttt{figure}
environment. The major difference between both environments is how
they are captioned: the figure's caption is below the body of the
figure whereas the table's caption goes above the table. 

For creating
simple pictures within a figure, the \texttt{picture} environment may
be used. However, the creation of pictures is not a real highlight of
\LaTeX\ and it is usually better to import pictures created by some
other system. As long as pictures are imported in `encapsulated
PostScript' style, \LaTeX\ automatically takes care of the amount of
height needed by the picture. An encapsulated PostScript figure is
imported by the following commands, typically placed into the body of a
figure.
\begin{quote}
\begin{verbatim}
\begin{center}
\epsfig{file=name_of_file.eps,width=8.3cm}
\end{center}
\end{verbatim}
\end{quote}
Note, however, that the \texttt{epsfig} package must be included by
putting \verb+\usepackage{epsfig}+ into the preamble.
For our example, the figure will be scaled to fit into a horizontal
space with width 8.3cm. Similarly, it can be scaled to fit into a
prescribed vertical space. The \texttt{width} or \texttt{height} command
is optional; omitting it causes \LaTeX\ to reproduce the figure at
its original size.

\subsection{How to Align Text in Columns}
For aligning text in columns, \LaTeX\ offers the \texttt{tabbing} and the 
\texttt{tabular} environments. In the \texttt{tabbing} environment, text is 
aligned by
explicitly setting tab stops, as it is done with an ordinary typewriter. 
Tab stops are set using the \verb+\=+ command, and \verb+\>+ moves to the next
tab stop. Lines are separated by the \verb+\\+ command. For example,
\begin{quote}
\begin{verbatim}
\begin{tabbing}
Bears: \= Kodiak Bear \= (Kodiak Island), \kill \\
Bears: \> Polar Bear  \> (Artic Region),\\
       \> Kodiak Bear \> (Kodiak Island), \\
       \> Grizzly     \> (Western US, Canada).
\end{tabbing}
\end{verbatim}
\end{quote}
produces the following listing:
\begin{quote}
\begin{tabbing}
Bears: \= Kodiak Bear \= (Kodiak Island), \kill \\
Bears: \> Polar Bear  \> (Artic Region),\\
       \> Kodiak Bear \> (Kodiak Island), \\
       \> Grizzly     \> (Western US, Canada).
\end{tabbing}
\end{quote}

\medskip

The \texttt{tabular} environment is somewhat similar to the \texttt{tabbing} 
environment. Columns are separated by \&, and an input line is ended by
\verb+\\+. Frames can be made by requesting horizontal and vertical lines to
be drawn by means of specifying \verb+\hline+ and $|$. For example,

\begin{quote}
\begin{verbatim}
\begin{table}[htb]
\begin{tabular}{||l|c|r||} \hline
\multicolumn{3}{||c||}{Bears of the World} \\ \hline \hline
Bears & Polar Bear  & (Artic Region) \\ \hline
      & Kodiak Bear & (Kodiak Island) \\ \cline{2-3}
      & Grizzly     & (Western US, Canada) \\ \hline \hline
\end{tabular}
\end{table}
\end{verbatim}
\end{quote}

\noindent produces the following table.

\begin{table}[htb]
\begin{tabular}{||l|c|r||} \hline
\multicolumn{3}{||c||}{Bears of the World} \\ 
\hline \hline
Bears & Polar Bear  & (Artic Region) \\ \hline
      & Kodiak Bear & (Kodiak Island) \\ \cline{2-3}
      & Grizzly     & (Western US, Canada) \\ 
\hline \hline
\end{tabular}
\end{table}


\section{German and Other `Foreign Languages'} \label{sec:umlaut}
\subsection{German}
\LaTeX\ was originally designed for English. It does not support any
other languages on its own. However, as far as German is concerned, a
minimal subset of standardized commands for German has been agreed
upon. 
\begin{itemize}
 \item \verb+\"a+ or \verb+"a+ produces \"a;
 \item \verb+\ss+ or \verb+"s+ produces \ss ;
 \item \verb+"`+ and \verb+"'+ produce German left and right double quotes.
\end{itemize}
However, one should note that \LaTeX\ does not hyphenate German words
correctly without being supplied with German hyphenation patterns!
For extended language support -- such as hyphenation patterns, names of
document elements, etc. -- \LaTeX2e\ provides the package
\texttt{babel}, with option \texttt{austrian} for replacing English
dates (etc.) by the equivalent Austrian versions.

\subsection{Special Symbols}
Cyrillic, Hebrew and a lot of other special-language character sets can be 
produced similarly to producing Greek characters, provided that the fonts 
required for actually generating them are available. 

Special symbols from other languages are produced similarly to German symbols.
For instance, \verb+\'e+ produces \'e, \verb+\~n+ results in \~n, and
\verb+\c{c}+ yields \c{c}. \LaTeX\ also supports a variety of other special
characters, such as \copyright\ (\verb+\copyright+), \S\ (\verb+\S+), and
\pounds\ (\verb+\pounds+).


\section{Cross-referencing}
\subsection{Table of Contents and the Like} \label{sec:crossref}
\LaTeX\ automatically generates a table of contents and similar
cross-references if asked to do so. The command \verb+\tableofcontents+
tells \LaTeX\ where to put the table of contents within the
document. Note that it requires two runs in order to generate a
correct table of contents. In the first run \LaTeX\ extracts all
necessary sectional information and writes it to a file with extension
\texttt{.toc}. When invoked for the second time, it reads this file and
generates a table of contents according to the layout arranged in the
previous run.  Besides, it issues a warning message if the actual
sectional information does not correspond to the old table of contents
read from the \texttt{.toc} file.

The commands \verb+\listoffigures+ and \verb+\listoftables+ produce a
list of figures and a list of tables, respectively. They work just
like the \verb+\tableofcontents+ command, except that files with
extensions \texttt{.lof} and \texttt{.lot} are involved.

\subsection{References to Displayed Material}
Nearly every numbered environment can be referred to after a \textit{key}
has been assigned to it. A key is assigned by means of the
\verb+\label{+\textit{key}\} command, which can be put anywhere within the
scope of the environment to be referenced, and where \textit{key} is the
symbolic key. Reference is made by means of the \verb+\ref{+\textit{key}\}
command. As in the case of generating a table of contents, \LaTeX\
needs two runs and one additional file, with extension \texttt{.aux},
for generating correct references.

For instance, recall that our first numbered equation was
Equation~\ref{eq:foo}, which appeared in Section~\ref{sec:eq:foo} on
Page~\pageref{pg:eq:foo}. The labels for these references have been
generated by putting \verb+\label{eq:foo}+ within the environment of
the equation to be referenced, and by putting
\verb+\label{sec:eq:foo}+ and \verb+\label{pg:eq:foo}+ immediately in
front of it.  These labels are referenced by means of
\verb+\ref{eq:foo}+, \verb+\ref{sec:eq:foo}+, and
\verb+\pageref{pg:eq:foo}+.


\subsection{B{\small IB}\TeX} \label{sec:bibtex}
A citation is a cross-reference to another publication, such as a
book. With \LaTeX\, you can use a separate program called {\sc
Bib}\TeX\ to generate bibliographical data from information stored in
a bibliographical database, i.e.\ in a collection of files with
extensions \texttt{.bib}. If the bibliographical database is not
contained in your actual working directory then you may want to inform
\LaTeX\ where to find this database by setting the environment
variable \texttt{BIBINPUTS} to the appropriate search path, e.g., 
\begin{quote}
\begin{verbatim}
setenv BIBINPUTS .:$HOME/papers/biblio//
\end{verbatim} %$
\end{quote}
The following example shows a sample entry to a \texttt{.bib} file.
\begin{quote}
\begin{verbatim}
@string{AW     = "Addison-Wesley"}
@book{Lamp94,
        author={L. Lamport},
        title={\LaTeX. A Document Preparation System},
        publisher=AW,
        note={ISBN 0-201-52983-1},
        edition={2nd},
        month=nov,
        year=1994}
\end{verbatim}
\end{quote}

When calling {\sc Bib}\TeX, the information requested by \verb+\cite+
commands is extracted from the bibliographical database and is stored
in two files with extensions \texttt{.bbl} and \texttt{.blg}. As long
as the bibliographical database is not changed and no new \verb+\cite+
commands are added, these two files correctly represent the
bibliographical data needed for making citations.  As with all other
symbolic pointers \LaTeX\ needs two runs in order to have all
references established.

For every cited reference, a bibliography entry is extracted from the 
\texttt{.bib} file, and neatly formated. The placement of the bibliography
is controlled by the placement of the 
\verb+\bibliography{+\textit{bib\_file}\}
command within the \LaTeX\ file. (Here, \textit{bib\_file.bib} is the name
of a file containing the bibliographical data.)

A detailed explanation of {\sc Bib}\TeX\ is out of the scope of this
survey.  For additional information on \LaTeX\ and {\sc Bib}\TeX\ you
may want to consult the \LaTeX\ Book \cite[pages 155--164]{Lamp94}, 
which has been cited by the command \verb+\cite[pages 155--164]{Lamp94}+.


\section{Doing It Yourself}
\subsection{Theorems and the Like}
Theorems can be produced neatly, too. \LaTeX\ provides a
\verb+\newtheorem+ declaration in order to define environments for
particular theorem-like environments.

\medskip

\newtheorem{hypothesis}{Hypothesis}

\begin{minipage}[t]{5.8cm}
\begin{hypothesis}[Murphy] \label{hyp:murphy}
There is always one error lefft.
\end{hypothesis}
\end{minipage} \ ~ \
\begin{minipage}[t]{8.9cm}
\begin{verbatim}
\newtheorem{hypothesis}{Hypothesis}
\begin{hypothesis}[Murphy]
\label{hyp:murphy}
There is always one error lefft.
\end{hypothesis}
\end{verbatim}
\end{minipage}

\bigskip

\noindent
Like other numbered environments, theorems can also be referenced, and
this sometimes even works in spite of Hypothesis~\ref{hyp:murphy}, which
has been referenced by means of \verb+\ref{hyp:murphy}+.

\subsection{Defining Commands and Environments}
\label{sec:commands}
The layout of a document heavily depends on the document-class options
and add-on packages used for formatting it. These optional packages 
contain a myriad of control parameters, environments, and the like, which 
all can be modified individually in order to fit special purposes. However, 
this is the hard way of forcing \LaTeX\ to modify its formatting strategies, 
i.e., this is the domain of \LaTeX\ wizards! And if all else fails, you can
still use plain \TeX\ commands --- this is the really hard way and
asking a \TeX\ guru is recommended!

The easier way to modify \LaTeX's way of formatting is to use the
\verb+\newcommand+ and \verb+\newenvironment+ commands, which allow to
define new commands and environments based on already existing
ones. Once again, reference is given to \cite{Lamp94}. Another easy
alternative is to use one of
the many existing packages, see \cite{Goo*94}.


\bibliography{bib_file}

\end{document}
