% Document 
\documentclass[12pt]{book}

\usepackage[margin =.75in]{geometry} % set page dimensions
%\usepackage[T1]{fontenc} %
%\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{mathtools,amssymb,amsfonts,amsthm}
\usepackage{color}
\usepackage[usenames,dvipsnames,svgnames,table]{xcolor}
\usepackage{comment}
\usepackage{multirow}
\usepackage{multicol}
\usepackage{tabularx}
\usepackage{tikz}
\usetikzlibrary{petri}
\usetikzlibrary{trees}
\usepackage{url}
\usepackage[linktoc=all,colorlinks=true,linkcolor=blue,urlcolor=Purple,citecolor=cyan]{hyperref}
\usepackage[all]{hypcap}
\usepackage{newverbs}
\usepackage{euscript,mathrsfs,bbm}
\usepackage{pdfpages}
\usepackage{setspace}
%\usepackage[all]{xy}
%\usepackage{wrapfig}
%\usepackage{caption}
\raggedbottom
\allowdisplaybreaks

\specialcomment{lecturenotes}{}{}\excludecomment{lecturenotes}
\specialcomment{answers}{\sss \textsc{Answer: }}{\sss}
%\excludecomment{answers} % comment to compile with answers.
\specialcomment{remarks}{

\sss
\begingroup\color{blue}}
{\endgroup

\sss}
\specialcomment{inremarks}{\begingroup\color{blue}[}{\hspace{-1.8mm}]\endgroup}
\specialcomment{undefined}{\begingroup\color{orange}}{\endgroup}
\specialcomment{unjustified}{\begingroup\color{red}}{\endgroup}
\specialcomment{grammar}{\begingroup\color{Green}}{\endgroup}
\specialcomment{tex}{\begingroup\color{purple}}{\endgroup}

\newverbcommand{\cverb}{\small\color{purple}}{}
\newverbcommand{\everb}{\small\color{blue}}{}

\newcolumntype{L}[1]{>{\hsize=#1\hsize\raggedright\arraybackslash}X}
\newcolumntype{R}[1]{>{\hsize=#1\hsize\raggedleft\arraybackslash}X}
\newcolumntype{C}[1]{>{\hsize=#1\hsize\centering\arraybackslash}X}

\newcommand{\sss}{\vspace{2 mm}\noindent}
\newcommand{\lss}{\vspace{5 mm}\noindent}
\newcommand{\lls}{\vspace{7 mm}\noindent}
\newcommand{\ds}{\displaystyle}
\newcommand{\HR}{\vspace{5pt}\hrule height 1pt \vspace{5pt}}
\newcommand{\atext}[1]{\text{\quad #1 \quad }}
%\newcommand\Tstrut{\rule{0pt}{2.6ex}}         % = `top' strut
%\newcommand\Bstrut{\rule[-1ex]{0pt}{0pt}}   % = `bottom' strut

\newcommand{\ca}{\mathcal}
\newcommand{\fr}{\mathfrak}
\newcommand{\eucal}{\EuScript}
\newcommand{\scr}{\mathscr}
\newcommand{\bbf}{\mathbb{F}}
\newcommand{\bbn}{\mathbb{N}}
\newcommand{\bbr}{\mathbb{R}}
\newcommand{\bbq}{\mathbb{Q}}
\newcommand{\bbc}{\mathbb{C}}
\newcommand{\bbz}{\mathbb{Z}}
\newcommand{\bbp}{\mathbb{P}}
\newcommand{\bfa}{\mathbf{a}}
\newcommand{\bfb}{\mathbf{b}}
\newcommand{\bfc}{\mathbf{c}}
\newcommand{\bfu}{\mathbf{u}}
\newcommand{\bfv}{\mathbf{v}}
\newcommand{\bfx}{\mathbf{x}}

\newcommand{\inv}{^{-1}}
\newcommand{\into}{\hookrightarrow}
\newcommand{\onto}{\twoheadrightarrow}
\newcommand{\isom}{\overset{\sim}{\to}}
\renewcommand{\iff}{\Leftrightarrow}
\renewcommand{\implies}{\Rightarrow}
\renewcommand{\impliedby}{\Leftarrow}
\newcommand{\contradiction}{\Rightarrow\Leftarrow}

\newcommand{\bmat}[1]{\begin{bmatrix}#1\end{bmatrix}}
\newcommand{\pmat}[1]{\begin{pmatrix}#1\end{pmatrix}}
\newcommand{\vmat}[1]{\begin{vmatrix}#1\end{vmatrix}}
\newcommand{\floor}[1]{\left\lfloor #1 \right\rfloor}
\newcommand{\gens}[1]{\left\langle #1 \right\rangle}
\newcommand{\mags}[1]{\left\| #1 \right\|}
\newcommand{\set}[1]{\left\{ #1 \right\}}

\newcommand{\Ad}{\operatorname{Ad}}
\newcommand{\ad}{\operatorname{ad}}
\newcommand{\disc}{\operatorname{disc}}
\newcommand{\domain}{\operatorname{domain}}
\newcommand{\Id}{\operatorname{Id}}
\newcommand{\im}{\operatorname{im}}
\newcommand{\ind}{\operatorname{ind}}
\newcommand{\nul}{\operatorname{Nul}}
\newcommand{\nullity}{\operatorname{nullity}}
\newcommand{\ord}{\operatorname{ord}}
\newcommand{\proj}{\operatorname{proj}}
\newcommand{\rank}{\operatorname{rank}}
\newcommand{\red}{\operatorname{red}}
\newcommand{\bbref}{\operatorname{rref}}
\newcommand{\tr}{\operatorname{tr}}
\newcommand{\trunc}{\operatorname{Trunc}}
\newcommand{\vspan}{\operatorname{span}}

%
\newtheorem{thm}{Theorem}[section]
\newtheorem{prop}[thm]{Proposition}
\newtheorem{cor}[thm]{Corollary}
\newtheorem{lem}[thm]{Lemma}
\newtheorem*{prop*}{Proposition}
\newtheorem*{cor*}{Corollary}
\newtheorem*{lem*}{Lemma}
\newtheorem*{thm*}{Theorem}

\theoremstyle{definition}
\newtheorem{conj}[thm]{Conjecture}
\newtheorem{defn}[thm]{Definition}
\newtheorem*{defn*}{Definition}
\newtheorem{claim}[thm]{Claim}
\newtheorem{example}[thm]{Example}
\newtheorem*{conj*}{Conjecture}
\newtheorem*{rd}{Read from the text}
\newenvironment{answer}{\sss\textsc{Answer:}}{\hfill $\square$}

\newcounter{homework}
\newtheorem{hw}[homework]{Homework}

\newcounter{exercise}[homework]
\newtheorem{exer}[exercise]{Exercise}
\renewcommand{\theexercise}{\arabic{homework}.\arabic{exercise}}

\theoremstyle{remark}
\newtheorem{remark}[thm]{Remark}
\newtheorem*{remark*}{Remark}
\newtheorem{notation}[thm]{Notation}

%%%%%%%%%%%%
%%%%%%%%%%%%
%%%%%%%%%%%%
% 
%%%%%%%%%%%%
%%%%%%%%%%%%
%%%%%%%%%%%%

\begin{document}
\chapter{An introduction to {\LaTeX}}

\section{Resources}

In this course, all written work must be done in {\LaTeX}. Software for composing \LaTeX\ documents is freely available online, and there are also a number of free-to-use websites for creating collaborative \LaTeX\ documents (useful for group assignments).

\sss
\textbf{Links:}
\begin{enumerate}
\item \LaTeX\ wikibook: All things \LaTeX. 

\url{http://en.wikibooks.org/wiki/LaTeX}

\item ShareLaTeX: Collaborative \texttt{.tex} documents.

\url{https://www.sharelatex.com}

\item Overleaf: Another website for collaborative .tex-ing.

\url{https://www.overleaf.com}

\item Detexify: Looking for a symbol but you do not know what it is called? Look up a symbol by drawing it! (Tends to be hit-or-miss, but still generally useful.)

\url{http://detexify.kirelabs.org/classify.html}

\item Symbols list: More than you will ever need ever. 

\url{http://www.tex.ac.uk/tex-archive/info/symbols/comprehensive/symbols-a4.pdf}

\item TikZ: You might learn how to draw pictures one day...

\url{http://www.texample.net/tikz/examples}

\item Acquiring \LaTeX: If you are interested in obtaining \LaTeX\ for personal use... 

\url{http://latex-project.org/ftp.html}

\item Writing with good practices: A reference.

\url{http://www.math.illinois.edu/~dwest/grammar.html}
\end{enumerate}

\section{Modes}

There are two primary \emph{modes} in which \LaTeX\ is written: \emph{text mode}, and \emph{math mode}. Text mode is used for text; write as you would in any word processor. Anything mathematical should be written in math mode. A dollar sign (\cverb;$;) is used to transition between the two modes.

Input: 
{\color{purple}\small
\begin{verbatim}
    A function $f \colon A \to \bbr$ is \emph{continuous} if for each 
    $\epsilon > 0$, there exists a $\delta > 0$, such that if $|x-c| < \delta$, 
    then $|f(x) - f(c)| < \epsilon$.
\end{verbatim}
}

Output: 
\begin{quote}
A function $f \colon A \to \bbr$ is \emph{continuous} if for each $\epsilon > 0$, there exists a $\delta > 0$, such that if $|x-c| < \delta$, then $|f(x) - f(c)| < \epsilon$.
\end{quote}

\sss
Math mode has two styles: math can be written \emph{in-line} (as in the example above using dollar signs) or it sectioned away from text and be \emph{displayed}. Some symbols will be type-set differently depending on the style. You can force displayed math to appear in-line using the command \cverb;\displaystyle; (or \cverb;\ds;$^\dag$) in math mode. However, if you are going to write display-style math, you might as well place it in the \everb;align; \emph{environment} (see the next section).

Input: 
{\color{purple}\small
\begin{verbatim}
    In-line math: $\lim_{x \to \infty} \int_1^x \frac{1}{x}\,dx$, 
    and forced displaystyle in-line: $\ds\lim_{x \to \infty} \int_1^x 
    \frac{1}{x}\,dx$.
\end{verbatim}
}

Output: 
\begin{quote}
In-line math: $\lim_{x \to \infty} \int_1^x \frac{1}{x^2}\,dx$, and forced displaystyle in-line: $\ds\lim_{x \to \infty} \int_1^x \frac{1}{x^2}\,dx$.
\end{quote}

\section{Environments}

In short, an \emph{environment} is simply a set of formatting rules that dictates how text and math are displayed. Every environment is evoked by the command \cverb;\begin{[environment]}; and ended by \cverb;\end{[environment]};. Everything between these commands is subject to the rules of that environment. 

\subsection{Document}

Every \texttt{.tex} file must contain a \everb;document; environment. The \TeX\ compiler will only output what you write in this environment. 

{\color{purple}\small
\begin{verbatim}
\begin{document}
[Turn this into a pdf please!]
\end{document}
\end{verbatim}
}

\subsection{Homework, definitions, theorems, and proof}

The important statements in mathematics each have their own environment; these include \everb;defn;$^\dag$, \everb;thm;$^\dag$, \everb;prop;$^\dag$, \everb;lem;$^\dag$, and \everb;conj;$^\dag$. These key words are intrinsic to my \texttt{.tex} file; if you use someone else's file, the key words used to call these environments may not be the same.

\vspace{3mm}
\noindent
For block quotations, use the \everb;quote; environment. 

\vspace{-3mm}
{\color{purple}\small
\begin{verbatim}
\begin{quote}
...
\end{quote}
\end{verbatim}
}

\begin{defn}
A precise and unambiguous statement that gives meaning to a \emph{key word}. Use \cverb;\emph{[key word]}; to highlight the key word. 

\sss
Definitions \textit{do not require proof}. 
\end{defn}

\vspace{-3mm}
{\color{purple}\small
\begin{verbatim}
\begin{defn}
...
\end{defn}
\end{verbatim}
}

\begin{thm}
Theorems are major mathematical results. Theorems, along with Propositions and Lemmas, are claims that require \emph{proof}. Unproved claims are called \emph{conjectures}.
\end{thm}

\vspace{-3mm}
{\color{purple}\small
\begin{verbatim}
\begin{thm}
...
\end{thm}
\end{verbatim}
}

\begin{prop}
Propositions are mathematical results, but they generally do not carry the same weight as a theorem. Propositions require proof.
\end{prop}

\vspace{-3mm}
{\color{purple}\small
\begin{verbatim}
\begin{prop}
...
\end{prop}
\end{verbatim}
}

\begin{lem}
Lemmas are small, often technical, results. Generally, lemmas are `helpful facts' that are needed to prove much larger results. Lemmas require proof.
\end{lem}

\vspace{-3mm}
{\color{purple}\small
\begin{verbatim}
\begin{lem}
...
\end{lem}
\end{verbatim}
}

\begin{claim}
A catch-all term. Claims require proof.
\end{claim}

\vspace{-3mm}
{\color{purple}\small
\begin{verbatim}
\begin{claim}
...
\end{claim}
\end{verbatim}
}

\begin{proof}
A \emph{proof} is an irrefutable, deductive argument. Be aware that there is a significant difference between giving evidence in support of a claim and proving a claim. Examples do not constitute a proof. Proofs should be written in the \everb;proof; environment.
\end{proof}

\vspace{-3mm}
{\color{purple}\small
\begin{verbatim}
\begin{proof}
...
\end{proof}
\end{verbatim}
}

\begin{answer}
For homework problems that are not proofs, use the \everb;answer;$^\dag$ environment.
\end{answer}

\vspace{-3mm}
{\color{purple}\small
\begin{verbatim}
\begin{answer}
...
\end{answer}
\end{verbatim}
}

\begin{conj}
A conjecture is an unproven statement.
\end{conj}

\vspace{-3mm}
{\color{purple}\small
\begin{verbatim}
\begin{conj}
...
\end{conj}
\end{verbatim}
}

\subsubsection{Naming definitions, theorems, etc.}

You can add a `name' to a definition, theorem, etc. by placing the name in square brackets immediately following the \cverb;\begin{[environment]}; command. A few examples:

{\color{purple}\small
\begin{verbatim}
\begin{defn}[even]
An integer $a$ is \emph{even} if $a = 2b$ for some integer $b$.
\end{defn}
\end{verbatim}
}

\begin{defn}[even]
An integer $a$ is \emph{even} if $a = 2b$ for some integer $b$.
\end{defn}

{\color{purple}\small
\begin{verbatim}
\begin{thm}[Fermat's little theorem]
If $a$ is an integer and $p$ is a prime, then $a^p \equiv a \pmod p$.
\end{thm}
\end{verbatim}
}

\begin{thm}[Fermat's little theorem]
If $a$ is an integer and $p$ is a prime, then $a^p \equiv a \pmod p$.
\end{thm}

\subsubsection{Suppressing numbers}

The automated numbering of definitions, theorems, etc. can be suppressed with an asterisk (\cverb;*;).

{\color{purple}\small
\begin{verbatim}
\begin{defn*}
This definition has no number.
\end{defn*}
\end{verbatim}
}

\begin{defn*}
This definition has no number.
\end{defn*}

{\color{purple}\small
\begin{verbatim}
\begin{lem*}[name]
This lemma has a `name', but no number.
\end{lem*}
\end{verbatim}
}

\begin{lem*}[name]
This lemma has a `name', but no number.
\end{lem*}

\subsection{Lists}

There are a number of environments that support lists, but I will only discuss \everb;enumerate;.

\begin{enumerate}
\item Each numbered item in the list is specified by the key word \cverb;\item;.
\item Numbering is automated... 
\item[$\sqrt 5$.]  ...but you can customize individual items using \cverb;\item[...];.
\item Lists can be nested by calling \everb;enumerate; again.
\begin{enumerate}
\item Again, numbering is automated.
\item And you can continue to nest lists.
\begin{enumerate}
\item These lists may be customized further, but this should be sufficient for now.
\end{enumerate}
\end{enumerate}
\end{enumerate}

{\color{purple}\small
\begin{verbatim}
\begin{enumerate}
\item Each numbered item in the list is specified by the key word \cverb;\item;.
\item Numbering is automated... 
\item[$\sqrt 5$.]  ...but you can customize individual items using \cverb;\item[...];.
\item Lists can be nested by calling \everb;enumerate; again.
\begin{enumerate}
\item Again, numbering is automated.
\item And you can continue to nest lists.
\begin{enumerate}
\item These lists may be customized further, but this should be sufficient for now.
\end{enumerate}
\end{enumerate}
\end{enumerate}
\end{verbatim}
}

\subsection{Displayed equations}

There are a number of environments that produce displayed math. My preferred environments are \everb;align; and \everb;align*;. Every line in \everb;align; will be numbered; lines in \everb;align*; will not.

Input: 
{\color{purple}\small
\begin{verbatim}
    \begin{align}
    \sum_{n=1}^\infty \frac{1}{n^2} = \prod_{p \text{ prime}} \frac{1}{1-p^{-2}}.
    \end{align}
\end{verbatim}
}

Output:
\begin{align}
\sum_{n=1}^\infty \frac{1}{n^2} = \prod_{p \text{ prime}} \frac{1}{1-p^{-2}}.
\end{align}
The equation is numbered (to the right of the equation) so that it may be referenced elsewhere in the document. (See the Section \ref{sec:labels} regarding labels.)

The \everb;align; environment allows for multiple aligned columns across the page. Columns are separated using \cverb;&; and new lines are designated by \cverb;\\;. Columns alternate between right and left aligned.

Input: 
{\color{purple}\small
\begin{verbatim}
    \begin{align*}
        e^{i\pi} &= \sum_{n=1}^\infty\frac{(i\pi)^n}{n!} 
            && \text{(Taylor series for $e^x$)} \\
        &= \sum_{n=1}^\infty \frac{\pi^{2n}}{(2n)!} 
            + i\sum_{n=1}^\infty\frac{\pi^{2n+1}}{(2n+1)!} 
            && \text{(rearrangement of terms)} \\
        &= \cos(\pi) + i \sin(\pi) 
            && \text{(Taylor series for $\cos(x)$ and $\sin(x)$)} \\
        &= -1. && \text{(simplifying the previous expression)}
    \end{align*}
\end{verbatim}
}
Output:
\begin{align*}
e^{i\pi} &= \sum_{n=1}^\infty\frac{(i\pi)^n}{n!} 
&& \text{(Taylor series for $e^x$)} \\
&=\sum_{n=1}^\infty \frac{\pi^{2n}}{(2n)!} 
+ i\sum_{n=1}^\infty\frac{\pi^{2n+1}}{(2n+1)!} 
&& \text{(rearrangement of terms)} \\
&= \cos(\pi) + i \sin(\pi) 
&& \text{(Taylor series for $\cos(x)$ and $\sin(x)$)} \\
&= -1 && \text{(simplifying the previous expression).}
\end{align*}
There are four columns in this example. The first column is right aligned (and contains only $e^{i\pi}$). The second column is left aligned, lining up the `=' signs. The third column (right aligned) is empty because I want the explanation for each line to be lined up on the left.

\section{Labels, links, and references} \label{sec:labels}

The label-reference mechanic is exceptionally useful tool for referencing the numbered items in your document. The number of any theorem, definition, equation, etc. is stored using \cverb;\label{[name]}; following the declaration of any numbered item, and can be recalled anywhere in the document using \cverb;\eqref{[name]}; for equations, and \cverb;\ref{[name]}; for all other items. 

{\color{purple}\small
\begin{verbatim}
\begin{thm} \label{th:example theorem label}
Theorem \ref{th:example theorem label} is self-referential.
\end{thm}
\begin{align} \label{eq:example equation label}
\text{This is equation \eqref{eq:example equation label}.}
\end{align}
\end{verbatim}
}

\begin{thm} \label{th:example theorem label}
Theorem \ref{th:example theorem label} is self-referential.
\end{thm}
\begin{align} \label{eq:example equation label}
\text{This is equation \eqref{eq:example equation label}.}
\end{align}

\sss
The label-reference system is the preferred way to recall numbered items because the numbering will remain consistent even if you move these items around in your document.

\section{Fonts}

\subsection{Text fonts}

\begin{tabular}{l|ll}
&\multicolumn{1}{c}{Input}&\multicolumn{1}{c}{Output}\\
\hline
Default & \cverb;ABCabc123; & ABCabc123\\
Bold & \cverb;\textbf{ABCabc123}; & \textbf{ABCabc123}\\
Italics & \cverb;\textit{ABCabc123}; & \textit{ABCabc123}\\
Small capitals & \cverb;\textsc{ABCabc123}; & \textsc{ABCabc123}\\
Typewriter & \cverb;\texttt{ABCabc123}; & \texttt{ABCabc123}\\
\end{tabular}

\subsection{Math fonts}

\begin{tabular}{l|ll}
&\multicolumn{1}{c}{Input}&\multicolumn{1}{c}{Output}\\
\hline
Default & \cverb;ABCabc123; & $ABCabc123$\\
Roman & \cverb;\mathrm{ABCabc123}; & $\mathrm{ABCabc123}$\\
Bold & \cverb;\mathbf{ABCabc123}; & $\mathbf{ABCabc123}$\\
Italics & \cverb;\mathit{ABCabc123}; & $\mathit{ABCabc123}$\\
Typewriter & \cverb;\mathtt{ABCabc123}; & $\mathtt{ABCabc123}$\\
Blackboard bold\footnotemark & \cverb;\mathbb{ABC}; & $\mathbb{ABC}$\\
Blackboard bold (more) & \cverb;\mathbbm{abc12}; & $\mathbbm{abc12}$\\
Calligraphic & \cverb;\mathcal{ABC}; & $\mathcal{ABC}$\\
Euler script & \cverb;\EuScript{ABC}; & $\EuScript{ABC}$\\
Fraktur & \cverb;\mathfrak{ABCabc123}; & $\mathfrak{ABCabc123}$\\
Script & \cverb;\mathscr{ABC}; & $\mathscr{ABC}$\\
\end{tabular}

\footnotetext{How else would you write in bold on a blackboard?}

\sss
Note that some fonts are only available for certain characters.

\subsection{Text in math mode}

Text can be written in math mode using \cverb;\text{[text]}; or \cverb;\atext{[text]};$^\dag$. These commands are particularly useful when it is inconvenient or impossible to leave math mode.

Input: 
{\color{purple}\small
\begin{verbatim}
    \begin{align*}
    \sum_{n=1}^\infty \frac{1}{n^s} = \prod_{p \text{ prime}} \frac{1}{1-p^{-s}} 
    \atext{is the Euler product for $\zeta(s)$ (if $\Re(s) > 1$).}
    \end{align*}
\end{verbatim}
}

Output: 
\begin{align*}
\sum_{n=1}^\infty \frac{1}{n^s} = \prod_{p \text{ prime}} \frac{1}{1-p^{-s}} 
\atext{is the Euler product of $\zeta(s)$ (if $\Re(s) > 1$).}
\end{align*}

\subsection{Key words}

Key words should be highlighted using \cverb;\emph;. Visually, this has the same effect as italicizing the word (or romanizing, if the word appears in italicized text).

Input: \cverb;It's time to \emph{sing}.;

Output: It's time to \emph{sing}.

Input: 
{\color{purple}\small
\begin{verbatim}
    \textit{Bacon pancakes, makin' bacon pancakes. \\ 
    Take some bacon and I put it in a pancake. \\ 
    Bacon pancakes, that's what it's gonna make. \\ 
    Ba- con pan- caaake \dotso in \emph{New York}}.
\end{verbatim}
}

Output: 

\begin{quote}
\textit{Bacon pancakes, makin' bacon pancakes. \\ Take some bacon and I put it in a pancake. \\ Bacon pancakes, that's what it's gonna make. \\ Ba- con pan- caaake \dotso in \emph{New York}.}
\end{quote}

\url{https://www.youtube.com/watch?v=cUYSGojUuAU} 

\section{Symbols}

This is by no means an exhaustive list of symbols and commands. The intension is to provide a searchable reference of frequently used symbols. Nearly all of these commands are standard, but a few of the commands are my own (so you will only have access to these commands if you are using my \texttt{.tex} file). I have marked those commands with a dagger ($^\dag$). 

Unless otherwise stated, the commands are only available in math mode (the purple text must be placed between dollar signs to be displayed properly).

\subsection{Algebraic expressions}

\begin{tabular}{lc|p{4.5in}}
\multicolumn{2}{c|}{Example} & \multicolumn{1}{c}{Translation} \\
\hline
\cverb;a + b; & $a + b$ & $a$ plus $b$\\
\cverb;a - b; & $a - b$ & $a$ minus $b$\\
\cverb;a \cdot b; & $a \cdot b$ & $a$ times $b$ (uncommon; in most cases we simply write $ab$)\\
\cverb;a \times b; & $a \times b$ & Cartesian product of $a$ and $b$, (also: $a$ cross/times $b$) \\
\cverb;\frac{a}{b}; & $\frac{a}{b}$ & $a$ over (divided by) $b$\\
\cverb;a/b; & $a/b$ & $a$ over (divided by) $b$ (preferred for in-line expressions when it improves readability)\\
\cverb;a^{n}; & $a^{n}$ & $a$ to the $n$\\
\cverb;a^{n^{k^{13}}}; & $a^{n^{k^{13}}}$ & (nested superscripts)\\
\cverb;a_{n}; & $a_{n}$ & $a$ sub $n$\\
\cverb;a_{n_{k_{13}}}; & $a_{n_{k_{13}}}$ & (nested subscripts)\\
\cverb;\sqrt{a}; & $\sqrt{a}$ & square root of $a$\\
\cverb;\sqrt[n]{a}; & $\sqrt[n]{a}$ & $n$-th root of $a$\\
\cverb;|a|; & $|a|$ & absolute value of $a$\\
\cverb;\pm a; & $\pm a$ & plus or minus $a$\\
\cverb;\binom{a}{b}; & $\binom{a}{b}$ & $a$ choose $b$\\
\cverb;a \pmod{p}; & $a \pmod{p}$ & $a$ mod $p$ ($a$ modulo $p$)\\
\end{tabular}

\subsection{Algebraic relations}

\begin{tabular}{lc|lc|p{.55\textwidth}}
\multicolumn{1}{c}{Input} & Output & \multicolumn{2}{c|}{Example} & \multicolumn{1}{c}{Translation} \\
\hline
\cverb;=; & $=$ & \cverb;a = b; & $a = b$ & $a$ is equal to $b$\\
\cverb;<; & $<$ & \cverb;a < b;  & $a < b$ & $a$ is less than $b$\\
\cverb;\le; & $\le$ & \cverb;a \le b;  & $a \le b$ & $a$ is less than or equal to $b$\\
\cverb;>; & $>$ & \cverb;a > b;  & $a > b$ & $a$ is greater than $b$\\
\cverb;\ge; & $\ge$ & \cverb;a \ge b; & $a \ge b$ & $a$ is greater than or equal to $b$\\
\cverb;\equiv; & $\equiv$ & \cverb;a \equiv b; & $a \equiv b$ & $a$ is congruent to $b$ (generally used with \cverb;\pmod;)\\
\cverb;\sim; & $\sim$ & \cverb;a \sim b; & $a \sim b$ & $a$ is related to $b$ \\
\cverb;\mid; & $\mid$ & \cverb;a \mid b; & $a \mid b$ & $a$ divides $b$
\end{tabular}

\lss
Many of these commands can be negated using the command \cverb;\not;. Note that some symbols have special commands for negation.

\lss
\begin{tabular}{lc}
\multicolumn{1}{c}{Input} & Output \\
\hline
\cverb;\ne; & $\ne$ \\
\cverb;\not <; & $\not <$ \\
\cverb;\not\le; & $\not\le$ \\
\cverb;\not >; & $\not >$ \\
\cverb;\not\ge; & $\not\ge$ \\
\cverb;\not\equiv; & $\not\equiv$ \\
\cverb;\nsim; & $\nsim$ \\
\cverb;\nmid; & $\nmid$ 
\end{tabular}

\subsection{Braces, Brackets, Parentheses, etc.}

\begin{tabular}{lc}
\multicolumn{1}{c}{Input} & Output \\
\hline
\cverb;(a,b); & $(a,b)$ \\
\cverb;[a,b]; & $[a,b]$ \\
\cverb;|a,b|; & $|a,b|$ \\
\cverb;\|a,b\|; or \cverb;\mags;$^\dag$\cverb;{a,b}; & $\mags{a,b}$ \\
\cverb;\{a,b\}; or \cverb;\set;$^\dag$\cverb;{a,b}; & $\set{a,b}$ \\
\cverb;\langle a,b \rangle; or \cverb;\gens;$^\dag$\cverb;{a,b}; & $\gens{a,b}$ \\
\cverb;\lfloor a,b \rfloor; or \cverb;\floor;$^\dag$\cverb;{\frac{a}{b}}; & $\floor{\frac{a}{b}}$ \\
\end{tabular}

\subsubsection{Resizing delimiters}
These symbols can be automatically resized using the \cverb;\left; and \cverb;\right; commands.

\vspace{2mm}
Input: \cverb;\left\{ \floor{ \left( a^n \right)^{n^2} }^{\frac{1}{2n-1}} \right\};

Output:
\begin{align*}
\left\{ \floor{ \left( a^n \right)^{n^2} }^{\frac{1}{2n-1}} \right\}
\end{align*}

\sss
The \cverb;\left; and \cverb;\right; commands do not need to take the same delimiters, but they do have to be paired. A period \cverb;.; can be used to produce one-sided delimiters.

\vspace{2mm}
Input: 
{\color{purple}\small
\begin{verbatim}
        \begin{align*}
        \int_a^b x\,dx = \left. \frac{x^2}{2} \right|_a^b
        \end{align*}
\end{verbatim}
}

Output:
\begin{align*}
\left.\int_a^b x\,dx = \frac{x^2}{2}\right|_a^b
\end{align*}

\subsection{Dots} \label{app:dots}

The \cverb;\dots; command is pretty much all you need (even in text mode).  There are also more specific commands, but for the most part you should not need anything more than \cverb;\ldots; and \cverb;\cdots;. 

\begin{tabular}{l|l|ll}
& Command & \multicolumn{2}{c}{Example} \\
\hline
Comma separated lists & \cverb;\dotsc; & \cverb;1, 2, 3, \dotsc, 9; & $1, 2, 3, \dotsc, 9$\\
Lower dots & \cverb;\ldots; & \cverb;1, 2, 3, \ldots,9;& $1, 2, 3,\ldots,9$\\
Binary expressions & \cverb;\dotsb; & \cverb;1 + 2 + \dotsb + 9; & $1 + 2 + \dotsb + 9$\\
Centered dots & \cverb;\cdots; & \cverb;1 + 2 + \cdots + 9; & $1+2+\cdots+9$\\
Multiplication (binary) & \cverb;\cdot; & \cverb;a \cdot b; & $a \cdot b$\\
Multiplication & \cverb;\dotsm; & \cverb;1 \cdot 2 \cdot 3 \dotsm 9; & $1\cdot 2 \cdot 3 \dotsm 9$\\
Otherwise [wide ellipsis] & \cverb;\dotso; & \cverb;a, b, c, \dotso, z; & a, b, c, \dotso, z\\
Vertical dots & \cverb;\vdots; & & $\vdots$\\
Diagonal dots & \cverb;\ddots; & & $\ddots$
\end{tabular}

\subsection{Functional notation}

\begin{tabular}{lc|lc|p{2.5in}}
\multicolumn{1}{c}{Input} & Output & \multicolumn{2}{c|}{Example} & \multicolumn{1}{c}{Translation} \\
\hline
\cverb;\to; & $\to$ & \cverb;f \colon A \to B; & $f \colon A \to B$ & $f$ is a map from $A$ to $B$\\
\cverb;\into;$^\dag$ & $\into$ & \cverb;f \colon A \into B; & $f \colon A \into B$ & $f$ is an injective map from $A$ to $B$ ($f$ maps $A$ into $B$)\\
\cverb;\onto;$^\dag$ & $\onto$ & \cverb;f \colon A \onto B; & $f \colon A \onto B$ & $f$ is a surjective map from $A$ to $B$ ($f$ maps $A$ onto $B$)\\
\cverb;\isom;$^\dag$ & $\isom$ & \cverb;f \colon A \isom B; & $f \colon A \isom B$ & $f$ is a bijective map from $A$ to $B$ ($f$ is an isomorphism from $A$ to $B$)\\
\cverb;\circ; & $\circ$ & \cverb;f \circ g; & $f \circ g$ & $f$ composed with $g$\\
\cverb;\mapsto; & $\mapsto$ & \cverb;x \mapsto f(x); & $x \mapsto f(x)$ & $x$ is mapped to $f(x)$\\
\cverb;f\inv;$^\dag$\cverb;(x); & $f\inv(x)$ & \cverb;\sin\inv(\theta); & $\sin\inv(\theta)$ & $f$ inverse, arcsine theta\\
\end{tabular}

\sss
Defining functions:

Input: \cverb;f \colon A \to B;

Output: $f \colon A \to B$

\vspace{2mm}
Input: 
{\color{purple}\small
\begin{verbatim}
    \begin{align*} 
    f \colon A &\to B \\ 
    x &\mapsto f(x) 
    \end{align*}
\end{verbatim}
}

Output: \begin{align*} f \colon A &\to B \\ x &\mapsto f(x) \end{align*}

\begin{remark}
Use \cverb;\colon; (not \cverb;:;) for proper spacing.
\end{remark}

Input: 
{\color{purple}\small
\begin{verbatim}
    \begin{align*} 
    f \colon \mathbb{R} &\to \mathbb{R} \\ 
    x &\mapsto x^2 
    \end{align*}
\end{verbatim}
}

Output: \begin{align*} f \colon \mathbb{R} &\to \mathbb{R} \\ x &\mapsto x^2 \end{align*}

Translation: $f$ is the function from the real numbers to the real numbers that maps $x$ to $x^2$. (In other words, $f(x) = x^2$.)

Input: 
{\color{purple}\small
\begin{verbatim}
    \begin{align*} 
    f \colon \mathbb{Z} &\to \mathbb{F}_p \\ 
    a &\mapsto a \bmod p 
    \end{align*}
\end{verbatim}
}

Output: \begin{align*} f \colon \mathbb{Z} &\to \mathbb{F}_p \\ a &\mapsto a \bmod p \end{align*}

Translation: $f$ is the function from the integers to the finite field of order $p$ that maps $a$ to the reduction of $a$ modulo $p$.

\subsection{Greek alphabet}

Math mode commands for Greek letters.

\sss
\begin{tabular}{llll}
& Capital & Lowercase & Variant\\
\hline
A, $\alpha$ & \cverb;\mathrm{A}; & \cverb;\alpha;\\
B, $\beta$ & \cverb;\mathrm{B}; & \cverb;\beta;\\
$\Gamma$, $\gamma$ & \cverb;\Gamma; & \cverb;\gamma;\\
$\Delta$, $\delta$ & \cverb;\Delta; & \cverb;\delta;\\
E, $\epsilon$, $\varepsilon$ & \cverb;\mathrm{E}; & \cverb;\epsilon; & \cverb;\varepsilon;\\
Z, $\zeta$ & \cverb;\mathrm{Z}; & \cverb;\zeta;\\
H, $\eta$ & \cverb;\mathrm{H}; & \cverb;\eta;\\
$\Theta$, $\theta$, $\vartheta$ & \cverb;\Theta; & \cverb;\theta; & \cverb;\vartheta;\\
I, $\iota$ & \cverb;\mathrm{I}; & \cverb;\iota;\\
K, $\kappa$ & \cverb;\mathrm{K}; & \cverb;\kappa;\\
$\Lambda$, $\lambda$ & \cverb;\Lambda; & \cverb;\lambda;\\
M, $\mu$ & \cverb;\mathrm{M}; & \cverb;\mu;\\
N, $\nu$ & \cverb;\mathrm{N}; & \cverb;\nu;\\
$\Xi,\xi$ & \cverb;\Xi; & \cverb;\xi;\\
O, o & \cverb;\mathrm{O}; & \cverb;\mathrm{o};\\
$\Pi$, $\pi$, $\varpi$ & \cverb;\Pi; & \cverb;\pi; & \cverb;\varpi;\\
P, $\rho$, $\varrho$ & \cverb;\mathrm{P}; & \cverb;\rho; & \cverb;\varrho;\\
$\Sigma,\sigma,\varsigma$ & \cverb;\Sigma; & \cverb;\sigma; & \cverb;\varsigma;\\
T, $\tau$ & \cverb;\mathrm{T}; & \cverb;\tau;\\
$\Upsilon$, $\upsilon$ & \cverb;\Upsilon; & \cverb;\upsilon;\\
$\Phi$, $\phi$, $\varphi$ & \cverb;\Phi; & \cverb;\phi; & \cverb;\varphi;\\
X, $\chi$ & \cverb;\mathrm{X}; & \cverb;\chi;\\
$\Psi$, $\psi$ & \cverb;\Psi; & \cverb;\psi;\\
$\Omega$, $\omega$ & \cverb;\Omega; & \cverb;\omega;
\end{tabular}

\subsection{Large symbols}

Symbols, as they appear in the \everb;align; environment (or other similar environments). These symbols will be displayed differently if they are used in-line.

\lss
\begin{tabular}{lc|lc|p{2in}}
\multicolumn{1}{c}{Input} & Output & \multicolumn{2}{c|}{Example} & \multicolumn{1}{c}{Translation} \\
\hline
\cverb;\sum; & $\ds\sum$ & \cverb;\sum_{n=1}^{\infty} n^{-s}; & $\ds\sum_{n=1}^{\infty} n^{-s}$ & the sum, from $1$ to infinity, of $n$ to the minus $s$\\
\cverb;\prod; & $\ds\prod$ & \cverb;\prod_{k=1}^{n} k; & $\ds\prod_{k=1}^n k$ & the product of the first $n$ natural numbers\\
\cverb;\bigcup; & $\ds\bigcup$ & \cverb;\bigcup_{i=1}^{\infty} A_i; & $\ds\bigcup_{i=1}^\infty A_i$ & the union, from 1 to infinity, of the $A_i$\\
\cverb;\bigcap; & $\ds\bigcap$ & \cverb;\bigcap_{i=1}^{n} A_i; & $\ds\bigcap_{i=1}^n A_i$ & the intersection, from 1 to $n$, of the $A_i$\\
\end{tabular}

\subsection{Logical symbols}

\begin{tabular}{lc|lc|p{2in}}
\multicolumn{1}{c}{Input} & Output & \multicolumn{2}{c|}{Example} & \multicolumn{1}{c}{Translation} \\
\hline
\cverb;\implies;$^\dag$ & $\implies$ & \cverb;X \implies Y; & $X \implies Y$ & $X$ implies $Y$\\
\cverb;\impliedby;$^\dag$ & $\impliedby$ & \cverb;X \impliedby Y; & $X \impliedby Y$ & $X$ is implied by $Y$\\
\cverb;\iff;$^\dag$ & $\iff$ & \cverb;X \iff Y; & $X \iff Y$ & $X$ if and only if $Y$\\
\cverb;\contradiction;$^\dag$ & $\contradiction$ & & & contradiction\\
\cverb;\neg; & $\neg$ & \cverb;\neg X; & $\neg X$ & not $X$ (negate $X$) also...\\
\cverb;\sim; & $\sim$ & \cverb;\sim X; & $\sim X$ & it is not true that $X$\\
\cverb;\land; & $\land$ & \cverb;X \land Y; & $X \land Y$ & $X$ and $Y$\\
\cverb;\lor; & $\lor$ & \cverb;X \lor Y; & $X \lor Y$ & $X$ or $Y$\\
\cverb;\forall; & $\forall$ & \cverb;\forall a \in A; & $\forall a \in A$ & for all elements in $A$\\
\cverb;\exists; & $\exists$ & \cverb;\exists b \in B; & $\exists b \in B$ & there exists a $b$ in $B$\\
\cverb;!; & $!$ & \cverb;\exists !b \in B; & $\exists !b \in B$ & there exists a unique $b$ in $B$\\
\end{tabular}

\subsection{Quotation marks}

The left quotation key is used to produce appropriate facing quotation marks.

\lss
\begin{tabular}{ll}
Input & Output \\
\hline
\cverb;"Quotation marks always face right." ; & "Quotation marks always face right."\\
\cverb;`Use the left-facing mark...'; & `Use the left-facing mark...' \\
\cverb;``...for left-facing quotation marks."; & ``...for left-facing quotation marks." \\
\end{tabular}

\subsection{Set notation}

Defining sets:

Input: \cverb;A = \{ [elements] : [conditions]\};

Output: $A = \{ [elements] : [conditions]\}$

\begin{remark}
Use \cverb;:; (not \cverb;\colon;) for proper spacing.
\end{remark}

\sss
Example:

Input: \cverb;\mathbb{N} = \{ a \in \mathbb{Z} : a > 0 \};

Output: $\mathbb{N} = \{ a \in \mathbb{Z} : a > 0 \}$

Translation: The natural numbers are the set of elements in the integers that are greater than. (The natural numbers are the set of positive integers.)

\sss
Example:

Input: \cverb;\mathbb{Q} = \left\{ \frac{a}{b} : a,b \in \mathbb{Z}, b \ne 0 \right\};

Output: $\mathbb{Q} = \left\{ \frac{a}{b} : a,b \in \mathbb{Z}, b \ne 0 \right\}$

Translation: The rational numbers are the set of numbers of the form $a/b$, where $a$ and $b$ are integers, and $b$ is non-zero.

\lss
\begin{tabular}{lc|lc|p{2.8in}}
\multicolumn{1}{c}{Input} & Output & \multicolumn{2}{c|}{Example} & \multicolumn{1}{c}{Translation} \\
\hline
\cverb;\in; & $\in$ & \cverb;a \in A; & $a \in A$ & $a$ is an element of $A$\\
\cverb;\subseteq; & $\subseteq$ & \cverb;A \subseteq B;  & $A \subseteq B$ & $A$ is a subset of $B$\\
\cverb;\subset; & $\subset$ & \cverb;A \subset B;  & $A \subset B$ & $A$ is a proper subset of $B$\\
\cverb;\supseteq; & $\supseteq$ & \cverb;A \supseteq B; & $A \supseteq B$ & $A$ contains $B$ (as a subset)\\
\cverb;\supset; & $\supset$ & \cverb;A \supset B; & $A \supset B$ & $A$ contains $B$ as a proper subset\\
\cverb;=; & $=$ & \cverb;A = B; & $A = B$ & $A$ is equal to $B$\\
\cverb;\cong; & $\cong$ & \cverb;A \cong B; & $A \cong B$ & $A$ is isomorphic to $B$\\
\cverb;\cup; & $\cup$ & \cverb;A \cup B; & $A \cup B$ & $A$ union $B$\\
\cverb;\cap; & $\cap$ & \cverb;A \cap B; & $A \cap B$ & $A$ intersect $B$\\
\cverb;-; & $-$ & \cverb;A-B; & $A-B$ & $A$ (set) minus $B$ (i.e. the elements of $A$ that are not in $B$)\\
\cverb;|; & $|$ & \cverb;|A|; & $|A|$ & cardinality of $A$\\
\cverb;\scr;$^\dag$ \cverb;P(A); & $\scr P(A)$ & {\color{white}.} & {\color{white}.} & the power set of $A$\\
\cverb;A^c;& $A^c$ & & & the complement of $A$ (also: \cverb;\overline{A}; $\overline A$)\\
\cverb;\varnothing; & $\varnothing$ & \cverb;\{\} = \varnothing; & $\{\} = \varnothing$ & $\{\}$ is the empty set (also: \cverb;\emptyset; $\emptyset$)
\end{tabular}

\sss
Negations:

\sss
\begin{tabular}{lc}
\multicolumn{1}{c}{Input} & Output \\
\hline
\cverb;\notin; & $\notin$ \\
\cverb;\nsubseteq; & $\nsubseteq$ \\
\cverb;\not\subset; & $\not\subset$ \\
\cverb;\nsupseteq; & $\nsupseteq$ \\
\cverb;\not\supset; & $\not\supset$ 
\end{tabular}

\subsection{Special symbols}

Most of these commands are valid in both math mode and text mode. 

\lss
\begin{tabular}{lcl}
\multicolumn{1}{c}{Input} & Output & \multicolumn{1}{c}{Comment}\\
\hline
\cverb;\#; & \# \\
\cverb;\$; & \$ \\
\cverb;\%; & \% \\
\cverb;\^{}; & \^{} & text mode only\\
\cverb;\&; & \& \\
\cverb;\_; & \_ \\
\cverb;\{; & \{ \\
\cverb;\}; & \} \\
\cverb;\textgreater; & \textgreater\\
\cverb;\textless; & \textless\\
\cverb;\textbackslash; & \textbackslash\\
\cverb;\backslash; & $\backslash$ & math mode only\\
\end{tabular}

\section{Color}


\subsection{Colored text and text boxes}

Colored text is created using \cverb;{\color{[color]} [text] }; (also \cverb;\textcolor{[color]}{[text]};). Here are a few key words for colors in the colors they generate. 

\begin{multicols}{4}
{\color{blue} blue}

{\color{Brown} Brown}
{\color{brown} brown}

{\color{Cyan} Cyan}
{\color{cyan} cyan}

{\color{Gold} Gold}

{\color{gray} gray}

{\color{Green} Green}
{\color{green} green}

{\color{Magenta} Magenta}
{\color{magenta} magenta}

{\color{Maroon} Maroon}

{\color{Navy} Navy}

{\color{Orange} Orange}
{\color{orange} orange}

{\color{pink} pink}

{\color{Purple} Purple}
{\color{purple} purple}

{\color{red} red}

{\color{Silver} Silver}

\colorbox{black}{\color{Yellow} Yellow \color{yellow} yellow}

{\color{YellowGreen} YellowGreen}
\end{multicols}

\noindent
Capitalization matters!\footnote{Why do some names have two colors? It's a long story.

\url{http://en.wikipedia.org/wiki/Cyan\#Cyan_on_the_web_and_in_printing}}

\sss
Backgrounds are colored using \cverb;\colorbox{[color]}{[text]};.

\vspace{2mm}
\begin{tabularx}{.9\textwidth}{C{1}C{1}C{1}C{1}C{1}C{1}C{1}C{1}}
\multicolumn{2}{C{2.27}}{\cellcolor{blue} \textcolor{white}{blue}} &\multicolumn{2}{C{2.27}}{\cellcolor{gray} \textcolor{white}{gray}} & \multicolumn{2}{C{2.27}}{\cellcolor{Navy} \textcolor{white}{Navy}} & \multicolumn{2}{C{2.27}}{\cellcolor{red} \textcolor{white}{red}}\\
\cellcolor{Brown} \textcolor{white}{Brown} & \cellcolor{brown} \textcolor{white}{brown} &\cellcolor{Green} \textcolor{white}{Green} & \cellcolor{green} green & \cellcolor{Orange} Orange & \cellcolor{orange} orange & \multicolumn{2}{C{2.27}}{\cellcolor{Silver} \textcolor{black}{Silver}}\\
\cellcolor{Cyan} \textcolor{black}{Cyan} & \cellcolor{cyan} \textcolor{white}{cyan} & \cellcolor{Magenta} \textcolor{white}{Magenta} & \cellcolor{magenta} \textcolor{white}{magenta}  & \multicolumn{2}{C{2.27}}{\cellcolor{pink} \textcolor{black}{pink}} & \cellcolor{Yellow} Yellow & \cellcolor{yellow} yellow\\
\multicolumn{2}{C{2.27}}{\cellcolor{Gold} Gold} & \multicolumn{2}{C{2.27}}{\cellcolor{Maroon} \textcolor{white}{Maroon}} & \cellcolor{Purple} \textcolor{white}{Purple} & \cellcolor{purple} \textcolor{white}{purple} & \multicolumn{2}{C{2.27}}{\cellcolor{YellowGreen} YellowGreen}\\
\end{tabularx}

\sss
And, of course, \framebox{black} and \colorbox{black}{\color{white}white}.

\sss
The commands \cverb;\color;, \cverb;\textcolor;, and \cverb;\colorbox; work in both math and text mode.

\subsection{Mixing colors}

Shades of colors can be specified using the command \cverb;[color!#];, where the number determines the percentage of that color used in the mix. When only one color is specified, the remainder of the mixture is white.

\sss
\begin{tabular}{llcc}
Input & Output & \% blue (box) & \% white (box)\\
\hline
\cverb;\colorbox{blue!100}{\color{red!0}red}; & \colorbox{blue!100}{\color{red!0}red} & 100 & 0\\
\cverb;\colorbox{blue!90}{\color{red!10}red}; & \colorbox{blue!90}{\color{red!10}red} & 90 & 10\\
\cverb;\colorbox{blue!80}{\color{red!20}red}; & \colorbox{blue!80}{\color{red!20}red} & 80 & 20\\
\cverb;\colorbox{blue!70}{\color{red!30}red}; & \colorbox{blue!70}{\color{red!30}red} & 70 & 30\\
\cverb;\colorbox{blue!60}{\color{red!40}red}; & \colorbox{blue!60}{\color{red!40}red} & 60 & 40\\
\cverb;\colorbox{blue!50}{\color{red!50}red}; & \colorbox{blue!50}{\color{red!50}red} & 50 & 50\\
\cverb;\colorbox{blue!40}{\color{red!60}red}; & \colorbox{blue!40}{\color{red!60}red} & 40 & 60\\
\cverb;\colorbox{blue!30}{\color{red!70}red}; & \colorbox{blue!30}{\color{red!70}red} & 30 & 70\\
\cverb;\colorbox{blue!20}{\color{red!80}red}; & \colorbox{blue!20}{\color{red!80}red} & 20 & 80\\
\cverb;\colorbox{blue!10}{\color{red!90}red}; & \colorbox{blue!10}{\color{red!90}red} & 10 & 90\\
\cverb;\colorbox{blue!0}{\color{red!100}red}; & \colorbox{blue!0}{\color{red!100}red} & 0 & 100
\end{tabular}

\sss
More than one color can be specified as inputs as long as the colors are separated by ``percent". The last color is always used to fill out the mixture.

\sss
\begin{tabular}{llcc}
Input & Output & \% Cyan & \% Magenta\\
\hline
\cverb;\colorbox{Cyan!0!Magenta}{text}  ; & \colorbox{Cyan!0!Magenta}{text} & 0 & 100 \\
\cverb;\colorbox{Cyan!10!Magenta}{text} ; & \colorbox{Cyan!10!Magenta}{text} & 10 & 90 \\
\cverb;\colorbox{Cyan!20!Magenta}{text} ; & \colorbox{Cyan!20!Magenta}{text} & 20 & 80 \\
\cverb;\colorbox{Cyan!30!Magenta}{text} ; & \colorbox{Cyan!30!Magenta}{text} & 30 & 70 \\
\cverb;\colorbox{Cyan!40!Magenta}{text} ; & \colorbox{Cyan!40!Magenta}{text} & 40 & 60 \\
\cverb;\colorbox{Cyan!50!Magenta}{text} ; & \colorbox{Cyan!50!Magenta}{text} & 50 & 50 \\
\cverb;\colorbox{Cyan!60!Magenta}{text} ; & \colorbox{Cyan!60!Magenta}{text} & 60 & 40 \\
\cverb;\colorbox{Cyan!70!Magenta}{text} ; & \colorbox{Cyan!70!Magenta}{text} & 70 & 30 \\
\cverb;\colorbox{Cyan!80!Magenta}{text} ; & \colorbox{Cyan!80!Magenta}{text} & 80 & 20 \\
\cverb;\colorbox{Cyan!90!Magenta}{text} ; & \colorbox{Cyan!90!Magenta}{text} & 90 & 10 \\
\cverb;\colorbox{Cyan!100!Magenta}{text}; & \colorbox{Cyan!100!Magenta}{text} & 100 & 0 
\end{tabular}

\sss
The reason why I put ``percent" in quotation marks is because when mixing more than two colors, the numbers may not be what you expect.

\sss
\begin{tabular}{llccc}
Input & Output & \% red & \% blue & \% yellow\\
\hline
\cverb;\colorbox{red!50!blue!66!yellow}{text}; & \colorbox{red!50!blue!66!yellow}{text} & 33 & 33 & 34 \\
\cverb;\colorbox{red!33!blue!33!yellow}{text}; & \colorbox{red!33!blue!33!yellow}{text} & 11 & 22 & 67
\end{tabular}

\sss
\begin{tabular}{llccc}
Input & Output & \% red & \% blue & \% white\\
\hline
\cverb;\colorbox{red!50!blue}{text}; & \colorbox{red!50!blue}{text} & 50 & 50 & 0\\
\cverb;\colorbox{red!50!blue!50}{text}; & \colorbox{red!50!blue!50}{text} & 25 & 25 & 50\\
\cverb;\colorbox{red!33!blue!33!white!33}{text}; & \colorbox{red!33!blue!33!white!33}{text} & 4 & 7 & 89
\end{tabular}

\sss
However if you want to be this specific about blending colors, you might as well use \texttt{rgb}, \texttt{html}, or one of the other standard conventions for specifying colors. (See the \LaTeX\ Wikibook for details.) 

\renewcommand{\thefootnote}{\fnsymbol{footnote}}
\setcounter{footnote}{2}
\footnotetext{These commands are unique to my \texttt{.tex} file.}
\end{document}