\documentclass[a4paper]{article}
\usepackage{amssymb}
\usepackage[T1]{fontenc}
\usepackage[british]{babel}
\usepackage{hyperref}
\usepackage[utf8]{inputenc}

\renewcommand{\rmdefault}{ppl}
\renewcommand{\sfdefault}{phv}
\renewcommand{\ttdefault}{pcr}

\newcommand{\dd}[1]{\mathrm{d}#1}
\newcommand{\res}{\mathop{\mathrm{res}}\nolimits}
\newcommand{\punct}[1]{\,\textrm{#1}}

\title{An example document}
\author{Mark Wooding}

\begin{document}
\maketitle

\begin{abstract}
  This is a simple example of a \LaTeX\ document, demonstrating some
  important features.
\end{abstract}

\tableofcontents

\section{An initial section} \label{sec:init}

This is an initial paragraph
which doesn't look as though it merits careful attention.
In fact, however, it demonstrates a few features
which aren't immediately obvious.

This is a second paragraph,
which is separated from the first by a blank line.
No explicit markup was required.
More interesting things will happen in Section~\ref{sec:next}.

\section{A subsequent section} \label{sec:next}

This is another section.  There was a cross-reference from
Section~\ref{sec:init}.

\subsection{Lists and suchlike}

\begin{itemize}
\item We can typeset lists of things.
  \begin{itemize}
  \item We can nest lists.
  \item Four levels are usually allowed
    before \LaTeX\ runs out of bullet symbols.
  \end{itemize}
\item
  \begin{enumerate}
  \item We can also have lists with numbered entries.
  \item This emphasizes that their ordering is relevant.
  \item \label{en:item} It also allows us to refer to items later.
  \item \begin{enumerate}
    \item These lists can also be nested.
    \item A nested list can form the entirety of a list item.
    \end{enumerate}
  \end{enumerate}
\item We can \emph{emphasize} words.
\item We can set words in \textbf{boldface}.
\item We can switch to \textsf{sans-serif}
  or \texttt{monospace} typefaces.
\item If I don't refer to item~\ref{en:item} above
  then it would have been pointless to have labelled it.
\end{itemize}

See Table~\ref{tab:example} for an example table.
(Notice how it's ended up at the top of the page,
above this text which precedes the table in the source code.
Also observe that there's insufficient vertical space
around the horizontal rules.)

\begin{table}
  \centering
  \begin{tabular}{lcr}                                             \hline
    \textbf{Left} & \textbf{Centre} & \textbf{Right}            \\ \hline
    Left-aligned  & Mid!            & Right-aligned             \\
    Stuff         & \multicolumn{2}{r}{spanning two columns}    \\
    More          & random          & nonsense                  \\ \hline
  \end{tabular}
  \caption{An example table which contains little information of value.}
  \label{tab:example}
\end{table}

\subsection{Mathematics}

This is sort of the whole point.
Silverman~\cite[\textsection VI.2, p.~151]{silverman:curves}
deduces from the residue theorem that
\[ \sum_{w\in\mathbb{C}/\Lambda} \res_w(f)
     = \frac{1}{2\pi i} \int_{\partial D} f(z) \,\dd{z} \punct{.} \]
Elsewhere, Lang~\cite[\textsection VIII.4, p.~516]{lang:algebra}
defines the \emph{Vandermonde determinant}
$V = V(x_1, \ldots, x_n)$ to be
\[ V = \left| \begin{array}{cccc}
         1     &     1     & \cdots &     1     \\
        x_1    &    x_2    & \cdots &    x_n    \\
       \vdots  &   \vdots  & \ddots &   \vdots  \\
     x^{n-1}_1 & x^{n-1}_2 & \cdots & x^{n-1}_n \\
   \end{array} \right| \punct{.} \]

\begin{thebibliography}{99}
\bibitem{lang:algebra}
  Lang, Serge,
  \emph{Algebra, Revised Third Edition},
  (Springer Verlag, 2005).
\bibitem{silverman:curves}
  Silverman, Joseph H.,
  \emph{The Arithmetic of Elliptic Curves},
  (Springer Verlag, 1986).
\end{thebibliography}

\end{document}
