\documentclass[11pt]{article}
\usepackage{amsmath} % for equation labeling etc.
\usepackage{graphicx} % for incorporated figures

% Anything starting with percent sign % is considered a comment and
% ignored

\title{An example document}
\author{A. Student}

% if you don't specify data, today's date will be put in at the time
% of compiling the document
\date{September 15, 2006}

% anything before this line is called ``preamble'' of the document
\begin{document}
\maketitle % this makes the title, defined above, appear on the page

\section{Simple section}
Sections are numbered automatically\footnote{As are footnotes}, and
the section heading is generated for each section.
An empty line (or more) indicates to \LaTeX that a new paragraph has
started. 


Text can be typeset in \textbf{boldface} or
\emph{italicized}. Mathematical typesetting for things like
$x,\mathbf{x},\mathbf{A}^T$ is activated by using the dollar signs.

\section{Another section}
We can also have a \emph{displayed equation}, which is centered on the
page (not inline with text) and numbered:
\begin{equation}\label{equation 1}
y=f(\mathbf{x}).
\end{equation}
Note that we can refer to~\eqref{equation 1} by referencing the label,
so we don't have to manually keep track of numbering.

We can also have an unnumbered displayed math:
\[h=g(\|\mathbf{v}\|;\{\theta,\Sigma\},\ldots,\mathbf{\Lambda}),
\]
which also demonstrates the use of Greek letters.

\section*{Unnumbered section}
Here is how to make a multi-line equation, nicely aligned by the
equality sign. Note how we can suppres numbering of some of the lines.
\begin{align}
y &= f_1(x^a)\\
 &=f_2(x_{b+1})\notag\\
&=f_3\left(\exp\left(\frac{1}{n+3}\right)\right).
\end{align}

\section{Figures}\label{sec:fig}
Figure~\ref{figureSin} is an example of how one can include graphics
in the document
\begin{centering}
\begin{figure}
\includegraphics[scale=.8]{sin}
\caption{A figure with some graph, referenced in Section~\ref{sec:fig}.}\label{figureSin}
\end{figure}
\end{centering}

\section{Tables}
A simple talbe~\ref{tab:simple} demonstrates how to include those.
\begin{table}[!th]
\begin{tabular}{|l|cc|c|}
\hline
aa & bb & cc & dd\\
an entry (left-flushed) & b & c & $d^{\sin(x)}$\\
\hline
another one & f & some longer text & 
$y=\begin{cases}1 & \text{if~}a=b,\\0 & \text{otherwise}\end{cases}$\\
\hline
\end{tabular}
\caption{A table with some nonsense, unrelated to Figure~\ref{figureSin}.}\label{tab:simple}
\end{table}

\section{More math}
Here is a simple matrix:
\[\mathbf{C}\;=\;
\begin{bmatrix}
1 & 3 & 4 & 11\\
0 & \hdotsfor{2} & 15\\
-10 & 12 & 25 & 22
\end{bmatrix}
\]

\end{document}
% anything after this line will be ignored
