\documentclass[11pt,twoside]{article}
\usepackage{amsmath,amssymb,amsthm,bm}
\usepackage{oxmathex}

\usepackage{graphicx}

\newcommand{\topictitle}[1]{\title{#1}\def\t@pic{#1}\setcounter{equation}{0}}
\newcommand{\topiccode}[1]{\topic{#1}{\t@pic}}
\renewcommand{\author}[1]{\def\auth@r{#1}}
\renewcommand{\date}[1]{\time{\auth@r\quad{#1}}}
\newcommand{\ve}[1]{\boldsymbol{\mathrm{#1}}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\C}{\mathbb{C}}
\newcommand{\N}{\mathbb{N}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\diff}{\mathrm{d}}
\renewcommand{\d}[1]{\,\mathrm{d}{#1}}
\newcommand{\ee}{\mathrm{e}}
\newcommand{\ii}{\mathrm{i}}
\newcommand{\pdhfrac}[2]{\mathchoice{\frac{#1}{#2}}{#1/#2}{#1/#2}{#1/#2}}
\newcommand{\dd}[2]{\pdhfrac{\mathrm{d}#1}{\mathrm{d}#2}}
\newcommand{\sdd}[2]{\pdhfrac{\mathrm{d}^2#1}{\mathrm{d}#2^2}}
\newcommand{\pd}[2]{\pdhfrac{{\partial}#1}{{\partial}#2}}
\newcommand{\spd}[2]{\pdhfrac{\partial^2#1}{{\partial}#2^2}}
\newcommand{\mpd}[3]{\pdhfrac{\partial^2#1}{{\partial}#2{\partial}#3}}
\renewcommand{\geq}{\geqslant}
\renewcommand{\leq}{\leqslant}
\renewcommand{\theequation}{\topicmark\arabic{equation}}

\begin{document}
\exam{Section C}

\topictitle{\LaTeX\ template for Part II exams}% Put your topic title here

\author{Peter Howell}% Put your name here
\date{3/10/2004}% Put date of submission of this draft here

\message{Please be sure to mark each draft submitted with the correct
  date.}

\maketitle

\topiccode{X}% Put your topic code here

\begin{question}{1}
There are built-in commands for roman (\texttt{ritem}) and arabic
(\texttt{aitem}) enumeration, whose use is demonstrated below.

I've defined some macros for typesetting the following common
constructions nicely.
\begin{ritem}
\itm
The usual symbols for the integers ($\Z$),
naturals ($\N$),
rationals ($\Q$),
reals ($\R$)
and complex numbers ($\C$) may be obtained like this.

You can use other mathematical fonts as follows:
italic $\mathit{ABCDabcd0123}$,
roman $\mathrm{ABCDabcd0123}$,
bold $\mathbf{ABCDabcd0123}$,
typewriter $\mathtt{ABCDabcd0123}$,
sans serif $\mathsf{ABCDabcd0123}$,
gothic $\mathfrak{ABCDabcd0123}$,
calligraphic (capitals only) $\mathcal{ABCD}$,
blackboard (capitals only) $\mathbb{ABCD}$.
\itm
I've created macros for Euler's exponential constant $\ee$ and
$\ii=\sqrt{-1}$, which are denoted with roman letters, as in
$\ee^{\ii x}=\cos x+\ii\sin x$.
\itm
Differentials are denoted using roman ``d'', as in
$\diff{s}^2=\diff{x}^2+\diff{y}^2$.

Integrals should have a small space before the final ``$\d{x}$'',
which may be achieved as follows:
\[
I_1=\int_a^b f(x)\d{x}.
\]
\itm
I've defined handy macros for
\begin{aitem}
\itm
first and second ordinary derivatives, in which we use roman ``d'':
\[
\dd{v}{t}=\sdd{x}{t};
\]
\itm
first, second and mixed partial derivatives:
\[
\pd{u}{x}=\spd{\phi}{x}=\mpd{\psi}{x}{y}.
\]
\end{aitem}
\itm
In applied options, vectors are often typeset as roman bold letters;
for example, let $\ve{u}$ be a vector in $\R^3$.
Note this macro also works on Greek letters and symbols
(unlike, say, \texttt{mathbf}): let
$\ve{\beta}=(\beta_1,\beta_2,\beta_3)^T$.
\end{ritem}

\end{question}

\begin{question}{2}
You can use standard \texttt{amsTeX} commands including those listed
below. See the guide at
\texttt{ftp://ftp.ams.org/pub/tex/doc/amsmath/short-math-guide.pdf}
for more details.
\begin{ritem}
\itm
\texttt{pmatrix} and its variants create vectors and matrices:
\[
\ve{\tau}=\begin{pmatrix}
\tau_{xx} & \tau_{xy} \\ \tau_{xy} & \tau_{yy}
\end{pmatrix} ;
\quad
\lvert\ve{\tau}\rvert=\begin{vmatrix}
\tau_{xx} & \tau_{xy} \\ \tau_{xy} & \tau_{yy}
\end{vmatrix} .
\]
\itm
\texttt{cases} is good for functions with piecewise definitions:
\[
f(x)=\begin{cases}
x^4 & x<0, \\
0 & x\geq0 .
\end{cases}
\]
\itm
Use these commands for multiple integral signs:
\[
I_2=\iint_A f(x,y)\d{S},
\quad
I_3=\iiint_D f(x,y,z) \d{x}\d{y}\d{z}.
\]
\itm
You can label a particular equation in the usual way
\begin{equation}
x^2+y^2=z^2 ,
\label{pythag}
\end{equation}
and then refer to equation (\ref{pythag}) like this.
If you really \emph{must} choose your own label, you can do so using
the command \texttt{tag}:
\begin{equation}
\spd{u}{x}=\spd{u}{t}+\pd{u}{t} .
\label{pde}
\tag{PDE}
\end{equation}
Then refer to equation (\ref{pde}) like this.
\end{ritem}

\end{question}

\begin{question}{3}
Here are some stylistic conventions that the examiners prefer to
follow. Many of these are lifted from Knuth's \TeX\ book.
\begin{ritem}
\itm
Please avoid starting a sentence with a mathematical symbol;
for example, we prefer
\begin{quote}
Let $\ve{u}(\ve{x})$ be the displacement field\ldots
\end{quote}
to
\begin{quote}
$\ve{u}(\ve{x})$ is the displacement field\ldots.
\end{quote}
\itm
When asking for a definition, please emphasise the thing to be defined
as shown below.

Define the \emph{vorticity} and \emph{helicity} of a fluid flow.

What is meant by the \emph{adjoint} of a linear differential operator?

State and prove the \emph{Maximum Principle} for Poisson's Equation.
\itm
Hints are italicised and put in upright square brackets either in
the text [\textit{like this}] or on a separate line as shown
below. Please try to make it clear to which part of the question the
hint refers.

[\textit{Cauchy's Theorem may be used without proof provided it is
  clearly stated.}]
\itm
Named theorems, lemmas, hypotheses and so forth are usually
capitalised, as in Jordan's Lemma,
the Generalised Continuum Hypothesis or Hamilton's Principle.
If something is named after several people, we
use long hyphens between the names, as in the Navier--Stokes Equation
or the Prandtl--Batchelor Theorem.
\itm
We use slanted ``greater-or-equal'' and ``less-or-equal'' signs, so
I've redefined the usual \texttt{geq} and \texttt{leq} to give
$\geq$ and $\leq$ respectively.
\itm
We denote vector products with $\times$, and scalar ``dot'' products
with a \texttt{cdot}, as in
\[
(\ve{u}\cdot\ve{\nabla})\ve{u}=
\ve{\nabla}\left(\frac{1}{2}\lvert\ve{u}\rvert^2\right)-
\ve{u}\times(\ve{\nabla}\times\ve{u}).
\]
\itm
It is best to use ``/'' for fractions in the text, as in $k=-3/2$, and
in exponents, for example
\[
y\sim\ee^{-1/x}\text{ as }x\rightarrow0.
\]
\end{ritem}
\end{question}

\tidy
\end{document}
