%% example.tex %% 12 February 2009
\documentclass[10pt,twoside]{article} %% Standard LaTeX
\usepackage{mathp2e,thmp2e} %% Special files for the UJM
\usepackage{amsmath,amssymb} %% For better support of math
%% amssymb provides \mathbb
\usepackage{url} %% Supports formating URLs
\usepackage{graphicx} %% For eps figures
\usepackage{algorithmic} %% For algorithms
\DeclareMathOperator{\Hom}{Hom} %% An operator like \sin
\DeclareMathOperator{\V}{\text{\bf V}} %% This one is set in boldface
\begin{document}
\pagestyle{myheadings} %% Supports custom headers
\markboth{\sc MIT Undergraduate Journal of Mathematics}{\sc
A Short Example} %% Running right header
\title{A Short Example %% For first page
illustrating use \AmS-\LaTeX\ commands}
\author{Steven L. Kleiman% %% Include coauthors if any
\thanks{The author wishes to %% Only one footnote allowed in a math
thank the MIT Math Department %% journal: a short acknowledgement
for its continued support of the UJM.}}
%% NB: \thanks{...} sits inside the \author group
\date{\copyright\ \today} %% Change \today to draft date if you want
%% Note the `\ ' after `\copyright'.
\maketitle
\begin{abstract}
This short paper shows how to use \AmS-\LaTeX\ commands to do common
formating tasks involved in writing a paper for the UJM/18.096.
%% NB: The abstract says only what is done in the paper, avoiding
%% symbols. Background material belongs in the introduction.
\end{abstract}
\section{Introduction}\label{sec-intro} %% Refer to via \ref{sec-intro}.
The formating tasks discussed in this paper are all basic matters. Many
of them involve subtlties, which are often overlooked by beginners.
Section~2 shows how to include figures. Section 3
states Euler's celebrated formula, and derives the formulas for the
cosine and the sine of a sum. Section 4 discusses referencing.
\section{Inclusion of Figures}\label{sec-Fig}
This section of the paper contains Figure~\ref{fig-1stfund}, which is
taken from the primer \cite[p. 204]{KT}.
\begin{figure}[h]
\centering %% Note the figure must be centered.
\includegraphics[width=0.75\textwidth]{figure.ps}
\caption{Geometric setup of the proof of the First Fundamental
Theorem.}
\label{fig-1stfund} %% NB: \label must go after \caption{...}
\end{figure}
Be sure to refer to your figure in the text before, never after, you
include the figure itself. You may find you need to reword your text or
resize the figure, so that it fits. You may also need to encourage LaTeX
to put the figure in the appropriate place; the article documentclass
often tries to place it at the top of the current page, which is too
early.
\section{Euler's Formula}\label{sec-Euler}
According to Thomas and Finney \cite[p. 851]{TF}, ``one of the most
famous results involving the elementary complex functions is the formula
\begin{equation}\label{equation1} %% To suppress the equation number,
e^{iz} = \cos z + i\sin z, %% use {equation*}.
%% NB: be sure to NUMBER ONLY those formulas that you refer to!
%% NB: mathematical functions are set in roman type, and the
%% 32 most common are given by predefined control sequences.
\end{equation}
which is known as \emph{Euler's formula}.'' Notice that, if we take
$z:=\pi$ in Equation~\ref{equation1}, then we obtain the formula
$e^{i\pi}=-1$, which relates four of the most important numbers in
mathematics.
Euler's formula, Equation~(\ref{equation1}), has other interesting
consequences. For example, it yields the formulas for the
cosine and the sine of a sum.
\begin{proposition}[Sum formulas]\label{propositionSum}
Let $w$ and $z$ be any two complex numbers. Then
\begin{align*}
\cos(w+z) &= \cos w\cos z - \sin w\sin z,\\
\sin(w+z) &= \cos w\sin z + \sin w\cos z.
%% Note that displays are punctuated as if they were left in line.
\end{align*}
\end{proposition}
\begin{proof}
By the law of exponents, $e^{i(w+z)} = e^{iw}e^{iz}$. Hence Euler's
formula yields
$$\cos(w+z) + i\sin(w+z) = (\cos w + i\sin w)(\cos z + i\sin z).$$
Expanding the right-hand side, we obtain
$$(\cos w\cos z - \sin w\sin z) + i(\cos w\sin z + \sin w\cos z).$$
Finally, equating the real and imaginary parts, we obtain the asserted
formulas.
\end{proof}
\section{Tables}\label{sec-tbl}
Many papers include tables. Table~\ref{main-results} appears on p.\,61
%% in Pramook Khungurn's paper \cite[p. 61]{K}, where the context is
in Pramook Khungurn's paper \cite{K}, where the context is
explained.
\begin{table}[ht]
\caption{Factorizations of the Coxeter element $\mathbf{C}_n$ of $W_n$.}
\label{main-results}
\begin{center}
\medskip
\begin{tabular}{|l|l|l|}
\hline \piistrut10.5 4
{\bf names of cases} & {\bf reflections allowed} &
{\bf number of factorizations}\\
\hline \piistrut12 2
both-fixed & $\oplus_{ij}, \ominus_{ij}, \odot_k$ & $n^{n-1}$\\
positive-free & $\oplus_{ij}, \odot_i$ & $n^{n-1}$\\
negative-free & $\ominus_{ij}, \odot_i$ & $n!$\\
negative-fixed & $\ominus_{ij}, \odot_k$ & $A(n,k)$\\
positive-one & $\oplus_{ij}, \odot_1$ & $(n-1)^{n-1}$\\
positive-two & $\oplus_{ij}, \odot_2$ & $(3n-4)(n-2)^{n-2} -
(n-1)^{n-1}$ \piistrut0 4 \\
\hline
\end{tabular}
\end{center}
\vspace{-0.75\baselineskip}
\end{table}
%% Another example is provided by the table of integrals on p.\,205 in the
%% primer on mathematical writing \cite{KT}. The source code is found in
Another example is provided by the table of integrals in the primer on
mathematical writing \cite[p. 205]{KT}. The source code is found in the
file {\tt piiUJM2.tex}, which is contained in the 18.096 locker
\url{http://web.mit.edu/18.096/www}.
\section{Algorithms}\label{sec-alg}
In mathematics and computer science, many papers include listings of
formal algorithms. For example, Algorithm~\ref{alg1} lists the
pseudocode of an algorithm to compute the integral closure of an
integral domain that is presented explicitly as a finitely generated
algebra over a field $k$; this listing appears on p.\,61 in Anand
Deopurkar's paper \cite{D}.
%% Note that, although the algorithm is placed here in the text, it is set
%% on the next page because there is not enough room left on the current page.
\newcommand{\s}{\STATE}
\renewcommand{\algorithmicrequire}{\textbf{Input:}}
\renewcommand{\algorithmicensure}{\textbf{Output:}}
\renewcommand {\l}{\langle}
\renewcommand{\r}{\rangle}
\newcommand{\ideal}[1]{\left \l #1 \right \r}
\renewcommand{\bar}{\overline}
\begin{algorithm}
\caption{Normalization algorithm.}\label{alg1}
\begin{algorithmic}[1]
\REQUIRE An integral domain $R = k[x_1,\dotsc,x_n]/\ideal{f_1,\dotsc,f_r}$.
\ENSURE The integral closure $\bar R$.
\s Let $V = \V(f_1,\dots,f_r)$.
\s Determine $I$ such that $\V_V(I) = V^s$.
\s Let $I := \sqrt I$.
\WHILE{$R \not = \Hom _R(I,I)$}
\s $R:= \Hom _R(I,I)$.
\ENDWHILE
\RETURN $R$.
\end{algorithmic}
\end{algorithm}
Like figures and tables, algorithms are {\it floats.} That is, they are
blocks of material that must not be split across pages; therefore, when
they do not fit where they are referenced for the first time, they are
``floated'' to another place, such as the top of the next page.
Consequently, they can not be treated as part of the text in the manner
of a display. Thus you can say that Euler's formula is
\begin{equation*}\label{equation2}
e^{iz} = \cos z + i\sin z,
\end{equation*}
because you can be sure that the formula will appear on the next line;
however, you must say that the code is listed in Algorithm~\ref{alg1},
not that the code is the following.
\section{Referencing}\label{sec-ref}
The list of references must contain only works that are explicitly
cited. As an aid, the file mathp2e.sty writes a warning message
into the \LaTeX\ log file for each bibliography entry that is not cited
somewhere using the command \verb'\cite'. For example, when you run
\LaTeX\ on the present file, you get three such warnings.
The style of the entries varies greatly from discipline to discipline.
Within each discipline, the style varies a little from publication to
publication. The entries in the list below illustrate the style used
for books, journal articles, and URLs in the MIT Undergraduate Journal
of Mathematics.
Normally, the name of each journal is abbreviated. A list of standard
abbreviations is given in the annual index issue of the Math Reviews and
on line at the URL \url{http://www.ams.org/msnhtml/serials.pdf}.
However, to get the proper bibliographic information for the works you
list, the easiest way to proceed is to look up the work on line in the
MathSciNet through MIT Library's service Vera.
\acknowledgements
When others have supported your work in one way or another, you can
express your appreciation in a separate section, entitled
``Acknowledgements.'' It makes sense to do so when you have more to say
than can reasonably fit in a footnote. Such a section is common in math
journals, and is usually placed before the section of references.
%% \appendix % Enable if you want an appendix
%% \section*{Appendix. Name of ONLY Appendix}
%% OR
%% \section{Appendix. Name of FIRST appendix}
%% ...
%% \section{Appendix. Name of SECOND appendix}
%% ...
\begin{thebibliography}{9} %% Change to 99 if you have 10 to 99 entries
%% These are sample bibliography entries, and should of course be deleted.
%% But follow the same style; in particular, alphabetize them by
%% author's last name.
\bibitem{alley}
Alley, M., ``The Craft of Scientific Writing,'' Prentice-Hall, 1987.
\bibitem{ELA} Belville, S., and Harrison, H. A., ``Essential LaTeX on
Athena (AC-50),'' \url{http://web.mit.edu/olh/Latex/ess-latex.html}.
\bibitem{D}
Deopurkar, A. {\it Normalization of Algebraic Varieties,} MIT
Undergraduate J. Math., {\bf 9} (2008), 43--65.
\bibitem{K}
Khungurn, P, {\it Factoring the Coxeter Element of the Hyperoctahedral
Group,} MIT Undergraduate J. Math., {\bf 7} (2005), 59--80.
\bibitem{KT}
Kleiman, S., and Tesler, G., {\it Writing a Math Phase Two Paper}, MIT
Undergraduate J. Math., {\bf 1} (1999), 195--206.
\bibitem{TF}
Thomas, G., and Finney, R., ``Calculus and Analytic Geometry,'' Fifth
Edition, Addison-Wesley, 1982.
\end{thebibliography}
%% NOTE: for LaTeX to get the references right, you must run latex twice!
\end{document}
Anything written here, after \end{document}, is not processed by LaTeX.
Anything on a line after a `%' is not processed either. Thus you may
add comments or remove text.