%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% IMPORTANT!!! %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Everything you need to edit comes after the line that says %%
%% "\begin{document}" below. Do not edit anything above that %%
%% line... unless you're familiar with LaTeX and you know %%
%% what you're doing. %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[11pt,fleqn]{article}
\usepackage[latin1]{inputenc}
\usepackage{enumerate}
\usepackage[hang,flushmargin]{footmisc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsthm}
\theoremstyle{definition}
\newtheorem{theorem}{Theorem}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{example}[theorem]{Example}
\setlength{\oddsidemargin}{0px}
\setlength{\textwidth}{460px}
\setlength{\voffset}{-1.5cm}
\setlength{\textheight}{20cm}
\setlength{\parindent}{0px}
\setlength{\parskip}{10pt}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\begin{center}
{\Huge
\LaTeX{} class 3
}\\
Clive Newstead, Wednesday 12th July 2017
\end{center}
\section{More math mode}
Remember from last time that you can enter math in-line using single dollar signs, like $a^2+b^2+c^{d^{e^{f^2}}}$ and on its own line using double dollar signs, like $$xyz + abc = \ell mn$$
Often you want to have aligned equations, especially when doing long calculations. This is done using the `align*' environment.
% The & symbols denote a vertical line along which things are aligned
% The alignment alternates between right and left
% The \\ symbol denotes starting a new line
% If you leave the * out of align*, all the equations are numbered
For example,
%
\begin{align*}
(n+1)!-n! &= (n+1) \cdot n! - n! & & \text{by definition of factorial} \\
&= n \cdot n! + n! - n! & & \text{expanding} \\
&= n \cdot n! & & \text{cancelling}
\end{align*}
The `align*' environment is in math mode by default, but you can use the `text' command to enter text mode from within math mode.
\section{Lists}
Everyone loves lists! Lists are great for partitioning proofs into steps, or for listing cases, or for splitting base cases from induction hypotheses.
There are two types of list: bulleted and enumerated.
Bulleted lists are input using the `itemize' environment:
\begin{itemize}
\item apple
\item persimmon
\item cauliflower
\item carrot
\item potato
\end{itemize}
If you want to have a list inside a list, just use another `itemize' environment:
\begin{itemize}
\item Fruits:
\begin{itemize}
\item apple
\item persimmon
\end{itemize}
\item Vegetables:
\begin{itemize}
\item cauliflower
\item carrot
\item potato
\end{itemize}
\end{itemize}
Enumerated lists use the `enumerate' environment. By default, enumeration looks like this:
\begin{enumerate}
\item apple
\item persimmon
\item cauliflower
\item carrot
\item potato
\end{enumerate}
You can change the enumeration style using an argument in [square brackets] directly at the front:
\begin{enumerate}[(a)]
\item apple
\item persimmon
\item cauliflower
\item carrot
\item potato
\end{enumerate}
Other useful formats include (1) and (i), but you can do some silly ones too:
\begin{enumerate}[Alabama]
\item apple
\item persimmon
\item cauliflower
\item carrot
\item potato
\end{enumerate}
\begin{enumerate}[Clive]
\item apple
\item persimmon
\item cauliflower
\item carrot
\item potato
\end{enumerate}
\end{document}