%%
% A sample LaTeX document by Mark McClure
%
% Stuff that comes after percent symbols (like this: %) are comments.
%%
\documentclass{article} % Set the overall document class.
\usepackage{amsmath, amssymb} % Enable some extra groovy mathematical formatting.
\usepackage[utf8]{inputenc}
\usepackage[margin=1.3in]{geometry} % Set the margins
\usepackage{graphicx} % Enable graphics
\usepackage{listings} % Enable computer code
\usepackage{courier}
\lstset{basicstyle=\footnotesize\ttfamily,breaklines=true}
\usepackage[colorlinks, urlcolor=cyan]{hyperref} % Enable hyperlinks
\usepackage{amsthm} % Enable theorem counting.
\newtheorem*{theorem}{Theorem}
\title{Basic \LaTeX\ Template}
\author{Mark McClure}
\date{} % Activate to display a given date or no date
\begin{document} % Begin the actual document
\maketitle % Make the, uh, title.
\thispagestyle{empty} % Turn off the number at the bottom of the first page.
% \pagestyle{empty} % Enable to turn off the number at the bottom of all pages.
\abstract{A sample \LaTeX\ document}
\section*{Introduction} % The * just makes the section unnumbered, which we typically want for a short document.
\LaTeX\ is \textit{the} tool of choice for creating nicely formatted mathematical documents. It's not a standard
word processor, however, and has a bit more of a learning curve. Once you get the hang of it, though, the payoff is tremendous. The purpose of this document is to help get you started. \\ % I like to end a paragraph this way and use a \noindent next.
\noindent The first step is to get yourself a \TeX\ distribution. I recommend:
\begin{itemize} % Make an itemized list. Use \begin{enumerate}...\end{enuerate} for numbered lists.
\item MacTeX for the Mac: \href{https://tug.org/mactex/}{\url{https://tug.org/mactex/}}
\item TeXLive for the Linux: \href{https://www.tug.org/texlive/}{\url{https://www.tug.org/texlive/}}
\item MiKTeX for the PC: \href{http://miktex.org/}{\url{http://miktex.org/}} (or so I'm told)
\item Overleaf for an online experience: \href{http://www.overleaf.com/}{\url{http://www.overleaf.com/}}
\end{itemize}
\LaTeX\ documents are prepared with a simple text editor - \textit{not} a word processor. Your \LaTeX\ distribution should
come with a good \LaTeX-aware text editor. You type funky looking computer code and then process it into a PDF.
The easiest way to start a project is just to open a working file and replace the text with your own and I recommend that you do that with this document.
\section*{Some math}
Of course, one major thing we want to do is type some beautiful math. As a first example, let's looks at the definition of iteration: \\
\noindent If $f(x)=x^2$, then the iterates of $f$ from an initial point
$x_0$ are computed via
$$x_{n+1} = f(x_n).$$
\subsection*{Typing it}
To create that lovely piece of typeset mathematics, I simply typed in
\begin{lstlisting}[frame=single]
\noindent If $f(x)=x^2$, then the iterates of $f$ from an initial point
$x_0$ are computed via
$$x_{n+1} = f(x_n).$$
\end{lstlisting}
\noindent We have some experience with this already - at least, we've seen snippets like
\lstinline|$x_0$| and \lstinline|$$x_{n+1} = f(x_n)$$| to represent inline and
displaystyle typeset mathematics before. There are some other commands that control the
structure of the document as well, though, particularly when we look at the overall document
as a whole. Before we get into all that, let's look into one more piece of math that you might need.
\subsection*{The Lorenz equations}
The \textit{Lorenz equations} say that
\begin{align*}
x' &= \sigma(y-x) \\
y' &= x(\rho-z)-y \\
z' &= xy-\beta z,
\end{align*}
where the notation $x'$ denotes the rate of change of $x$ with
respect to time.
\subsection*{Typing the Lorenz equations}
In order to create that set of equations, I typed in the following:
\begin{lstlisting}[frame=single]
The \textit{Lorenz equations} say that
\begin{align*}
x' &= \sigma(y-x) \\
y' &= x(\rho-z)-y \\
z' &= xy-\beta z,
\end{align*}
where the notation $x'$ denotes the rate of change of $x$ with
respect to time.
\end{lstlisting}
You can view the source to see how the rest of the document was created.
\subsection*{Including an image}
Often we'd like to incorporate a graph into our file, like the one shown in figure~\ref{fig:lorenz}.
\begin{figure}[htbp]
\begin{center}
\includegraphics*[width=320px]{LorenzAttractor.pdf}
\caption{The Lorenz attractor}
\label{fig:lorenz}
\end{center}
\end{figure}
\end{document}