%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%    Start of top matter
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\documentclass[12pt]{amsart}
%
%   Square brackets contain optional parameters.
%   12pt is the font size.
%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
%
% Some useful packages:
%
\usepackage{amssymb,amscd,amsmath,amsthm,url}
\usepackage[all]{xy}

%
% "fullpage" creates smaller margins than the default:
%
\usepackage{fullpage}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
%
% Theorem-like environments:
%
% \newtheorem {name in LaTeX} [how to enumerate] {name in output}
%
\newtheorem {Theorem}                    {Theorem}
\newtheorem {Proposition}[Theorem]       {Proposition}
\newtheorem {Lemma}      [Theorem]       {Lemma}
\newtheorem {Corollary}  [Theorem]       {Corollary}

\theoremstyle{definition}
\newtheorem  {Definition} [Theorem]{Definition}

\theoremstyle{remark}
\newtheorem{Remark}[Theorem]	{Remark}
\newtheorem*{Remark-nn}		{Remark}    % star means no number
\newtheorem{Example}[Theorem]	{Example}

\numberwithin{equation}{section}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
%%
%%  Abbreviations of useful commands:
%%
\def \N {\mathbb N}
\def \R {\mathbb R}
\def \C {\mathbb C}
\def \calA {\mathcal A}
\def \ol {\overline}
\def \ssminus {\smallsetminus}
\def \half {\frac{1}{2}}
\def \eps {\varepsilon}

%%
%%  Abbreviations with an [optional] parameter:
%%
\newcommand{\dd}[1] {\frac{\partial}{\partial #1 }}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
%
%  End of top matter; start of document.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 

\begin{document}

\title{Example of a \LaTeX{} Document}

\author{Sue McGlashan}
\email{sue.mcglashan@utoronto.ca}

\author{Yael Karshon}
\email{yael.karshon@utoronto.ca}

\address{Mathematical and Computational Sciences,
University of Toronto Mississauga, 3359 Mississauga Road North,
Mississauga, ON L5L 1C6}

\maketitle
%
%  "maketitle" processes the title, authors etc.
%


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% To include a table of contents, uncomment the lines below.
%
% \setcounter{tocdepth}{1}
% \tableofcontents




%-------------------------------------------
\section{Introduction}
%-------------------------------------------

The goal of this document is to illustrates some of the ways to use \LaTeX.
For this, please compare the .tex source with the .pdf outcome.
We recommend that you make a copy of this file and play with it,
to see how the different options work.

%-------------------------------------------
\section{Formulas and math symbols} \label{sec:formulas}
%-------------------------------------------

Use single dollar signs for an equation embedded in text,
such as when asserting that the circumference of a circle of radius $r$ 
is $2\pi r$.  Use double dollar signs for an un-numbered displayed equation:
$$ 1 + \ldots + n = \sum_{k=1}^n k .$$

We also have
$$ \int_0^\infty re^{-r^2} dr = \left. \frac{1}{2} e^{-r^2} \right|_0^\infty ,$$
and
$$ \prod_{ \text{ primes } p} \frac{1}{1-\frac{1}{p^s}} 
   = \sum_{ \text{ positive integers $n$} } \frac{1}{n^s} .$$

Inside a formula, use $\backslash$text\{prime\} 
to write ``prime" and not ``$prime$".
The latter is $p$ times $r$  times $i$ times $m$ times $e$.

\LaTeX\ puts a slightly bigger space after a period,
e.g. after the word ``e.g.";
use $\backslash$ to force a regular-sized space, e.g.\ here.

\ 

Check the source to see how to  
skip \ a \ \ line or \quad adjust \qquad spaces.

If your text contains the dollar sign, percent sign, or curly brackets, 
use backslash, e.g., in \$10, or \%10, or \{ here \}.

Use quotation marks ``like here" and not "like here".

Here are some fonts. 
Blackboardbold: $\mathbb N$, $\mathbb Q$, $\mathbb R$, $\mathbb C$.
Calligraphic: $\mathcal A$, $\mathcal B$, $\mathcal C$.
Fraktur: $\mathfrak f$, $\mathfrak g$, $\mathfrak h$.
Also see \url{cheeseorfont.com}.

Challenge: explain in what sense $(e^{t\dd{x}}f)(x) = f(x+t)$.



%-------------------------------------------
\section{Labels, cross references, and citations} \label{sec:cross}
%-------------------------------------------

Use the $\backslash$label command
to put labels on sections, formulas, or theorem-like environments.
You can later refer to these items using the $\backslash$ref command.
For example, check the \LaTeX\ source of this file
to see how we now refer to Theorem~\ref{quadratic} in Section \ref{sec:thms}.
\emph{Warning}:
For cross-references to come out right after a recent source changes, 
run the latex program twice.

To label equations or formulas, use the ``equation" environment, 
such as here
\begin{equation}  \label{polynomial}
   a_n x^n + a_{n-1} x^{n-1} + \ldots +  a_1 x + a_0
\end{equation}
or here
\begin{equation}
 \lim_{x \to \infty} f(x) = 1, \qquad \text{or} \qquad
   \begin{CD} f(x) @>> x \to \infty > 1. \end{CD} 
\end{equation}
See the \LaTeX\ source of this file to see 
how we refer to Equation~\eqref{polynomial} with the round brackets.


In your essays, record every source. 
Within a collection, record the title and author in
your bibliography item.  Within a book, give the section or page number
in the body of your text
We can refer to Gardiner's article~\cite{choice}.
Or we can refer to Gardiner's article~\cite[pp.~955--966]{gowers}\footnote
{Notice how we cite references.}.
Or we can just refer to Gardiner's article, on pages~955--966
of The Princeton Companion to Mathematics~\cite{gowers}.
And now we cite a journal paper~\cite{Price}.

For more advice on \LaTeX{} we recommend the following sources:
\cite{lamport94,not_so_short,comprehensive},
or simply ``google".
{\footnotesize Google is great!  Try, e.g., to search ``latex font size".}



%-------------------------------------------
\section{Theorem-like environments}  \label{sec:thms}
%-------------------------------------------

In this section we present some theorem-like environments.
We enumerate them consecutively 
(``Theorem \ref{quadratic}, Example \ref{golden}, Definition \ref{root} 
$\ldots$"), to make it easier for the reader to navigate.

\begin{Theorem}     \label{quadratic}
Consider a quadratic equation
$ax^2 + bx + c = 0$,
where $a,b,c \in \R$ and $a \neq 0$.
The solutions to this equation are
$$ x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}. $$
\end{Theorem}

\begin{proof}
Because $a \neq 0$, we divide through by $a$
and get
$$ x^2 + \frac{b}{a} x + \frac{c}{a} = 0.$$
The solution to this equation are the same as those
of the original equation.  Completing the square,
we re-write this equation as
$$ \left( x + \frac{b}{2a} \right)^2 - \frac{b^2}{4a^2}  
   + \frac{c}{a} = 0.$$
Adding $\displaystyle{\frac{ b^2 - 4ac}{4a^2}}$ and taking square roots,
we get
$$ x + \frac{b}{2a} = \pm \frac{ \sqrt{b^2 - 4ac}}{2a}  , $$
which yields the required formula.
\end{proof}

\begin{Example} \label{golden}
One of the two solutions to the equation $x^2 - x - 1 = 0$
is the golden ratio, $x = \frac{1 + \sqrt{5}}{2}$.
\end{Example}

We recommend to \emph{emphasize} or put in \textbf{boldface}
any new term that is being defined or introduced, such as here:

\begin{Definition} \label{root}
A \emph{square root} of $\alpha$ is a number
whose square is equal to~$\alpha$.
\end{Definition}

\begin{Remark-nn}
Theorem-like environments can also come without numbers.
\end{Remark-nn}


%-------------------------------------------
\section{Lists} \label{sec:lists}
%-------------------------------------------

A thumb-rule for writing:

\begin{enumerate}
\item
Tell the reader what you're going to say.
\item
Say it.
\item
Tell the reader what you just said.
\end{enumerate}

\bigskip

Use 
\begin{itemize}
\item
``enumerate" for a numbered list;
\item
``itemize" for an un-numbered list;
\begin{itemize}
\item you can indent lists,
\item such as here.
\end{itemize}
\end{itemize}



%-------------------------------------------
\section{Cases; matrices}
%-------------------------------------------

The \emph{characteristic polynomial} of the $3 \times 3$~matrix
$$ T := 
\left[ \begin{array}{ccc}
a & b & c \\
d & e & f \\
g & h & i 
\end{array} 
\right]  $$
is $ \lambda \mapsto \det (\lambda I - T) $.
And the following text is produced with the ``cases" environment:
$$
|x| := \begin{cases}
    x & x \geq 0 \\
   -x & x < 0 
\end{cases}
$$



%-------------------------------------------
\section*{Conclusion}
%-------------------------------------------

We hope that you find this document helpful.
If you have suggestions for improvement, please let us know.



%-------------------------------------------
\begin{thebibliography}{9}
%-------------------------------------------

\bibitem{choice}
A.\ Gardiner, \emph{The art of problem solving},
in: T. Gowers (Ed.), \emph{The Princeton Companion to Mathematics},
Princeton University Press, 2008, pp.~955--966.

\bibitem{gowers}
T.\ Gowers (Ed.), \emph{The Princeton Companion to Mathematics},
Princeton University Press, 2008.

\bibitem{lamport94}
Leslie Lamport, \emph{\LaTeX: A Document Preparation System}.
Addison Wesley, Massachusetts, 2nd Edition, 1994.

\bibitem{not_so_short}
Tobias Oetiker, Hubert Partl, Irene Hyna, and Elisabeth Schlegl,
\emph{The Not So Short Introduction to \LaTeX2E},
\url{http://tobi.oetiker.ch/lshort/lshort.pdf}.

\bibitem{comprehensive}
Scott Pakin,
\emph{The Comprehensive \LaTeX{} symbol list},
\url{http://www.ctan.org/tex-archive/info/symbols/comprehensive/symbols-a4.pdf}

\bibitem{Price}
J.\ J.\ Price, \emph{Learning Mathematics through Writing: Some Guidelines},
The College Mathematics Journal, vol.~20, No.~5 (1989), pp.~393--401.

\end{thebibliography}

\end{document}
