\documentstyle[a4,graphicx,apalike]{article}

% Comments: This file is simple and written by M. Wiering to introduce Latex
% a4 is the size of the article, one can also use a4wide.
% epsfig is for including figures.
% apalike is for the bibliography
% article can also be replaced by book or letter.

\title{Latex Short Course}

\author{Marco A. Wiering \\ University Utrecht \\ email:marco@cs.uu.nl}

\begin{document}

\maketitle

\begin{abstract}
This is a mini-course for using Latex as a tool for writing articles. The
good thing of Latex is that you can use formula's quite easily (once you
know how to do it). For just writing text, one could also use other tools.
You can get the files for this course from: http://www.cs.uu.nl/people/marco
\end{abstract}

\section{Note about compiling}

If you want to compile a latex file named course.tex, do the following:

1) pdflatex course.tex

\noindent
That should work, unless your file contains errors. Another option is to use:

1) latex course.tex

2) dvips course.dvi -o course.ps

3) ghostview course.ps or ps2pdf course.ps


\section{Template for writing simple text}

It's simple to write text using Latex. Just
use this template and write your own text. The template always consists of
the following:

\begin{quote}
$\setminus$documentstyle[a4]\{article\}

$\setminus$title\{Your title\}

$\setminus$author\{Your name\}

$\setminus$begin\{document\}

$\setminus$maketitle

$\setminus$section\{Start\}

$\setminus$section\{Second\}

$\setminus$end\{document\}

\end{quote}

\noindent
Instead of using article, one can also use book or letter.

\section{Spacing and typesetting}

We can use spacing with the following command: $\setminus$vspace*\{1cm\} gives
us: 

\vspace*{1cm} 

and then the rest of the text. Also with $\setminus$hspace*\{3cm\} we get \hspace*{3cm} and then the rest of the text. Finally with
$\setminus$newpage you can end the current page. We do not give an example of
this.

We can start at the left of a new paragraph using $\setminus$noindent:

\noindent We continue the text here \ldots. We can also stop a line and make
vertical spacing using \\[.2cm] and continue here.

\subsection{Typesetting}

You can write in boldface using \{$\setminus$bf text\} as example: {\bf This
is boldface (bf)}. Also possible is using:
\begin{bf}
This part in boldface.
\end{bf}
Another possibility is to use it or em instead of bf. Let's try this:
{\it This text uses it}, {\em and this text uses em}. For enlarging text
or making text smaller we can use: {\Huge Huge}, {\LARGE LARGE}, {\Large
Large}, {\small small}, {\tiny tiny}.

\section{Figures}

You can include figures using the following (see course.tex):

\begin{figure}[h]
\begin{center}
\includegraphics[width=3in]{beauty.pdf}
\end{center}
\caption{\label{Beauty}
{\em This figure displays pure beauty}}
\end{figure}

\noindent
Figure \ref{Beauty} shows the most beautiful picture I've ever seen.
And you?

\section{Tables}

We can put tables in a text as follows:

\begin{table}[h]
\centering
\begin{tabular}{|l|r|c|} \hline
Me & You & Them \\ \hline
27 & 12 & 14 \\ \hline
30 & 15 & 11 \\ \hline
\end{tabular}
\caption{\label{table_results} {\em We can see in the table that me is bigger
than you or them}}
\end{table}

We can also refer to the table (or figure) using $\setminus$label\{name\} and
$\setminus$ref\{name\}. As an example, we refer to table \ref{table_results}
that shows good results for me.

\section{Mathematics}

This one gives most problems, since there are so many symbols. I cannot
write them down all here, but refer to the copied part of the text-book.
One can also have a look at free available Latex-books on the internet,
an example is: http://www.cs.uu.nl/people/piet/ltx-errata.html

Some examples of using mathematical environments are: (displaymath)

\begin{displaymath}
e^x = e^{\frac{1}{2}x} e^{\frac{1}{2}x}
\end{displaymath}

What is also possible is: (equation)
\begin{equation}
\sum_{i=0}^n i = \frac{1}{2} n (n+1)
\end{equation}

Finally, we can stack those formula's: (eqnarray)
\begin{eqnarray}
2x & = & 6 \\
x & = & 3  
\end{eqnarray}

Of course we can also write mathematical symbols 
in the text, e.g. $\alpha$ or $x_1 \wedge
x_2$, or just use: $x \le 10$, or $x \rightarrow \infty$.
See the additional copied pages for more information.

\subsection{Super- and subscript}

We can use subscript and superscript using mathematical formula's. Examples
are: $x_i$ and $x^{this}$.



\section{Boxes}

Let's try some box:

\begin{center}
\fbox{\parbox{5.2cm}{
\begin{tt}
1) Do that\\
2) Do this\\
3) Stop it\\
\end{tt}
}}
\end{center}

\section{Using References}

We can use references by using a separate bib file. What we do is we
add at the end of the document the used bib. format (here we use apalike, but
e.g. plain is also possible), and after using

\begin{enumerate}
\item latex course.tex
\item bibtex course
\item latex course.tex
\end{enumerate}

We can cite papers using $\setminus$cite\{papername\}. For example:
\cite{Aertsen:89}, if we want to cite two articles, we can do the
following: \cite{Allender:92,Wiering:00}.

\bibliography{bib}
\bibliographystyle{apalike}

\end{document}

