%  Whenever you write a percentage sign, latex will ignore the rest of that line.  Use this to add comments to your file for yourself.

% important introductory thing you absolutely MUST have
\documentclass[12pt]{article}

\usepackage{amsmath}   % optional introductory thing you very likely need
\usepackage{amssymb}  % optional introductory thing you very likely need
\usepackage{hyperref}   % allows you to add URLs to your document, which we used here
%\usepackage{fullpage}   % use this if you want to reduce your margins and save trees

%  allows you to define Theorem, Corollary, and Lemma
\newtheorem{theorem}{Theorem}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{lemma}[theorem]{Lemma}

%  different look for Definition and Example
\newenvironment{definition}[1][Definition.]{\begin{trivlist}
\item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}
\newenvironment{example}[1][Example.]{\begin{trivlist}
\item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}

% snazzy look for Proofs, ending in a special QED symbol
\newenvironment{proof}{{\bf Proof}.}{\hspace{3mm}{\hspace*{\fill}\lower3pt\hbox{$\Box$}\medskip}}

% choose your own adventure (er, define your own macros)
\newcommand{\ZZ}{\mathbb{Z}}  %  this says "type \QQ to get a bold-faced Q"
\newcommand{\QQ}{\mathbb{Q}}
\newcommand{\RR}{\mathbb{R}}
\newcommand{\CC}{\mathbb{C}}
\DeclareMathOperator{\sgn}{sgn}   % this takes text inside math mode and makes it
                                  % look plain instead of italicized. It also makes
                                  % the spacing look good.
\DeclareMathOperator{\Aut}{Aut}

% the document information
\title{A Crash Course in \LaTeX{}}
\author{Alfonso Gracia-Saz and Jason Siefken}
%\date{\today}

%  Everything above this line is the preamble of the file.  The next line is where the body of your article starts.   For your first article copy this file; then erase everything between "\begin{document}" and "\end{document}" and replace it with your own body, while leaving the preamble unchanged.
\begin{document}

\maketitle

\small{This paper was shamelessly plagiarized from Marisa Debowsky, with her permission.}

\section{Introduction}
	\TeX\ looks more difficult than it is.  We will use \LaTeX,
	which is based on \TeX\ and has lots of macros for formatting,
	making tables, making pretty graphics, and so on.

	I just made a new paragraph by adding a blank line. Extra lines
	and extra         spaces make no difference.  To make whitespace,
	we can say \verb \bigskip  or \verb \newpage.  The default font is
	Computer Modern. It includes \textit{italics}, \textbf{boldface},
	and \texttt{monospaced} fonts.

	In-line formulas are enclosed by \$ such as $2+3=5$, and displayed
	formulas go in \$\$ such as $$2+3=5.$$  We can make all sorts of
	symbols:   $\alpha$, $\beta$, $\gamma$, $\delta$, $\sin x$,
	$\lambda$, $\ldots$.   We also can make subscripts, $A_{x}$, $A_{xy}$,
	and superscripts, $e^x$, $e^{x^2}$.

\section{Math Mode}
	Let's write some equations.  If we write \verb \begin{equation}  and
	\verb \end{equation}  instead of enclosing the math in \$\$, then we
	will get a numbered equation, like so:
	\begin{equation}
		\label{myfavoriteequation}
		\pi(v) = \sum_{g\in G} g(\pi_0 (g^{-1} v)).
	\end{equation}
	I added a label to the equation, so now I can refer to it: Equation
	\eqref{myfavoriteequation} is my favorite equation.

	Often, it's useful to have simultaneous equations line up:
	\begin{align*}
		S^nV 		&  :=  \{(V\otimes\cdots\otimes V)\mbox{ subspaces that are $S_n$-invariant}\} \\   % the ampersands (&) in both lines are aligned
		\Lambda^nV  	& :=  \{\mbox{subspaces of $(V\otimes\cdots\otimes V)^{\sgn(\sigma)}$}\}
	\end{align*}

	Notice that we stuck some words in the middle of our equation there.
	We did it with the command \verb!\mbox{}!.

\subsection{Common Greek letters}

	(Look!  We made a subsection.)  Greek letters---and the likes---only
	work in math, meaning between dollar signs (notice how I needed
	three dashes to make a long dash).  Here are some:
	$$\alpha,
	\beta, \gamma, \Gamma,
	\delta,\Delta,
	\varepsilon, \epsilon, \zeta, \eta, \theta, \Theta, \iota, \kappa,
	\lambda, \Lambda, \mu, \nu,
	\xi, \Xi,
	\pi, \Pi,
	\rho,
	\sigma,
	\tau,
	\varphi, \phi, \Phi,
	\chi,
	\psi, \Psi,
	\omega, \Omega$$

\subsection{Special symbols}

	(Look!  A different subsection.)  The derivative is defined as
	$$
		\frac{dy}{dx} = \lim_{\Delta x \to 0} \frac{\Delta y}{\Delta x}.
	$$  % notice that the period to end the sentence went inside the dollar signs.  otherwise, it'd be on the next line.

	Let $G$ be a finite group; let $H \leq G$ and let $K \unlhd G$.
	Assume that $H \cap K = \{1 \}$ and that $\vert G \vert  = \vert H
	\vert \vert K \vert$.   Then
	$$
		G \cong H \rtimes_{\phi} K
	$$
	where $\phi: K \to \Aut (H)$ is defined by $\phi_k (h):=khk^{-1}$.

	\section{Lists}
	An enumerated list:
	\begin{enumerate}
		\item muenster
		\item cheddar
		\item
		   \begin{enumerate}
			   \item swiss
			   \item parmesan
		   \end{enumerate}
	\end{enumerate}
	An itemized list:
	\begin{itemize}
		\item groups
		\item rings
		\item fields
	\end{itemize}


\section{Tables}

	\begin{table}[h]
	\begin{center}

	\begin{tabular}{l|c c c }
		$S_3$ & $(1)$ & $(12)$ & $(123)$ \\
		\hline
		trivial & 1 & 1 & 1 \\
		sign & 1 & -1 & 1 \\
		standard & 2 & 0 & -1 \\
	\end{tabular}

	\caption{\label{charS3}Character Table for $S_3$}

	\end{center}
	\end{table}


\section{Literal text}
	You can print stuff like program code exactly as it is typed in a
	monospaced font. Use \verb!\begin{verbatim}! and \verb!\end{verbatim}!,
	as in:
	\begin{verbatim}
	for i = 2 to sqrt[n], do
	   if (i divides n) then output (i, n/i);   // a factorization
	\end{verbatim}

\section{Corollaries, Lemmas, and Other Toys}  % Go up to the top of the .tex file and look at the special definitions for `theorem' and `proof.'  We need those to make this section compile.


	\begin{theorem}
		Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
		Praesent laoreet nibh non elit. Aliquam lacinia lacinia massa.
	\end{theorem}
	\begin{proof}
		Praesent non risus. Praesent pretium risus et sem. Morbi nec
		turpis eget quam aliquet lobortis. Duis tristique tortor et mi
		tristique hendrerit. Vivamus ante eros, suscipit at, adipiscing
		in, viverra at, dui.

		Nulla ultricies, pede nec adipiscing cursus, ante lorem commodo
		tellus, nec lacinia sem velit at purus. Aenean vitae nunc. Mauris
		elementum lectus in leo fermentum ullamcorper. Suspendisse
		lobortis erat at massa. In hac habitasse platea dictumst. Maecenas
		in turpis. Mauris in tortor. Mauris malesuada, tellus sit amet
		tincidunt venenatis, dolor dolor tempor elit, id malesuada lorem
		arcu sit amet nunc. Praesent porttitor urna eget massa.
	\end{proof}

	\begin{corollary} \label{FLT}
		 Let $p$ be a prime.  Let $a \in \ZZ$.  Then $a^p = a (\mbox{mod }p)$.
	\end{corollary}



	\begin{definition}
		Let $X$ be a set.  A \emph{topology} on $X$ is a family of subsets
		$\tau \subseteq \mathcal{P}(X)$ such that:
		\begin{itemize}
			\item[(T1)] $X \in \tau$ and $\emptyset \in \tau$.
			\item[(T2)]  If $A, B \in \tau$ then $A \cap B \in \tau$.
			\item[(T3)] Let $\Lambda$ be an index set and let
			$A_l \in \tau$ for all $l \in \Lambda$.
			Then ${\displaystyle \bigcup_{l \in \Lambda} A_l \in \tau}$.
		\end{itemize}
	\end{definition}

	Corollary \ref{FLT} is called ``Fermat's Little Theorem''.


\begin{thebibliography}{5}

\bibitem{primer}  Getting Started With LaTeX -- a fantastic primer: \\  \url{http://www.maths.tcd.ie/~dwilkins/LaTeXPrimer/}
\bibitem{notsoshort}  This paper does exactly what the title promises: \\
\emph{The Not So Short Introduction to \LaTeX}, by Tobias Oetiker et all. \\ \url{http://tobi.oetiker.ch/lshort/lshort.pdf}
\bibitem{style}   Basic tips on style and \TeX\ tricks: \\ \url{http://www.math.uiuc.edu/~hildebr/tex/basics.html}
\bibitem{detexify}  To find out what is the command for a math symbol, use \\
(I wish it had existed when I started latexing) \\
\url{http://detexify.kirelabs.org/classify.html}
%\bibitem{symbols}  Or you can always do it old-school and browse through a long list of symbols: \\ \url{http://www.andy-roberts.net/misc/latex/tutorial9/symbols.pdf}
\bibitem{aops}   The always-handy AoPS: \\
\url{http://www.artofproblemsolving.com/Wiki/index.php/LaTeX:About}
\end{thebibliography}

\end{document}
