\documentclass[12pt]{project}

% the following is needed to include the graphics
\usepackage[dvips]{graphics,color}


\title{More Complex Document}
\author{Janet Tomas \\ cs3ea3bz \\ 9303154}

\begin{document}

\maketitle

\abstract

This gives you space for an abstract before the table of contents, 
numbered with Roman numerals.  


\tableofcontents
\listoffigures

\chapter{Introduction}

This will be a document with more interesting features of \LaTeXe 
displayed.  

\section{Special Characters}

There are some special characters in \LaTeXe that cannot be used 
directly, you must put a slash in front of them.  They are: \$, \&, \%, 
\#, \_, \{, and \}.  \$ is used to indicate the beginning and end of a 
mathmatical formula that will appear as part of the text, such as $ xy + 
x^2$. The \& symbol is used in the table environment to indicate the end 
of a column.  \% indicates comments etc.  

\section{Italics and Such}

There are new font declarations which are probalby more powerful, but the 
old ones are very simple, and probably all you will ever need.  You have 
{\bf bold face text}, {\tt typewriter text}, {\it italic text}, {\sl 
slanted text}, and {\sc small caps}, to name a few. 

\chapter{Lists}

Lists look nice and help keep your text simple.  There are a few 
different types of lists, but they are all implemented in the same way.

\section{{\sc itemize }}

To get a list that just has bullets you do use

\begin{itemize}

\item This is the first item
\item this is the second

\item I think you get the picture.  I will keep on writing to show you 
what you get when the  line is long.
 
\end{itemize}


\section{{\sc enumberate }}

The command is almost the same, but now you get a numbered list.

\begin{enumerate}

\item This is the first item
\item this is the second

\item I think you get the picture.  I will keep on writing to show you
what you get when the  line is long.

\end{enumerate}

\section{Nesting Lists}

You can nest the lists and the bullets and numbering system will change 
appropriately.  You can also nest lists of different types.

\subsection{Nesting {\sc itemize}}

\begin{itemize}

\item This is the first item of the first list

    \begin{itemize}
    \item this is the first item of the second list.
    \item Now lets try to nest another

        \begin{itemize}
        \item This looks really ugly in ASCII, but it's not too hard to keep 
              track of if you indent.  Also, I've put spaces in so that the 
              text is lined up with the item command, in this example,  
              and \LaTeXe ignores the spaces.
        \end{itemize}
    \end{itemize}

\item this is the second

\item I think you get the picture.  I will keep on writing to show you
what you get when the  line is long.

\end{itemize}

\subsection{Nesting with {\sc enumberate}}

The same list using enumerate...

\begin{enumerate}

\item This is the first item of the first list

    \begin{enumerate}
    \item this is the first item of the second list.
    \item Now lets try to nest another

        \begin{enumerate}
        \item This looks really ugly in ASCII, but it's not too hard to keep
              track of if you indent.  Also, I've put spaces in so that the
              text is lined up with the item command, in this example,
              and \LaTeXe ignores the spaces.
        \end{enumerate}
    \end{enumerate}

\item this is the second

\item I think you get the picture.  I will keep on writing to show you
what you get when the  line is long.

\end{enumerate}


\subsection{Nesting with Both}

Now let's mix-and-match

\begin{enumerate}
    
\item This is the first item of the first list

    \begin{itemize}
    \item this is the first item of the second list.
    \item Now lets try to nest another

        \begin{enumerate}
        \item This looks really ugly in ASCII, but it's not too hard to keep
              track of if you indent.  Also, I've put spaces in so that the
              text is lined up with the item command, in this example,
              and \LaTeXe ignores the spaces.
        \end{enumerate}
    \end{itemize}

\item this is the second
    
\item I think you get the picture.  I will keep on writing to show you
what you get when the  line is long.  

\end{enumerate}

\chapter{figures}

You can draw line drawings, tables, text boxes and graphics.  The line 
drawings can be simple or quite complex.  However, it is not very easy.  
I will show you tables, text boxes and how to easily include a graphic.

\section{tables}

Tables in \LaTeX, as in HTML, can be a pain.  After the standard begin 
command you include, in curly brackets, the number of columns and the 
lines to be drawn between these columns.  For example "ccrcl" would 
indicate 5 colums where in the first two the text is centered, the third 
has right justified and the last one is left justified.  If you wanted 
double lines for the outside of the table and single lines inside it you 
would use the string "$\mid \mid$ c $\mid$ c $\mid$ r $\mid$ c $\mid$ l 
$ \mid \mid$"

When writing the data into the tables it is done row by row.  \& is used 
to indicate a new column and double slash to indicate the start of a new 
row. 

\begin{tabular}{ccrcl}
 First Name & Last Name & age & Male/Female & Comments \\
Holly & Smith & 12 & F & This is a table \\
John & Dodd & 74 & M & I don't have anything to say \\
 & Silva  & ? & M & New born, don't have a name yet.\\
\end{tabular}

Now to make it a little fancier.

\begin{tabular}{||c|c|r|c|l||}
\hline \hline
{\bf First Name} &{\bf Last Name} & {\bf age} & {\bf Male/Female} & 
{\bf Comments} \\ \hline \hline

Holly & Smith & 12 & F & This is a table \\ \hline
John & Dodd & 74 & M & I don't have anything to say \\ \hline
 & Silva  & ? & M & New born, don't have a name yet.\\ \hline \hline
\end{tabular}


\section{Boxes}

If you want a box that outlines your text exactly then use fbox.

\begin{center} \fbox{Using this box it will automatically fit the box 
around the text.} \end{center}

\begin{center} \fbox{See} \end{center}

If you want to indicate the size of the box first and then put in text 
then you need to use framebox.  Here you need to first put in the width 
(in square brackets), then the position of the text in the box (also in 
square brackets).  If you don't specify the position it will be centered, 
use l to left-justify, and r to right justify.



\begin{center} \framebox[7cm]{Lots of space} \end{center}

\begin{center} \framebox[10mm]{But it looks funny if you don't space it 
right.} \end{center}

\section{Graphics}

The easiest way to include a picture is to crop it to the right size 
using xv31, or a simmilar program, and then save it as an encapulated 
postscript file.  If the package you are using does not allow you to save 
with this format (xv31 doesn't) then use the convert command. (for more 
explanation do a man convert)

\begin{figure}[ht]
\caption{\label{test} Look Pictures too!!}
\begin{center}
\includegraphics{pic.one.eps}
\end{center}
\end{figure}


I've put this picture in a figure, so it will show up in the list of 
figures at the beginning of the document.  The purpose for the caption 
comand is obvious, but the label comand allows you to reference the 
figure and where in the document.  You can say things like:  Please look 
at Figure~\ref{test} on page~\pageref{test}.

% please note the ~ is used to make sure that the words before and after it
% are always on the same line.

\label{pic}

And if I wanted to reference a particular section (lets say this one) I 
have to put in a label (make sure all of your label's are unique) and now 
you can do the same thing.  Please refer to section \ref{pic}.  You can 
do this from anywhere in the document.



\begin{thebibliography}{9}

% latex numbers the items in the bibliography.  So it needs to know how 
% much space to leave for the numbers on.  The {9} above indicates that 
% there will be less then 10 references.  If you have between 10 and 100 
% use {99}. 

\bibitem{kopka} Helmut Kopka and Patric Daly, {it A Guide to \LaTeX: 
Document Preparation for Beginners and Advanced Users}, Addison-Wesley, zDon 
Mills, Ontario, (1995).

% in \bibitem the argument in the brackets is used to cite the author.  
% I'll do this in the appendix.

\end{thebibliography}

\appendix

\chapter{The End}

After the appendix command all of the chapters will be re-named as 
appendicies and labeled accordingly.  If you wanted to quote a source you 
would do the following `` put quote here''\cite{kopka}


If I would like to include some fragments of text in the document and 
preserve the spacing I could do the following:

\begin{verbatim}
class DNAapplet2 extends DNAapplet {
        int value;
        int test;
        .........
        void calculate (int g) {
            value = g;
            ComputeGetVal();
            test = value;
        }
}
\end{verbatim}


Everything inbetween begin{verbatim} and end{verbatim} is written exactly 
as it appears, with no formating. The size of the code can aslo be changed:

{\small
\begin{verbatim}
class DNAapplet2 extends DNAapplet {
        int value;
        int test;
        .........
        void calculate (int g) {
            value = g;
            ComputeGetVal();
            test = value;
        } 
}
\end{verbatim}
}

or smaller

{\footnotesize
\begin{verbatim}
class DNAapplet2 extends DNAapplet {
        int value;
        int test;
        .........
        void calculate (int g) {
            value = g;
            ComputeGetVal();
            test = value;
        }
}
\end{verbatim}
}

or smaller

{\scriptsize
\begin{verbatim}
class DNAapplet2 extends DNAapplet {
        int value;
        int test;
        .........
        void calculate (int g) {
            value = g;
            ComputeGetVal();
            test = value;
        }
}
\end{verbatim}
}

or smaller, but I ususally use the size above.

{\tiny
\begin{verbatim}
class DNAapplet2 extends DNAapplet {
        int value;
        int test;
        .........
        void calculate (int g) {
            value = g;
            ComputeGetVal();
            test = value;
        }
}
\end{verbatim}
}

In fact you can size any text this way.  If you would like to input a lot 
of code you can just include the file in this manner 

\begin{verbatim}

\usepackage{verbatim}
needs to go at the top, after documentclass, but before the document begins.

In the document do the following:

{\scriptsize
\addtolength{\baselineskip}{-5pt}
\verbatiminput{filename.code}
}


\end{verbatim}


\end{document}
