\documentclass[11pt]{article}

%
% Generic LaTex File -- anything after a % is a comment
%

%\addtolength{\oddsidemargin}{-0.25in}
%\addtolength{\textwidth}{0.5in}
%\addtolength{\headsep}{-0.5in}
%\addtolength{\textheight}{1.0in}


\begin{document}

\parskip 1ex            % sets the gap between paragraphs
\parindent 0ex		% an ex is the width of an ex

\newcommand{\caln}{{\cal N}}
\newcommand{\half}{\frac{1}{2}}

\newcommand{\ub}{{\bar{u}}}		% u with a bar over it
\newcommand{\uhat}{{\hat{u}}}		% u with a hat over it
\newcommand{\xb}{{\bar{x}}}
\newcommand{\xt}{{\tilde{x}}}		% an x with a tilde over it
\newcommand{\phit}{{\tilde{\phi}}}

\newcommand{\gap}{\hspace*{0.25in}}	% \gap puts in a quarter inch space
\newcommand{\norm}[1]{\| {#1} \|}
\newcommand{\Ltwo}{{L^2(\Omega^n)}}
\newcommand{\ltwo}[1]{\norm{#1}_\Ltwo}


\newtheorem{theorem}{Theorem}[section]
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{definition}[theorem]{Definition}
\def\proof{\par{\it Proof}. \ignorespaces}
\def\endproof{{\ \vbox{\hrule\hbox{%
   \vrule height1.3ex\hskip0.8ex\vrule}\hrule
  }}\par}

\title{Title of Paper}
\author{Noel J. Walkington}
\date{}
\maketitle

\begin{abstract}
This is a typical LaTex file. In the preamble commands for modifying
the margins are commented out. LaTex was written by Leslie Lamport,
and his book {\em LaTex, A Document Preparation System, Users Guide
and Reference Manual} is still the best one I know of.
\end{abstract}

\section{Introduction}
When preparing input try to get all \verb+{+'s matched up with their
corresponding \verb+}+'s, and the same applies to \verb+$+'s.  LaTex
can not recover very often from mismatched braces and dollars.

LaTex files have the following structure.
\begin{verbatim}
\documentclass[11pt]{article}

% Any preamble goes here.

\begin{document}

% The document you type goes here.

\end{document}

\end{verbatim}
I always put the \verb+\newcommand+'s at the top of the file; although
they can go anywhere. Notice that I have included commands for making
$\xt$, $\xb$, $\ub$, $\uhat$, $\phit$ $\caln$ $\half$ etc.  Some more
complicated ones to make $\Ltwo$ and one which takes an argument like
$\ltwo{u}$.

\subsection{Sections etc.}
Section headings are made with commands of the form
\begin{verbatim}
\section{Section Heading}
\subsection{Sub-Section Heading}
\subsubsection{Sub-Sub-Section Heading}
\end{verbatim}
In general an {\tt *} at the end of a name like \verb+\section*{...}+
or \verb+\eqnarray* ...+ will suppress the numbering.
\subsubsection*{An Unnumbered Sub-Sub-Section Heading}
\subsubsection{A Numbered Sub-Sub-Section Heading}

\subsection{Lists etc.}
Many commands in LaTex are of the form
\begin{verbatim}
\begin{somthing}

stuff

\end{somthing}
\end{verbatim}
and this is the form of LaTex's lists. A typical list is:
\begin{itemize}
\item Item number 1
\item Item number 2
\item etc.
\end{itemize}
which was made with
\begin{verbatim}
\begin{itemize}
\item Item number 1
\item Item number 2
\item etc.
\end{itemize}
\end{verbatim}
To get numbers instead of bullets use the \verb+enumerate+ command.
\begin{enumerate}
\item Item number 1
\item Item number 2
\item etc.
\end{enumerate}

\subsection{Special Characters}
The following characters have special meaning in LaTex and can't be
used in regular directly.
\begin{verbatim}
# $ % ~ _ ^ \ { }
\end{verbatim}
In order to get one of these characters into the text precede
it with a backslash. For example \verb+\$150.00+ produces \$150.00.


\section{Math Stuff}
\subsection{Equations}
Inline equations start and end with a single dollar as in $u(x)=x^2+2$.
Displayed equations start with and end with a pair of dollar signs,
which I usually type seperate lines:
$$
A = 
\left[
\begin{array}{ccc}
a & b & c \\
d & e & f 
\end{array}
\right]
$$
To get a numbered equation use the {\tt equation} environment:
\begin{equation} \label{xxx}
\int_a^b x^2 \, dx = \frac{b^3}{3}-\frac{a^3}{3}.
\end{equation}
Noticed that I \verb+\label{}+ed the equation so that I can
refer to it with a \verb+\ref{}+ command to get as for
example: in equation (\ref{xxx}) the integral \ldots

To get equations aligned up we use the \verb+eqnarray+ environment
\begin{eqnarray}
u(x) &=& x^2 + 1 \\
v(x) &=& \sin(x) + 2x^2 \\ \nonumber
w(x) &=& 1/(x^2+2)
\end{eqnarray}
As you can see the default is to put numbers on each line of the
equation and to suppress a number on a particular line you terminate
the line with \verb+\nonumber+. More often you'll use the
{\tt eqnarray*} environment which doesn't put any numbers on 
the equations:
\begin{eqnarray*}
\int_0^1 x^2 \, dx
&=& \left. \frac{x^3}{3} \right|_0^1 \\
&=& \frac{1}{3}
\end{eqnarray*}

\subsection{Theorems and Stuff}
In the preamble I included definitions {\tt theorem, lemma, corollary
definition} and {\tt proof} environments. Use them like:

\begin{definition}
Black is color of night.
\end{definition}

\begin{theorem}
$4=2+2$ 
\end{theorem}
\begin{proof}
This is self evident.
\end{proof}

\end{document}
