\documentclass[12pt]{article}
\renewcommand{\baselinestretch}{1.3}
\usepackage{harvard}
\bibliographystyle{economet}

\begin{document}

%\begin{center}
%{\Large \bf A brief Introduction to Latex\\}
%{\large \bigskip Michele Tertilt\\
%October 1999\\}
%\end{center}

\title{A Brief Introduction to LaTeX}
\author{Mich\`{e}le Tertilt}
\date{First version: October 1999\\ updated: October 2003}
\maketitle
\tableofcontents

\section{Installation}
The following explanations are for using Latex under Windows. I
have written a separate guide for Unix. The very first step is to
download latex from the internet. The version that's currently
used by most people is called ``MikTeX'', here is where you get
it:\\
http://www.miktex.org \\
go to \textit{download version 2.3}. It is free! Next, you want a
nice editor with it, I recommend ``WinEdt'', which is shareware,
i.e. almost free. (I think the student license is \$30 and the
academic rate is \$40.) Here is where you get it:
http://www.winedt.com \\
Download version 5.3.  Both MikTeX and WinEdt have a very easy
self-explanatory installation process.


\section{How to get started}
First of all, you can look at the .tex file of this document to
get an idea of how it was written. Just open howtolatex.tex in
WinEdt. By comparing this to the the pdf file of the same
document, you can learn a lot about LaTeX. In fact, much of my
explanations below will make sense only if you look at the .pdf
file and the .tex file of this document simultaneously.

Now let's create our first document.  Open WinEdt and click on the
blank page symbol. Now can start writing. Well, not exactly,
you'll need some minimum specifications. For that I have written
the file ``default.tex''. So cut and paste from that file into
your blank document.  (Keep the default file for the future, each
time you start a new tex document, you can use this file). Now
type something. Just simple text. If you want to start a new
paragraph, just leave a line blank.

And by the way, latex is pretty ``smart,'' if you accidently leave
two lines blank, latex will understand that you
 just meant one.           Or, if after a period sign you leave a lot of spaces, latex will understand you meant only one.
 You can even start a new line, it won't matter.



To find out how the document will look like in the end you need to
compile it. So save your file. In the menu, click on file then
save, this is all just like in MS Word, pretty simple. To compile
it, click on the ``LaTeX'' symbol. It's always good practice to
compile twice (remember, SciWord does that also).
 Hopefully you won't get any error messages. Now latex has created a .dvi file. You can have a look
 by clicking on the ``dvi'' symbol. If you want to print your file
 go to the ``print'' symbol. All pretty straightforward, right?
If you want to create a pdf file, do the .dvi first, then click on
the symbol ``dvi $\rightarrow$ pdf.'' By the way, MikTex also has
an automatic spell-check, just like in MS Word, it underlines all
suspicious words in read.

\vspace{5mm}

\noindent \textit{Optional (i.e. you may want to worry about this later)}\\
WinEdt has a really nice feature, it let's you go back and forth
between the .dvi file and the .tex file, so that if you see a
mistake in the .dvi file, you can find the location in your code
immediately by a double left mouse click. This may open your .tex
file with \textit{notepad}. If it does so, then you need to do the
following adjustments: open the dvi file, then go to view, then
options, then inverse search. Under programs it should say WinEdt.
If it doesn't, then change it.

\subsection{Literature}
No-one can remember all latex commands, you'll need to look up
stuff in a book once in a while. Although with MikTeX, this need
is greatly reduced. Click on the $\sum$ symbol and a menu of
symbols pops up, so you can write most of your latex file by
clicking your way through this (just like in Scientific Word) if
you prefer so.
 Also, I strongly recommend skimming the introduction of one latex book (e.g. in Kopka's book).
  This will help in understanding the logic of latex. Latex is not a word processor, instead it is a type setting program,
   like the ones used by book companies to type-set any textbook. So it is probably very different from most stuff you have seen before.

I recommend the book by Helmut Kopka, Introduction into Latex.
This has all the basic stuff. A more advanced book is called ``The
Latex Companion'' by Gossens, Mittelbach and Samarin. There is
also another good book by Leslie Lamport.

\subsection{Structure etc.}
In latex, everything you want the program to do is written out.
What I mean is, {\em nothing} is going on in the background, like
in MS Word. First, note that any latex command begins with the
sign ``$\backslash$'' (like in the ``subsection'' or ``emphasize''
commands above!). Now what if you need the symbol $\backslash$ in
your text? Simply type the word ``backslash'' (you need to be in
``math mode'' for this to work - see below!). A few more symbols
are reserved for latex commands, like \#, \&, \_, \%, \{, \} and
\$. If you happen to need the symbol (not as a command) then you
have to type a backslash right before the symbol.

Most things in latex are defined in environments. For example, if you want a paragraph to be centered, you simply tell latex
\begin{center}
this part should be centered
\end{center}
Alternatively, a short environment can be defined by simply using
$\{$ and $\}$, for example {\it you can put a word or phrase in
italics}. Never forget the end of an environment. If you do, your
file will probably not compile! In the same way, any document
starts with $\backslash$begin\{document\} and ends with
$\backslash$end\{document\}. You will use environments for all
kinds of things like equations, tables, graphics, enumeration etc.



\subsection{math and equations}
So far it's been pretty simple. Now, we are ready for some more complicated stuff: equations. If you have just a few symbols in a regular written text, try this: $a^b \cdot c_k \leq Y$. The dollar sign starts and ends math mode.

If it's longer, try this:

\begin{math}
\sum _{t=0}^{\infty} \beta ^t u(c_t, \alpha (L) l_t)
\end{math}

If you want it to be a numbered equation:

\begin{equation}\label{ce-nocost}
u_c/u_l = \frac{-1}{f'(l) + pk}
\end{equation}

If you don't like the number:
\begin{displaymath}
u_1 (z) = u(c_1) + \beta [f_1 u(c_{(1,1)} + f_2 u(c_{(1,2)})]
\end{displaymath}

And if it is several lines:
\begin{eqnarray}
&\max_{c,l,s,g} & u(c,l,s)\\
& s.t.   & c + \delta g = f(l) \\
&   & s + g = kl.
\end{eqnarray}


\section{Latex on the Web}
Latex can do a lot of things, but not everything is installed in the default version. If you want to use a certain usepackage, you will need to download it from the web. This is not necessary for basic stuff, but if you have complex tables, if you want to rotate stuff, if you have graphics, or want a new bibliography style, then you'll need this.

\begin{itemize}
\item You can do that, for example, on the dante-server:\\
http://www.dante.de/cgi-bin/ctan-index?harvard
\item Also, there are all kinds of on-line documentations for latex. Try this:\\
http://www.maths.tcd.ie/~dwilkins/LaTeXPrimer/
\end{itemize}
If you want to download a specific style or package and use it, do
the following steps. Download the file, then put it in the
following directory:\\
$\backslash$texmf$\backslash$tex$\backslash$latex$\backslash$newfile\\
where ``newfile'' stands for the name of the file you just
downloaded. Now you need to make sure latex knows that this new
file exists. Close WinEdt. Then open a dos-box (in XP, you do that
by going to programs then to accessories, then dos command
prompt.) There you type ``initexmf $~~--$update$-$fndb''.
Afterwards you can reopen WinEdt and it should find your package.


\section{Slides}
I use the seminar package for slides. You can download the zipped
file from my webpage. Put it into the directory\\
$\backslash$texmf$\backslash$tex$\backslash$latex$\backslash$\\
Then unzip it. Then initialize your path again (see above, use the
``initexmf'' command). Download the slides sample file from my
webpage, called slides.tex and get going. 

\section{Bibliography}
Latex is perfect for creating a very nice list of references.
There are two basic ways of doing it. One is super easy but not as
nice, and the second is slightly more difficult, but super nice. I
prefer the second way and  will explain it here. It's called
BibTeX.

For this, you need to create a separate file called file.bib. Here
you list all references in a certain format. The file that is used
for this document is called taxation.bib. This uses the style that
is used in ECONOMETRICA. The style files you need for this are
called harvard.sty and economet.bst. You can download them from my
webpage, then follow the steps above for installing a specific
style file. To make sure your bibliography is really included in
the document, you need to define the bibliography package {\em
before} the begin of the document and then you call the
bibliography at the end, see below. Now you need to run latex a
couple times. Then run bibtex (menu: accessories, then bibtex).
Then click on the latex command again twice more. Hopefully it'll
work!

Depending on how you refer to your references in the text, they
will show up at that location and the reference list, or only in
the reference list. Here a few examples.\\
\cite{char99}\\
\citeasnoun{char99}\\
\nocite{char99}\\
\citeyear{char99}\\
\nocite{char99}
\nocite{grat97}
\nocite{nico98}
\nocite{rios93}
\nocite{krus96}
\nocite{pigo96}
\nocite{john97}
\newpage
\bibliography{taxation}

\end{document}
