% sample latex/latex2e file with lots of math, tables, figures, etc
% useful for writing papers
% genuine finger-typed files by Christina C. Christara

%\documentclass[12pt]{article}
\documentclass[12pt]{mypaper}

%\linespread{1.1} % for more than single spacing

% take more advantage of the size of paper
\addtolength{\topmargin}{-2cm}
\addtolength{\textheight}{4cm}
\addtolength{\evensidemargin}{-2cm}
\addtolength{\oddsidemargin}{-2cm}
\addtolength{\textwidth}{4cm}

% some standard packages
\usepackage{times}
\usepackage{graphics}
\usepackage{subfigure, epsfig}
\usepackage{rotate}
%\usepackage{mathtools}
%\usepackage{tikz, amsmath, amssymb}
%\usepackage{xspace}

% theorems, etc
\newtheorem{thm}{\scshape Theorem}
\newtheorem{lmm}{\scshape Lemma}
\newtheorem{crl}{\scshape Corollary}
\newtheorem{rmk}{\scshape Remark}

% AMS, etc
\newenvironment{AMS}{\small\textit{AMS subject classification:}}{}
\newenvironment{keywords}{\small\textit{Key words:}}{}

% convenient abbreviations
\newcommand{\Cee}{\mathbf{C}}
\newcommand{\Iee}{\mathbf{I}}
\newcommand{\Lee}{\mathbf{L}}
\newcommand{\uD}{u_{\Delta}}
\newcommand{\mc}{\multicolumn}
\newcommand{\hs}{\hspace}
\newcommand{\EQ}{\begin{equation}}
\newcommand{\EN}{\end{equation}}
\newcommand{\EQA}{\begin{eqnarray}}
\newcommand{\ENA}{\end{eqnarray}}
\newcommand{\EQAS}{\begin{eqnarray*}}
\newcommand{\ENAS}{\end{eqnarray*}}

\pagestyle{myheadings}
\markboth{C. C. CHRISTARA, S. NAME}{SHORT TITLE}
%\markboth{}{}

\begin{document}
\begin{center}
\large{\bf{A Descriptive Title that\\
May Go Over Two Lines}}
\end{center}
\begin{center}
{\large{Christina C. Christara} \small{and} \large{Student Name}\\
\small{Department of Computer Science\\
University of Toronto\\
Toronto, Ontario M5S 3G4, Canada\\
\texttt{\{ccc,sname\}@cs.utoronto.ca}}}
\end{center}
\begin{center}
submitted December 2004
\end{center}

\begin{abstract}
The abstract must be concise.
It should describe the problem and the main results in words.
Do not use formulae. Place your breakthroughs here!
However, abstracts are needed only in theses, papers, etc,
not in the short summaries of papers.
\end{abstract}

\medskip
\begin{AMS}
{\small 65N22, 65N35, 65F10.}
\end{AMS}

\medskip
\begin{keywords}
{\small Manuscript preparation, sample file, Latex.}
\end{keywords}

\section{Introduction} \label{sc:1}
The introduction normally includes the general description
of the problem, a brief literature review, the motivation
for the work, and an overview of the paper.

It is very useful to give labels to just about anything in Latex,
so that it can be referred to later in the file.

In this sample file, we define sections, subsections and subsubsections.
However, remember that these are needed only in theses, papers, etc,
not in the short summaries of papers.

\section{Lots of mathematics} \label{sc:2}

We first given an example of \texttt{equation} with a number (label).
Consider a Boundary Value Problem (BVP) described by the operator equation
\EQ
\Lee u \equiv
a u_{xx} + b u_{xy} + c u_{yy} + d u_x  + e u_y  + f u = g ~~~ \mbox{for} ~~~
(x,y) \in \Omega \equiv (0,1) \times (0,1), \label{eq:pdeop}
\EN
where $a, b, c, d, e, f$ and $g$ are given functions of $x$ and $y$,
and $u$ is the unknown function of $x$ and $y$,
subject to some boundary conditions on the boundary $\partial \Omega$
of $\Omega$.
At each line of $\partial \Omega$
the boundary conditions may be any of the following types:
\emph{homogeneous Dirichlet},
\emph{homogeneous Neumann}, or
\emph{periodic}.

\subsection{Relation alignment and labelling}

\noindent
If you want to align math stuff, you can do it with \texttt{eqnarray}.
\subsubsection{Aligning and labelling}
For brevity, in this section,
we assume that the boundary conditions
are homogeneous Neumann in the $x$ direction
and homogeneous Dirichlet in $y$, i.e.
\EQA
u_x &=& 0 ~~ \mbox{on} ~~~ x = 0 , x = 1 ~~ \mbox{for} ~~~ 0 \leq y \leq 1
\label{eq:pdebcx}\\
u   &=& 0 ~~ \mbox{on} ~~~ y = 0 , y = 1 ~~ \mbox{for} ~~~ 0 \leq x \leq 1.
\label{eq:pdebcy}
\ENA
\subsubsection{Aligning and selective labelling}
If you do not want an equation or a line in eqnarray to be numbered,
then use \texttt{nonumber}. For example, only the first line
of eqnarray will be numbered, by using
\EQA
u_x &=& 0 ~~ \mbox{on} ~~~ x = 0 , x = 1 ~~ \mbox{for} ~~~ 0 \leq y \leq 1
\label{eq:pdebcx2}\\
u   &=& 0 ~~ \mbox{on} ~~~ y = 0 , y = 1 ~~ \mbox{for} ~~~ 0 \leq x \leq 1.
\nonumber
\ENA
\subsubsection{Aligning without labelling}
If, on the other side, you do not want any line in eqnarray to be numbered,
then use \texttt{eqnarray*}, as in the following example:
\EQAS
u_x &=& 0 ~~ \mbox{on} ~~~ x = 0 , x = 1 ~~ \mbox{for} ~~~ 0 \leq y \leq 1 \\
u   &=& 0 ~~ \mbox{on} ~~~ y = 0 , y = 1 ~~ \mbox{for} ~~~ 0 \leq x \leq 1.
\ENAS
\subsubsection{Equations without numbers}
Finally, if you want a simple equation without number,
then just use square brackets, as in the following:
\[
A \equiv \frac{1}{8}
(  \frac{a}{h_x^2} T_{-2}^{E,M} \otimes T_6^{D,N}
 + \frac{c}{h_y^2} T_6^{E,M}    \otimes T_{-2}^{D,N}
 + \frac{f}{8}     T_6^{E,M}    \otimes T_6^{D,N}
).
\]
You can refer to a relation to which you have given a label.
For example, relation (\ref{eq:pdeop}) describes a Partial
Differential Equation (PDE).

You can refer to a section by its label too.
For example, the introduction is in Section \ref{sc:1}.

\subsection{Other mathematics} \label{sc:other}
Here are examples of more math, with dots notation, fractions, subscripts,
superscripts, etc.

Let $\Delta_x \equiv \{x_i = i/M, i = 0, \cdots, M\}$
and $\Delta_y \equiv \{y_j = j/N, j = 0, \cdots, N\}$
be uniform partitions of (0, 1) with step-sizes
$h_x = \frac{1}{M}$ and $h_y = \frac{1}{N}$, respectively.
We denote by $S_{\Delta_x}$ and $S_{\Delta_y}$ the quadratic spline spaces
with respect to partitions $\Delta_x$ and $\Delta_y$, respectively,
constructed so that the splines satisfy the boundary conditions
(\ref{eq:pdebcx}) and (\ref{eq:pdebcy}), respectively.
The basis functions $\{\phi_i^x(x)\}_{i=1}^M$ and $\{\phi_j^y(y)\}_{j=1}^N$
for $S_{\Delta_x}$ and $S_{\Delta_y}$, respectively, are
generated through appropriate transformations
of the model quadratic spline $\phi(x)$ defined by \{
$\phi(x) \equiv x^2           $ for $0 \leq x \leq 1$;
$\phi(x) \equiv -3 + 6x - 2x^2$ for $1 \leq x \leq 2$;
$\phi(x) \equiv  9 - 6x +  x^2$ for $2 \leq x \leq 3$;
$\phi(x) \equiv 0$ elsewhere\}, and appropriate adjustments
to satisfy the boundary conditions.
More specifically,
let $\chi_i^x(x) \equiv \frac{1}{2} \phi(\frac{x}{h_x} -i +2)$,
for $i = 0, \cdots, M+1$,
and $\chi_j^y(y) \equiv \frac{1}{2} \phi(\frac{y}{h_y} -j +2)$
for $j = 0, \cdots, N+1$. Then
$\phi_1^x = \chi_1^x + \chi_0^x$,
$\phi_i^x = \chi_i^x$, $i = 2, \cdots, M-1$,
$\phi_M^x = \chi_M^x + \chi_{M+1}^x$,
$\phi_1^y = \chi_1^y - \chi_0^y$,
$\phi_i^y = \chi_i^y$, $i = 2, \cdots, N-1$ and
$\phi_N^y = \chi_N^y - \chi_{N+1}^y$.

Let $S_{\Delta} \equiv S_{\Delta_x} \otimes S_{\Delta_y}$ be
the approximating space for the BVP (\ref{eq:pdeop})-(\ref{eq:pdebcy}).
This space has dimension $MN$.
Note that any $\uD \in S_{\Delta}$ satisfies the boundary conditions
by construction.
The set of basis functions for $S_{\Delta}$ is chosen to be
the tensor product
$\{\phi_i^x(x) \phi_j^y(y)\}_{i=1,j=1}^{M,N}$
of quadratic B-splines in the $x$ and $y$ directions.

Mathematical functions such as $\sin(x)$, $\cos(x)$, $\log(x)$,
$\exp(x)$, etc, should be printed in roman fonts.
This is why they are preceeded by a backslash.
Similarly, preceed with backslash the symbols $\max$, $\min$, etc.

Integrals and Sums?
The $L_2$ norm of a function $f(x)$ in the interval $[a, b]$
is defined by $||f||_{L_2[a,b]} \equiv (\int_a^b f^2(x) dx )^{1/2}$.

In the following, let $(\cdot, \cdot)$ denote the standard inner product,
that is,
$(v, w) = \int_{\cal D} v w d{\cal D}$,
where ${\cal D}$ may be an one- or two-dimensional domain,
and let $|| \cdot ||_{L_2({\cal D})}$ be the associated $L_2$ norm.\\
For any bounded functions $v(x, y)$ and $w(x, y)$,
define the discrete pseudo-inner product
$(v, w)_{xy}$ by two equivalent formulae
\[
(v, w)_{xy} \equiv \sum_{j=1}^N h_y (v(\cdot, \tau_j^y), w(\cdot, \tau_j^y))_x
            \equiv \sum_{i=1}^M h_x (v(\tau_i^x, \cdot), w(\tau_i^x, \cdot))_y,
\]
where $(v, w)_x$ and $(v, w)_y$ are defined by
\[
(v, w)_x \equiv \sum_{i=1}^M h_x (vw)(\tau_i^x, \cdot) \mbox{  and  }
(v, w)_y \equiv \sum_{j=1}^N h_y (vw)(\cdot, \tau_j^y).
\]
Note that, for $v, w \in S_{\Delta}$, $(v, w)_{xy}$ is an
inner product, since any bi-quadratic spline can be uniquely
determined by its values on the collocation points \cite{Chri94},
and a bi-quadratic spline is the zero one, if and only if its values
on all the collocation points are zero.
Therefore, $S_{\Delta}$ is a Hilbert space and $(\cdot, \cdot)_{xy}$
the associated inner product.

\section{Matrices} \label{sc:mat}

\noindent
Here are some examples of matrices:
\[
E \equiv \left[ \begin{array}{c}
    \Iee^M\\
    0
\end{array} \right]
~ \mbox{and} ~~
R \equiv \left[ \begin{array}{cccccccccc}
    1 & 0 & 0 & \cdot & \cdot & \cdot & \cdot & \cdot & \cdot & 0 \\
    0 & 0 & 1 & 0     & 0 & \cdot & \cdot & \cdot & \cdot & 0 \\
    0 & 0 & 0 & 0     & 1 & 0     & 0     & \cdot & \cdot & 0 \\
      &   &   &       & \cdot & \cdot & \cdot & \cdot & \\
    0 & \cdot & \cdot & \cdot & \cdot & 0     & 1     & 0 & 0 & 0 \\
    0 & \cdot & \cdot & \cdot & \cdot & \cdot & \cdot & 0 & 1 & 0
\end{array} \right],
\]
and
\[
\left[ \begin{array}{rr}
    \Lee_{11} & \Lee_{12} \\
    \Lee_{21} & \Lee_{22}
\end{array} \right]
\left[ \begin{array}{r}
    u \\
    v
\end{array} \right]
=
\left[ \begin{array}{r}
    g_1 \\
    g_2
\end{array} \right]
\mbox{ in } \Omega.
\]

Using arrays, we can present the definition of the
model quadratic spline $\phi(x)$ given in Section \ref{sc:other}
in a different way:
\[
\psi(x) \equiv \left\{ \begin{array}{rl}
    x^2             & \mbox{if $0\leq x\leq 1,$}\\
    -3+6x-2x^2      & \mbox{if $1\leq x\leq 2,$}\\
    9-6x+x^2        & \mbox{if $2\leq x\leq 3,$}\\
    0               & \mbox{elsewhere.}
    \end{array} \right.
\]
This takes more space, but it is easier to read than
the one given in Section \ref{sc:other}.

\section{Tables} \label{sc:tab}

\noindent
We first show a simple table, like Table \ref{tb:1},
then some more complicated tables.
\begin{table}
\caption{ \label{tb:1}
Observed errors and respective orders of convergence
by the two-step QSC for Problem 1, for several gridsizes $N \times N$.
}
\begin{center}
\begin{tabular}{r||c|c}
$N$ & error & order\\
\hline
32 & 1.8e-07&     \\
64 & 1.1e-08& 3.97\\
128& 7.8e-10& 3.87\\
\end{tabular}
\end{center}
\end{table}

\begin{table}
\caption{ \label{tb:2}
Errors on the gridpoints, respective orders of convergence,
number of iterations for convergence of the $DL$-preconditioned GMRES method
and time in seconds,
corresponding to Problem 3 discretized by the QSC method,
for several gridsizes $N \times N$.
The solution of the preconditioner is obtained by 1D-FFTQSC and 2D-FFTQSC.
}
\begin{center}
\begin{tabular}{c||c|c||cc||cr|cr||cc||r}
&\mc{8}{c||}{$\zeta = -15$}&\mc{2}{c||}{$\zeta = -50$}\\
&\mc{2}{c||}{on gridpoints}&\mc{2}{c||}{no. of iter.}&\mc{4}{c||}{time}
&\mc{2}{c||}{no. of iter.}&time\\
$N$&error&order&step 1&step 2&per it.&total&per it.&total&step 1&step 2&total\\
&&&&&\mc{2}{c}{1D-FFTQSC}&\mc{2}{c||}{2D-FFTQSC}&&&GE\\
\hline
32 & 3.1e-08&     & 18& 13& 0.003& 0.18& 0.003& 0.18& 24& 20&  0.11\\
64 & 1.9e-09& 4.00& 18& 13& 0.013& 0.73& 0.013& 0.73& 26& 20&  0.95\\
128& 1.2e-10& 4.01& 18& 13& 0.060& 3.16& 0.063& 3.24& 26& 20& 10.51\\
256& 7.4e-12& 4.01& 18& 13& 0.281&13.90& 0.297&14.31& 26& 20&162.28\\
512& 4.6e-13& 4.01& 18& 13& 1.315&61.58& 1.456&65.79& 26& 20&\\
\end{tabular}
\end{center}
\end{table}

\begin{table}
\caption{
Number of iterations for convergence of the $- \hat \triangle_h$-preconditioned
GMRES method with $(\xi_1, \xi_2)$ as shown,
corresponding to Problems 5 and 6 discretized by the QSC method,
for several gridsizes $N \times N$.
} \label{tb:3}
\begin{center}
\begin{tabular}{lr||cc|cc|cc|cc|cc||cc|cc|cc|cc}
&&\mc{10}{c||}{Problem 5}&\mc{8}{c}{Problem 6}\\
&($\xi_1, \xi_2$)&
\mc{2}{c|}{(1,0)} & \mc{2}{c|}{(2,1)} & \mc{2}{c|}{(3,1)} & \mc{2}{c|}{(5,1)} &
\mc{2}{c||}{(25,1)} &
\mc{2}{c|}{(1,0)} & \mc{2}{c|}{(2,1)} & \mc{2}{c|}{(3,1)} & \mc{2}{c}{(5,1)} \\
$N$&step & 1 & 2 & 1 & 2 & 1 & 2 & 1 & 2 & 1 & 2 & 1 & 2 & 1 & 2 & 1 & 2\\
\hline
32 &&12 &9 & 15 &11 & 12 &9 & 11 &8 & 11 &8 & 21 &16 & 16 &12 & 17 &13 & 19&14\\
64 &&12 &9 & 15 &11 & 12 &9 & 11 &8 & 11 &8 & 21 &16 & 16 &12 & 17 &13 & 19&14\\
128&&12 &9 & 15 &11 & 12 &9 & 11 &8 & 11 &9 & 22 &16 & 16 &12 & 18 &13 & 19&14\\
256&&12 &9 & 15 &11 & 12 &9 & 11 &8 & 11 &9 & 22 &16 & 16 &12 & 18 &13 & 19&14\\
\end{tabular}
\end{center}
\end{table}
There are several tricks to save space in tables, by shortening the
horizontal space between columns.
One is shown below. Notice that Tables \ref{tb:3} and \ref{tb:4}
present identical data, but the latter saves space.

\begin{table}
\caption{
Number of iterations for convergence of the $- \hat \triangle_h$-preconditioned
GMRES method with $(\xi_1, \xi_2)$ as shown,
corresponding to Problems 5 and 6 discretized by the QSC method,
for several gridsizes $N \times N$.
} \label{tb:4}
\begin{center}
\begin{tabular}{l@{\hs{1pt}}||c@{\hs{1pt}}c@{\hs{1pt}}|c@{\hs{1pt}}c@{\hs{1pt}}|
c@{\hs{1pt}}c@{\hs{1pt}}|c@{\hs{1pt}}c@{\hs{1pt}}|c@{\hs{1pt}}c@{\hs{1pt}}||
c@{\hs{1pt}}c@{\hs{1pt}}|c@{\hs{1pt}}c@{\hs{1pt}}|c@{\hs{1pt}}c@{\hs{1pt}}|
c@{\hs{4pt}}c}
&\mc{10}{c||}{Problem 5}&\mc{8}{c}{Problem 6}\\
~ ($\xi_1, \xi_2$)&
\mc{2}{c|}{(1,0)} & \mc{2}{c|}{(2,1)} & \mc{2}{c|}{(3,1)} & \mc{2}{c|}{(5,1)} &
\mc{2}{c||}{(25,1)} &
\mc{2}{c|}{(1,0)} & \mc{2}{c|}{(2,1)} & \mc{2}{c|}{(3,1)} & \mc{2}{c}{(5,1)} \\
$N$~step& 1 & 2 & 1 & 2 & 1 & 2 & 1 & 2 & 1 & 2 & 1 & 2 & 1 & 2 & 1 & 2 & 1 & 2
\\
\hline
32 &12 &9 & 15 &11 & 12 &9 & 11 &8 & 11 &8 & 21 &16 & 16 &12 & 17 &13 & 19&14\\
64 &12 &9 & 15 &11 & 12 &9 & 11 &8 & 11 &8 & 21 &16 & 16 &12 & 17 &13 & 19&14\\
128&12 &9 & 15 &11 & 12 &9 & 11 &8 & 11 &9 & 22 &16 & 16 &12 & 18 &13 & 19&14\\
256&12 &9 & 15 &11 & 12 &9 & 11 &8 & 11 &9 & 22 &16 & 16 &12 & 18 &13 & 19&14\\
\end{tabular}
\end{center}
\end{table}

Remember that you can refer to tables by their labels.
For example, Table \ref{tb:1} is the first (simple) table and
Table \ref{tb:4} the last table.

\clearpage
\section{Figures} \label{sc:fig}

\subsection{Postscript}
We can easily include figures that are in encapsulated postscript.
Files in encapsulated postscript can be easily obtained
through MATLAB by the \texttt{> print -deps file.eps} command.
In the following we show one single centered figure,
and two figures side-by-side.

\begin{figure}[h]
\begin{center}
\epsfig{figure=spyalt.eps, width=.31\textwidth}
\end{center}
\centering
\caption{\label{fg:02}
The structure of the QSC matrix arising from the discretization of a
system of two PDEs subject to general boundary conditions
with the alternating ordering, for $N = M = 4$.
The number of non-zero entries is denoted by nz.}
\end{figure}

\begin{figure}[h]
\centering
\mbox{
\subfigure[Alternating Ordering]{\epsfig{figure=spyalt.eps,width=.31\textwidth}}\quad
\subfigure[Block Ordering]{\epsfig{figure=spyblock.eps,width=.31\textwidth}}
}
%\epsffile{spyhelm.eps}
\caption{\label{fg:03}
The structure of the QSC matrix arising from the discretization of a
system of two PDEs subject to general boundary conditions
with the alternating and block orderings, for $N = M = 4$.
The number of non-zero entries is denoted by nz.}
\end{figure}

\subsection{Drawing}

Latex provides us with \texttt{picture}, which allows us to draw
sharply and mathematically defined drawings, such as Figure \ref{fg:01}.

\begin{figure}
\begin{center}
\scalebox{.9}{
\begin{picture}(480,50)(8,-10)
\put(  0, 0){\line(1,0){480}}
\put( -4,-3){\small $\times$}
\put( 76,-3){\small $\times$}
\put(156,-3){\small $\times$}
\put(236,-3){\small $\times$}
\put(316,-3){\small $\times$}
\put(396,-3){\small $\times$}
\put(476,-3){\small $\times$}
\put( -4,10){\small $x_0$}
\put( 76,10){\small $x_1$}
\put(156,10){\small $x_{i-1}$}
\put(236,10){\small $x_i$}
\put(316,10){\small $x_{i+1}$}
\put(396,10){\small $x_{N-1}$}
\put(476,10){\small $x_N$}
\put( 40, 0){\circle*{4}}
\put(120, 0){\circle*{4}}
\put(198, 0){\circle*{4}}
\put(278, 0){\circle*{4}}
\put(360, 0){\circle*{4}}
\put(440, 0){\circle*{4}}
\put(  0,-10){\small $\tau_0$}
\put( 38,-10){\small $\tau_1$}
\put(118,-10){\small $\tau_2$}
\put(198,-10){\small $\tau_i$}
\put(278,-10){\small $\tau_{i+1}$}
\put(358,-10){\small $\tau_{N-1}$}
\put(438,-10){\small $\tau_N$}
\put(478,-10){\small $\tau_{N+1}$}
\put( 30, 20){\vector(-1,0){30}}
\put( 50, 20){\vector( 1,0){30}}
\put( 35, 17){\small $h$}
\put( 70, 35){\vector(-1,0){30}}
\put( 90, 35){\vector( 1,0){30}}
\put( 75, 32){\small $h$}
\end{picture}}
\end{center}
\begin{center}
\scalebox{.9}{
\begin{picture}(480,80)(8,-25)
\put(  0, 0){\line(1,0){480}}
\put( -4,-3){\small $\times$}
\put( 76,-3){\small $\times$}
\put(156,-3){\small $\times$}
\put(236,-3){\small $\times$}
\put(316,-3){\small $\times$}
\put(396,-3){\small $\times$}
\put(476,-3){\small $\times$}
\put( -4,10){\small $s_0$}
\put( 76,10){\small $s_1$}
\put(156,10){\small $s_{i-1}$}
\put(236,10){\small $s_i$}
\put(316,10){\small $s_{i+1}$}
\put(396,10){\small $s_{N-1}$}
\put(476,10){\small $s_N$}
\put( 40, 0){\circle*{4}}
\put(120, 0){\circle*{4}}
\put(198, 0){\circle*{4}}
\put(278, 0){\circle*{4}}
\put(360, 0){\circle*{4}}
\put(440, 0){\circle*{4}}
\put( -4,-10){\small $w_0$}
\put( 38,-10){\small $w_1$}
\put(118,-10){\small $w_2$}
\put(198,-10){\small $w_i$}
\put(278,-10){\small $w_{i+1}$}
\put(358,-10){\small $w_{N-1}$}
\put(438,-10){\small $w_N$}
\put(478,-10){\small $w_{N+1}$}
\put( 30, 20){\vector(-1,0){30}}
\put( 50, 20){\vector( 1,0){30}}
\put( 35, 17){\small $H_0$}
\put(270, 20){\vector(-1,0){30}}
\put(290, 20){\vector( 1,0){30}}
\put(275, 17){\small $H_i$}
\put(430, 20){\vector(-1,0){30}}
\put(450, 20){\vector( 1,0){30}}
\put(435, 17){\small $H_{N-1}$}
\put( 70, 35){\vector(-1,0){30}}
\put( 90, 35){\vector( 1,0){30}}
\put( 75, 32){\small $h_1$}
\put(230, 35){\vector(-1,0){30}}
\put(250, 35){\vector( 1,0){30}}
\put(235, 32){\small $h_i$}
\put(390, 35){\vector(-1,0){30}}
\put(410, 35){\vector( 1,0){30}}
\put(395, 32){\small $h_{N-1}$}
\put( 15,-20){\vector(-1,0){15}}
\put( 25,-20){\vector( 1,0){15}}
\put( 16,-22){\small $h_0^b$}
\put( 55,-20){\vector(-1,0){15}}
\put( 65,-20){\vector( 1,0){15}}
\put( 56,-22){\small $h_1^a$}
\put(215,-20){\vector(-1,0){15}}
\put(225,-20){\vector( 1,0){15}}
\put(216,-22){\small $h_i^a$}
\put(255,-20){\vector(-1,0){15}}
\put(265,-20){\vector( 1,0){15}}
\put(256,-22){\small $h_i^b$}
\put(415,-20){\vector(-1,0){15}}
\put(425,-20){\vector( 1,0){15}}
\put(416,-22){\small $h_{N-1}^b$}
\put(455,-20){\vector(-1,0){15}}
\put(465,-20){\vector( 1,0){15}}
\put(456,-22){\small $h_N^a$}
\end{picture}}
\end{center}
\caption{\label{fg:01}
The uniform grid and its non-uniform image
(drawn as uniform for convenience).
}
\end{figure}

\section{Theorems, etc}

\noindent
Example of theorem:
\begin{thm} \label{th:suffcond}
Assume
$a(x, y) \in {\Cee}^3 (\overline{\Omega})$ with respect to $x$ and
$c(x, y) \in {\Cee}^3 (\overline{\Omega})$ with respect to $y$,
$f(x, y) \in {\Cee}$, and
$0 < \alpha \leq a(x, y), c(x, y) \leq \gamma,
\forall (x, y) \in \overline{\Omega}$.
Then, $\forall v, w \in S_{\Delta}$,
\EQA
(L_hv, w)_{xy} &=& B_h^1(v, w) + B_h^2(v, w) + (fv, w)_{xy},
\label{eqn:c0}
\ENA
where
\EQA
B_h^1(v, w) &=& B_h^1(w, v) \label{eqn:c1}\\
\alpha(-\triangle_hv, v)_{xy} &\leq& B_h^1(v,v)
~\leq~ \gamma(-\triangle_hv, v)_{xy}
\label{eqn:c2}\\
|B_h^2(v, w)| &\leq& C \delta(h_x, h_y)
(-\triangle_hv, v)^{1/2}_{xy}
(-\triangle_hw, w)^{1/2}_{xy}
\label{eqn:c3},
\ENA
and where $C$ is a positive constant independent of $a, c, f, h_x$ and $h_y$,
and
\[
\delta (h_x, h_y) = \max (h_x \max (||a_x||_\infty, ||a_{xx}||_\infty)
                        + h_x^2 ||a_{xxx}||_\infty,
                          h_y \max (||c_y||_\infty, ||c_{yy}||_\infty)
                        + h_y^2 ||c_{yyy}||_\infty).
\]
\end{thm}

In a similar way, you can write lemmas, corollaries, remarks, etc.
Each of these environments will get its own number (within the
set of same environments).
You can refer to the above theorem, as Theorem \ref{th:suffcond}.

\pagebreak

\section{Minipages and other similar stuff}

To have text and plot or text and other text in parallel columns,
one can use the \texttt{minipage} environment.
Here is an example:

\begin{figure}[!htb]
\begin{minipage}{3.3in}
%\begin{center}
\includegraphics[scale=0.55]{spyblock.eps}
\caption{The structure of the QSC matrix arising from the discretization of a
system of two PDEs subject to general boundary conditions
with the block ordering, for $N = M = 4$.
The number of non-zero entries is denoted by nz.}
\label{fg:block}
%\end{center}
\end{minipage}
\hs{5pt}
\begin{minipage}{3.4in}
This text is supposed to show to the right of the figure
that shows the block sparsity pattern.
Text. Text. Text. Text. Text. Text. Text. Text. Text. Text. Text. Text.
Text. Text. Text. Text. Text. Text. Text. Text. Text. Text. Text. Text.
Text. Text. Text. Text. Text. Text. Text. Text. Text. Text. Text. Text.
Text. Text. Text. Text. Text. Text. Text. Text. Text. Text. Text. Text.
Text. Text. Text. Text. Text. Text. Text. Text. Text. Text. Text. Text.
\end{minipage}
\end{figure}

\section{Preparing the bibliography}

The best way to make appropriate citations to various papers,
books, theses, technical reports, etc, is to create a file,
say \texttt{paper.bib}, in the format shown in the file provided.
Then you can refer to any work by the label corresponding to it
as given in the file, for example, the publications \cite{Bial94},
\cite{Chri94}.
Notice that only the papers you cite in the Latex file
will appear in the references list, independently of
how many other works are included in the paper.bib file.

However, there is a procedure that helps Latex create pointers
to various works you cite, and it must be followed carefully.
First, you must create the appropriate \texttt{mysample.bbl} file.
This is done with the \texttt{bibtex} command \emph{after} the
first run of the latex command.
Then, the latex command must be run \emph{twice}
every time you update the file mysample.tex.

To summarize,
on any Unix system (i.e. on cogitate, gardiner, qew, ponder, etr, allen, etc),
you type
\begin{verbatim}
% latex mysample.tex
% bibtex mysample
% latex mysample.tex
% latex mysample.tex
\end{verbatim}

You need to re-run the bibtex command every time you update
the file paper.bib, or you change (add or remove) some citations
in the file mysample.tex.
You need to run the latex command \emph{twice}
every time you update the file mysample.tex.

The latex command creates a \texttt{mysample.dvi} file.
To get a postscript file which you can preview by \texttt{gv}
or print by \texttt{lpr} you type \emph{after} the latex command:
\begin{verbatim}
% dvips mysample.dvi
% gv mysample.ps
% lpr -Plw-ba4242 mysample.ps
\end{verbatim}

On Solaris (i.e. on cogitate, gardiner, qew,
but {\em not} ponder, etr, allen, etc),
there is also the {\tt latex2e} command which is almost equivalent
to {\tt latex}.

In general, Latex displays many warnings and other messages.
Most of them can be safely ignored.
However, if you get warnings about ``undefined labels''
or ``undefined references'', you may want to run
latex(2e) (and/or bibtex) once more or twice.
This should normally fix the problem.

Also remember, that you should run the lpr command
only if you really want to see a hard copy of the document.
Often, previewing with gv suffices, and a hard-copy
is a waste.

\bibliographystyle{siam}
\bibliography{paper}

\end{document}
