\documentclass[12pt]{article}

\usepackage{psfig}

% I want to put a figure in this document.  Before
% I do I need to tell latex which style file to 
% use.  Here I will use psfig.  (I could also use
% epsfig if all my graphics files are encapsulated
% postscript.)


\oddsidemargin=0.0in
\evensidemargin=0.0in
\textwidth=6.0in
             
\topmargin=0.0in
\textheight=8in

\newcommand{\lat}{\LaTeX}


% In this file I will give a few simple examples 
% of how to do some useful things.  I will do
% things like create a title page, make a few
% lists, put in a postscript file, and make a
% bibliography.  I will not go into a great 
% deal of detail but will give the examples.



\begin{document}


% Create a title page using the titlepage environment
\begin{titlepage}


\large
\begin{center}
Miscellaneous \lat\  Environments
\end{center}


\vspace{0.5in}

\normalsize
\begin{center}
Kelly Black, Ph.D.\footnote{(PinHeaD.)} \\
University of New Hampshire\footnote{
Where hockey rinks are more important than faculty.} \\
\  \\
\today
\end{center}

\vspace{0.5in}

\begin{abstract}
A brief introduction into some useful environments for use with the
\lat\  typesetting program are presented.  Included in these
environments is the title page, various lists, figures, and a
bibliography.  This paper is meant to compliment the previous series
of guides on the typesetting program.  Rather than explain how the
environments are used, examples are presented and the student is free
to use these templates in whatever way is appropriate.
\end{abstract}



\end{titlepage}

% Create a table of contents.
\tableofcontents

% Create a list of the figures.
\listoffigures

% Create a list of the tables.
\listoftables

% How about a page break to separate things.
\clearpage

% Let's start this thing up and see what comes out...
\section{Misc. stuff}
\label{intro}
Some examples will be given of some other useful things
that have not been given in the other files.  I will
assume that you have looked over the other files and
have an idea as to what is going on.  The examples 
that will be given will not be explained in detail
but will merely serve to give you an idea of some of
the things that you can do in latex.  A partial list
of some these things includes the following:
\begin{itemize}
\item Creating a title page,
\item Making a list,
\item Including a figure,
\item Creating a table,
\item Creating a list of contents and such,
\item Using a bibliography.
\end{itemize}

\section{A Few Things}
I will cover the rest of the things in this section.
In section \ref{intro} I introduced how to use one 
kind of list environment and a title page is included
at the beginning of the text.  I will divide the other
things I would like to demonstrate into the remaining
subsections.

% I will section this text using the section commands.
% Here I will only use subsections to sections, but you
% should know that you can also use subsubsections as 
% as well.  If you use books style rather than article
% you can also use chapters as well.  

\subsection{Tables}
There are times when I would like to create a table to display some
information in a nice organized way.  For example, I may want to share
with you some of my favorite math functions and let you know why I
like them.  One way to do this is through the use of a table.  In fact
Table \ref{functions} is just such a table!  I knew that you would
be thrilled.  


% Lets create a table.  First I will start the table
% environment to let latex know how I want it labeled.
% This will also keep things straight in my list of
% tables. The [hbpt] tells latex my preferences where
% to print the table, here, bottom, next page, or top
% (in that order).

% Once in the table environment I will use the tabular
% environment to let latex know how I want to line 
% things up.  To start tabular I have to let latex
% know how to line things up and which format to use.
% The {|r|cl|} is used to do this.  On each line of 
% the tabler I print a vertical line, right justify the
% text, print a vertical line, center the text, left
% justify the text, and print a vertical line.
% I will use the multicolumn command to override.


\begin{table}[hbpt]
\begin{tabular}{|r|cl|}
\hline
\multicolumn{3}{|c|}{My favorite functions} \\
\hline
Type & Function & Comment \\ \hline
Trig & $\cos(x)$ & It's periodic but odd at the same time. \\ \hline
Exponential & $\ln(x)$ & Yoda would like this function, backwards
                         works it does. \\ \hline
Polynomial & $\frac{3x^2-1}{2}$ & Second Legendre polynomial,
                         always a big hit at parties. \\ \hline
\end{tabular}
\caption{Some of my favorite functions and why.}
\label{functions}
\end{table}

\subsection{Figures}
Tables are nice, but printing a postscript file in with your
text is more important (in my own humble opinion).  Fortunately,
\lat\ will let you do this.  Here I am using the psfig command
to print the picture.  It will automatically read the plot,
figure out how big it is and print it out.  You should be 
careful since this is not a ``standard'' feature.  The psfig
command is something that somebody else added since it is
very useful.  The bad news is that not everybody has this little
gem.  Because it is so useful most installations do have it.
If you find yourself using a version that does not you should
raise hell until somebody installs it.  It is far too useful!


If you don't believe me just look at Figure \ref{twodtest}.
It certainly is a fine picture.  I could look at it all 
day $\ldots$ One quick note for UNH is in order here.  If
you include a postscript picture you {\em cannot} print
it on the Kodak printer using the dvi options.  You must
print it on the postscript printer and use dvips to do so.

One other quick note about maple postscript files.  If you
use a postscript file generated by postscript psfig may not
give you the correct size.  This is because maple does not
create a proper encapsulated postscript file (say that
three times fast).  If you have a maple plot and it does
not print out correctly using psfig you will have to edit
the file.  To make things right edit the file and replace
the line with the bounding box so that it looks like this,
\begin{verbatim}
%%BoundingBox:  0 0 612 792
\end{verbatim}
This line is about 6 or 7 lines from the top.


\begin{figure}[htbp]
\centerline{\psfig{file=sine.eps,height=3.0in}}
\caption{This here is a figure of a curve.}
\label{twodtest}
\end{figure}



\subsection{Lists}
I have already given an example of one kind of list using the
itemize environment.  A complete list is given below \cite{lamport}:
\begin{enumerate}
\item The itemize list.
\item An enumerate list.
\item A description list.
\end{enumerate}
The different types of lists are described below 
\cite[p. 65]{lamport}:
\begin{description}
\item[itemize]     Lists each item with a $\bullet$.
\item[enumerate]   Gives a numbered list.
\item[description] Used to describe the members of a list.
\end{description}


You can also put a list inside a list.  If you use
enumerate it will even keep track of the numbers for you:
\begin{enumerate}
\item Top Five Reasons to take Calculus:
    \begin{enumerate}
     \item Annoy roommate when pulling all-nighters.
     \item At 8:00AM it's too dark for volleyball.
     \item Three words: The chain rule.
     \item Can learn how to use $\Sigma$\  without 
           referring to alcohol.
     \item Can impress date with knowledge of the limit.
     \end{enumerate}
\item Top Five Worst Reasons to take Calculus:
     \begin{enumerate}
     \item Would like to learn how to use that spiffy calculator.
     \item If you have to spend a lot of money on a book it should
             at least be a really thick book, damnit.
     \item Would like to learn new French and German names to
             impress people at parties.
     \item Satisfies the liberal arts school's requirement
           for ``class that requires that you know how to  count''.
     \item Morning class is motivation to go get breakfast 
           before they run out of those pancakes.
     \end{enumerate}
\end{enumerate}


\subsection{Window Dressings}
Since some of you may actually like having a typesetting
program around, I thought I might like to share some
of the little things that help round out the \lat\ program.
For example, I often use \lat\ for letters.  When I want
to write one of my colleagues, Einar Ronqui\o st, I need
to know how to use some extra characters.  Other non-English
characters include the following: \oe, \OE, \ae,
\AE, \aa, \AA, \o, \O, \l, \L, \ss,
?`, !`.

People from foreign lands also like to use accents which
are not included on the standard keyboard.  To get around
this \lat\ has some commands for \`{a}ccents.  See Table
\ref{accents} for a list \cite[p. 40 (blatant rip-off)]{lamport}
and Table \ref{mathaccents} for a list of accents for use
in math mode \cite[p. 51]{lamport}.

\newcommand{\bs}{$\backslash$}
\begin{table}[hbpt]
\begin{tabular}{r @{-} l @{\hspace{0.5in}} r @{-} l  @{\hspace{0.5in}}
                r @{-} l @{\hspace{0.5in}} r @{-} l }
\`{a} & \bs `\{a\} & 
\~{a} & \bs \~\{a\} & 
\v{a} & \bs v\{a\} & 
\c{o} & \bs c\{o\}  \\
\'{a} & \bs '\{a\} & 
\={a} & \bs =\{a\} & 
\H{a} & \bs H\{a\} & 
\d{o} & \bs d\{o\}  \\
\^{a} & \bs \^\{a\} & 
\.{a} & \bs .\{a\} & 
\t{aa} & \bs t\{aa\} & 
\b{o} & \bs b\{o\}  \\
\"{a} & \bs "\{a\} & 
\u{a} & \bs u\{a\} 
\end{tabular}
\caption{Some accents for you to use.}
\label{accents}
\end{table}

\begin{table}[hbpt]
\begin{tabular}{r @{-} l @{\hspace{0.5in}} r @{-} l  @{\hspace{0.5in}}
                r @{-} l @{\hspace{0.5in}} r @{-} l }
$\hat{u}$   & \bs hat\{u\} & 
$\acute{u}$ & \bs acute\{u\} & 
$\bar{u}$   & \bs bar\{u\} & 
$\dot{u}$   & \bs dot\{u\}  \\
$\check{u}$ & \bs check\{u\} & 
$\grave{u}$ & \bs grave\{u\} & 
$\vec{u}$   & \bs vec\{u\} & 
$\ddot{u}$  & \bs ddot\{u\}  \\
$\breve{u}$ & \bs breve\{u\} & 
$\tilde{u}$ & \bs tilde\{u\}
\end{tabular}
\caption{Some accents for you to use in math mode.}
\label{mathaccents}
\end{table}



% Since the bibliography appears at the end of the
% document that is where we define it.  When you
% make a change down here you may have to run latex
% twice to propagate the changes you made.

% The longest label that I will use is '99'
% (i.e. no more than 99 entries
\begin{thebibliography}{99}

\bibitem{abrahams} Abrahams, Paul W., Karl Berry, and Kathryn A.
Hargreaves.  {\em \TeX\ for the Impatient}.  Addison-Wesley 
Publishing Company, Reading MA, USA, 1990.


\bibitem{lamport} Lamport, Leslie.  {\em \LaTeX:A Document Preparation 
System}.   Addison-Wesley Publishing Company, Reading MA, USA,
1986.

\bibitem{thomas} Thomas, George B. Jr., and Ross L. Finney.
{\em Calculus and Analytic Geometry}, 8$^{th}$\ ed.  Addison-Wesley Publishing
Company, Reading MA, USA, 1992.

\end{thebibliography}



\end{document}
