\documentclass[12pt,reqno]{amsart}
\usepackage{fullpage}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{times}
\usepackage{graphicx}
\vfuzz=2pt
% some "funny lines" referred to later:
\newtheorem{thm}{Theorem}[section]
\newtheorem{cor}[thm]{Corollary}
\newtheorem{lem}[thm]{Lemma}
\newtheorem{prop}[thm]{Proposition}
{ \theoremstyle{remark}\newtheorem*{remark}{Remark} }
\newcommand{\class}{MATH 613E: Topics in Analytic Number Theory}
\newcommand{\population}[2]{There are #2 students giving lectures, and also #2 students writing up notes from lectures. Everybody in the class is very #1 about this.}
\newcommand{\tex}{{\tt .tex}}
\begin{document}
\title[Short version of title]{Title of the article}
% or if you want, simply \title{Title of the article}
\author{Your Name}
\email{SOMETHING@math.ubc.ca}
\maketitle
\begin{abstract}
Here's a \LaTeX\ template.
\end{abstract}
\section{Introduction}
\label{first section}
The content of this manuscript is not interesting. The purpose of this manuscript is to provide a template for using \LaTeX\ to complete your written assignment for \class. It can also help as a general \LaTeX primer. For example, look
at
this sentence in the file { \tt template.tex} to see that
\LaTeX
\ mostly ignores
white
space. (If you're keen, look closely at the \tex\ file to figure out why the ``\LaTeX'' got stuck to the word "primer" in the 3rd sentence of this article, but was fine in the sentence before that. Now look at the sentence before this one to see how \LaTeX\ processes quotation marks.) In general, comparing the output to the \tex\ file will teach you (if you don't already know) how do to all sorts of things.
A blank line in the \tex\ file makes a new paragraph. Don't try to do line breaks or page breaks yourself; \LaTeX\ does that automatically.
You can {\em emphasize parts of the text}. If you really want to control how text looks, you can {\it put things in italics} or {\bf in boldface} or in a {\tt fixed-width font}.
You can make comments in the \tex\ file that don't appear in the output, if it helps you.
% Here is one such comment.
Between this sentence and the previous one % and also right in the middle of this one!
is one such comment.
In Section~\ref{math}, we'll talk about typesetting mathematics; in Section~\ref{autonumber}, which starts on page~\pageref{autonumber}, we'll talk about how to automatically number equations, theorems, and sections (some automatically generated numbers appear in this very sentence). Section~\ref{macros} discusses macros, which are definitions of your own commands. Finally, in Section~\ref{how to write} we'll suggest a format for your writing assignment for \class.
% Minor point: each ~ makes a space where a line break is not allowed.
Feel free to experiment with changing your own copy of this file to see what happens; an original copy will remain on the course web page should you need it again.
\section{Typesetting math}
\label{math}
\subsection{Some basics}
Math can be typeset two different ways:
\begin{enumerate}
\item It can be typeset {\em inline}, such as this: $c^2 = a^2+b^2-2ab\cos c$.
\item It can be {\em displayed}, such as this:
\[
c^2 = a^2+b^2-2ab\cos c.
\]
\end{enumerate}
\begin{lem}
Some things look different when typset inline or displayed: $\int_0^1 \frac{2x}{x^2+1} \, dx = \sum_{k=1}^\infty (-1)^{k-1}/k$, but:
\label{display lemma}
\[
\int_0^1 \frac{2x}{x^2+1} \, dx = \sum_{k=1}^\infty (-1)^{k-1}/k.
\]
\end{lem}
There are ways to override this: $\displaystyle \int_0^1 \frac{2x}{x^2+1} \, dx = \sum_{k=1}^\infty (-1)^{k-1}/k$ or $\int_0^1 {\displaystyle \frac{2x}{x^2+1} } \, dx = \sum_{k=1}^\infty (-1)^{k-1}/k$ or $\int_0^1 \frac{2x}{x^2+1} \, dx = \sum\limits_{k=1}^\infty (-1)^{k-1}/k$ or
\[
\textstyle \int_0^1 \frac{2x}{x^2+1} \, dx = \sum_{k=1}^\infty (-1)^{k-1}/k
\]
or
\[
\int\limits_0^1 \tfrac{2x}{x^2+1} \, dx = \sum\nolimits_{k=1}^\infty (-1)^{k-1}/k.
\]
Notice that \LaTeX\ is good at making line breaks in prose but can sometimes get overwhelmed by line breaks in inline math.
Greek letters like $\alpha,\beta,\gamma,\dots$ are available, as well as those capitals $\Gamma,\Delta,\dots$ that don't just look like Roman letters. Lots of other symbols are defined as well---Google around to find them.
\newcommand{\li}{\mathop{\rm li}} % \mathop makes LaTeX treat the "li" like a math operator, like sin and exp. There's a similar thing, \mathrel, for relations like < and \sim.
\begin{remark}
We analytic number theorists use certain notation like $\log (x+\sin x) = \log x + O(1)$ and $\log x\ll_\epsilon x^\epsilon$ and $(x-1)^3 \gg x^3$ and $\pi(x) \sim \li(x)$ and $\pi(x) - \li(x) = o\big( x(\log x)^{-A} \big)$ a lot.
\end{remark}
In this course there are a lot of sums with multiple conditions of summation, so it's useful to know how to make operators like
\begin{equation}
\sum_{\substack{ n\le x \\ n\equiv 3\mod 4}} \quad\text{and}\qquad \prod_{\substack{ p>p_0 \\ \text{$p$ prime} \\ p\equiv 3\pmod 4}}.
\label{bad mods}
\end{equation}
\begin{prop}
\label{subs and supers proposition}
Subscripts, superscripts, and other doodads don't need brackets or spaces when they're a single symbol:
\begin{equation*}
\int_{a}^{b} \frac{8}{9} t_{3}^{\pi} \,dt = \int_a^b \frac89 t_3^\pi \,dt
\end{equation*}
But they do when they're more than one symbol:
\[
\int_{3/4}^{2b} \frac{2x}{x^2+1} t_{odd} \,dt \ne \int_3/4^2b \frac 2x x^2+1 t_odd \,dt
\]
\end{prop}
You can make big parentheses and other delimiters by hand,
\[
\bigg( \Big[ \big\{ ( 4 ) \big\} \Big] \bigg) + \Big( ( \bigg( \big( 7 \bigg) \big) \Big) ),
\]
or you can let \LaTeX\ do it for you:
\[
\left( \sum_{n\le x} \left[ \left\{ \ell \right\} \left\{ 3^k \right\} x^{2^k} \right] \right) + \left( \prod_p \left[ 1 - 1/p^2 \right\} \right.
\]
\subsection{Displays with multiple lines}
If you have a very long {\it expression}, you can put it on multiple lines:
\begin{multline*}
\frac1{(1-x)^2} = \sum_{k=0}^\infty (k+1)x^k = 1 + 2x + 3x^2 + 4x^3 + 5x^4 + 6x^5+7x^6+8x^7 \\ +9x^8 +10x^9+11x^{10} + 12x^{11} + 13x^{12} + 14x^{13} + \cdots
\end{multline*}
If you have a series of {\it equations or inequalities}, you can put them on multiple lines and align them:
\begin{align*}
\frac1{(1-x)^2} &= \sum_{k=0}^\infty (k+1)x^k \\
&= 1 + \sum_{k=1}^\infty (k+1)x^k \\
&= 1+2x+\sum_{k=2}^\infty (k+1)x^k = \cdots
\end{align*}
You can split an expression by hand if it's necessary:
\begin{align*}
\frac1{(1-x)^2} &= \sum_{k=0}^\infty (k+1)x^k \\
&= 1 + 2x + 3x^2 + 4x^3 + 5x^4 + 6x^5+7x^6+8x^7 \\
&\qquad{}+ 9x^8 +10x^9+11x^{10} + 12x^{11} + 13x^{12} + 14x^{13} + \cdots \\
&= \bigg( \sum_{k=0}^\infty x^k \bigg)^2.
\end{align*}
\section{Automatic numbering}
\label{autonumber}
In my opinion, the most indispensable part of \LaTeX\ is its ability to automatically number equations, theorems (and lemmas etc.), sections, page numbers, and bibliographic references---so that if you need to move material around while editing, the numerical references will automatically update themselves. Compare the \tex\ file to the output to see how this is done. Some examples already appeared back on page~\pageref{first section} in Section~\ref{first section}; here are some others.
\begin{thm}
Every even integer is followed by an odd integer.
\label{even then odd}
\end{thm}
\begin{proof}
If $n$ is an even integer, then set
\begin{equation}
m = n+1;
\label{consecutives}
\end{equation}
then $m$ is odd.
\end{proof}
\begin{thm}
Every odd integer is followed by an even integer.
\label{odd then even}
\end{thm}
\begin{proof}
If $n$ is an odd integer, and $m$ is defined as in equation~\eqref{consecutives},
then $m$ is even.
\end{proof}
\begin{remark}
In Theorems~\ref{even then odd} and~\ref{odd then even}, the word ``followed'' can be replaced by ``preceded'', although the proofs would need to be redone. See \cite {ExampleBook} for lots of facts not particularly related to this. You might also look at \cite[page 217] {ExamplePaper}, although I have no idea what's there.
\end{remark}
\begin{cor}
There are almost exactly as many even integers as odd integers between $1$ and $x$.
\end{cor}
Some of the ``funny lines'' at the beginning of the \tex\ file control how theorems and their ilk are numbered: the system used in this document is for theorem numbers to start over in every section (2.1, 2.2, 2.3, then 3.1, etc.). Also, theorems, corollaries, propositions, and lemmas all use the same counter, so that after Lemma~\ref {display lemma} comes Proposition~\ref{subs and supers proposition}, not Proposition~\ref {display lemma}. (This makes it easier for readers to find things.) {\em Equation} numbering, on the other hand, goes sequentially throughout the document (not resetting every section) on its own counter. All of these choices can be changed if you want, but I recommend the given settings.
\section{Macros}
\label{macros}
You can define your own macros to make repetitive phrases easier to type. For example, if you are reading this, you're probably taking \class. \population{ecstatic}{7} Those macros were defined at the beginning of the \tex\ file. Another macro is re-defined right after this sentence in the \tex\ file.
\renewcommand{\mod}[1]{{\ifmmode\text{\rm\ (mod~$#1$)}\else\discretionary{}{}{\hbox{ }}\rm(mod~$#1$)\fi}}
If you're like me and don't like the way the {\tt mod} and {\tt pmod} commands work, as in equation~\eqref{bad mods}, you can use the definition just before this sentence in the \tex\ file (which is complicated so that it will work correcly both inline and displayed). Now the {\tt\textbackslash mod} command displays like this:
\begin{equation}
\sum_{\substack{ n\le x \\ n\equiv 3\mod 4}}
\end{equation}
You can put macro definitions and re-definitions anywhere in the \tex\ file, and they will be active from that point on. You can even put them inside sub-environments to make them temporarily in force if you really want to:
\[
\alpha+\beta=\beta+\alpha
\]
\begin{lem}
\renewcommand{\alpha}{ALPHA}
$\alpha+\beta=\beta+
\renewcommand{\alpha}{{\rm cx}}
\alpha$.
\end{lem}
$
{
\renewcommand{\alpha}{1st\ Greek\ letter}
\alpha
}
+\beta=\beta+
\alpha
$
\[
\alpha+\beta=\beta+\alpha
\]
That being said, for most purposes macros can simply be put at the top of the \tex\ file.
\begin{remark}
By this time, if you've been playing around with the \tex\ file, you might have gotten some errors while compiling (for example, you forget a closing bracket or something). The only helpful thing I can really say about that is that there are only a few types of errors that come up frequently, and you'll learn to figure out how to fix them. Occasionally you'll have to decipher why a correctly compiling file doesn't do what you think it should do; hopefully the above examples will help a bit with that. All answers are known, by someone!
\end{remark}
\section{Suggested structure of your article}
\label{how to write}
% itemize
It's probably still a bit unclear exactly what you're supposed to produce for the written part of your course assessment: we've been using a lot of words---notes, expository article, etc.---that don't all match with one another. Here's my attempt at clarifying these expectations:
\begin{quote}
You should produce an article, on the topic assigned to you, that could serve as a (short) chapter in a good textbook on the subject of the course. The article should contain everything that you would say in class, if you had all the time you wanted to lecture on the topic.
\end{quote}
Some observations on this goal:
\begin{itemize}
\item The article should be written in complete sentences and paragraphs, with mathematics inserted where appropriate. It shouldn't be a series of equations with no explanation. See your favorite textbook for an example.
\item The article shouldn't be a historical record of what the lecturer actually said. You'll have more time to write the article than the lecturer had to give the lectures, and so you'll be able to give a more complete and polished account.
\item On the other hand, the article doesn't need to be written like a paper to be published in a research journal. Even if you had infinite time to lecture on the topic, that doesn't necessarily mean you have to include every single detail. Many intermediate results might be sufficiently covered in the prerequisite analytic number theory course, or in a topic selected by another lecturer. In fact, it might simply be that a particular technical lemma is so complicated that it would detract from the communication of the main topic. Don't use this as an excuse to leave out pertinent details, but it is an option where appropriate---just communicate clearly to the reader that this is what you've done.
\item Include specific references to textbooks or published papers (supplemented, if appropriate, by excellent internet resources).
\end{itemize}
Here's a suggestion on how to organize your article (other outlines are also possible).
\begin{itemize}
\item Introduce the topic
\begin{itemize}
\item Something the reader already knows that's related to the new topic
\item What new question do we want to answer?
\item Give context and history
\item What is conjectured?
\end{itemize}
\item State the main result(s) (perhaps there has been a series of related results---some of them can be stated rigorously but without proving each and every one)
\item Describe the overall strategy of the proof
\item Break out some technical parts of the proof into preliminary lemmas and propositions (try to describe their role in the overall proof as you go)
\item Give the proof(s) of the main result(s)
\item Mention possible improvements and directions for future research
\item Bibliography
\end{itemize}
\subsection*{The bottom line}
If you want to run your ideas by me, get a reality check from me, or just ask for advice for a starting point, you are always welcome to ask me in class or in my office, or to email me.
\begin{thebibliography}{99} % don't worry about the 99
\bibitem{ExamplePaper}
E.~Edelman, ``The probability that a random real Gaussian matrix has $k$ real eigenvalues, related distributions, and the circular law'', {\em J.~Multivariate~Anal.} {\bf 60} (1997), no.~2, 202--232.
\bibitem{ExampleBook}
H.~L.~Montgomery and R.~C.~Vaughan, {\em Multiplicative Number Theory I: Classical Theory}, Cambridge University Press (2007).
\end{thebibliography}
\end{document}