\documentclass{article}
\usepackage{amsmath}
\begin{document}

\section{looking at font styles in equations}

For eample, in
\[ 
{\bf n}(t+1) = A {\bf n}(t) {\rm Q} 
\] 
both the $\rm Q$ and the bold font $\bf n$ should not be
italicized in the  .rtf output. LaTeX never italicizes bold font in math 
mode (as this is never needed/wanted). 

\section{testing \texttt{align} environment}

First align without an asterisk.

\begin{align} 
zw & =  (3+2i)(2-i) \notag \\ 
& =  6-3i+4i-2i^2   \notag \\ 
& =  8+i  \notag 
\end{align} 


\begin{eqnarray} 
zw & = &  (3+2i)(2-i) \nonumber \\ 
& = &  6-3i+4i-2i^2   \nonumber \\ 
& = &  8+i  \nonumber 
\end{eqnarray} 


Now align with an asterisk.


\begin{align*} 
zw & =  (3+2i)(2-i)  \\ 
& =  6-3i+4i-2i^2    \\ 
& =  8+i   
\end{align*} 


\section{testing equation references}
\begin{equation}
x=y
\label{eqn1}
\end{equation}
The equation before this is equation \ref{eqn1}.  Alternatively
one might use \eqref{eqn1}.

\section{reported (non-) problems in 1.9.15}
First commas in equations
$$
\hbox{for } x,y \hbox{ in } A
$$
as an inline $\forall x, y \in Z$.  Yet another comma example
$R_1, R_2$ 

Now for the problem associated with \verb#\sum#
$$
\sum = 1
$$

\section{Inline equations}
First, test an inline equation in a paragraph of its own

$x^2+y^2=z^2$

Lets test baselines of equations.  First compare these ...$\ldots$... as
well as ...$.$...  Now descenders like y $y$ and finally x$^2$ vs $x^2$ or
x$_2$ vs $x_2$

Parsing the tricky \verb#$$# properly $\varepsilon $$_o$ as an example.

First begin with simple \verb#$# delimited equation such as
$x+y=w$ as an example.  All the equations in this section should
look identical.

Next how about a simple \verb#\begin{math}# delimited equation such as
\begin{math}x+y=w\end{math} as an example.  All the equations in this section should
look identical.

Now consider \verb#\(# and \verb#\)# delimited equation such as
\(x+y=w\) as an example.  All the equations in this section should
look identical.

\section{Unnumbered equations}

I will start with a simple \verb#$$# wave equation
that will have no number
$$
\nabla^2 \phi -{1\over c} {\partial \phi\over \partial t}  = 0
$$

Bug that caused crash when equation began with \verb#\ldots#
$$
\ldots\nabla^2 \phi -{1\over c} {\partial \phi\over \partial t}  = 0
$$

another reported crash with ldots
\begin{eqnarray*} 
\ldots & = & b \\
c      & = & d
\end{eqnarray*} 

Note: Delimiting an equation by \verb|$$| is a plain\TeX{} command
which causes inconsistent vertical distances and does not obey
the class option \textsf{fleqn}.
Therefore it should \emph{not} be used in \LaTeX{} documents. Use
\verb#\[...\]# instead:
\[
\nabla^2 \phi -{1\over c} {\partial \phi\over \partial t}  = 0
\]


This is followed by a \verb#displaymath# environment
\begin{displaymath}
\nabla^2 \phi -{1\over c} {\partial \phi\over \partial t}  = 0
\end{displaymath}
Here is an example of the \verb#\[# environment
\[
\nabla^2 \phi -{1\over c} {\partial \phi\over \partial t}  = 0
\]

\noindent 
Here we check indentation
\[ 
a=b 
\] 
displaymath 
\begin{displaymath} 
a=b 
\end{displaymath} 
enddisplaymath 


\section{Numbered equations}
Next comes an \verb#equation# environment
\begin{equation}
\nabla^2 \phi -{1\over c} {\partial \phi\over \partial t}  = 0
\end{equation}
Note that \verb#\nonumber# in an \verb#equation# environment still gets
an equation number
\begin{equation}
\nabla^2 \phi -{1\over c} {\partial \phi\over \partial t}  = 0 \nonumber
\end{equation}

\section{Testing equation array}

Here the equation array is being tested.  This equation has no equation number
and is about as simple as an equation array can get.
\begin{eqnarray*}
z & = & w + x + \\
  &   & 5w - 8c 
\end{eqnarray*}

Here the equation array is being tested.  This equation has equation numbers
and is almost as simple as an equation array can get.
\begin{eqnarray}
z & = & w + x + \\
  &   & 5w - 8c 
\end{eqnarray}

Here the equation array is being tested.  This equation the first and third equations numbered
\begin{eqnarray}
z & = & w + x  \\
z & = & w + x \nonumber\\
z & = & w + x  
\end{eqnarray}

Here the equation array is being tested.  This checks for a bug when 
\verb#\nonumber# is present in an \verb#\begin{eqnarray*}# environment.  
No equations should be numbered.
\begin{eqnarray*}
z & = & w + x  \\
z & = & w + x \nonumber\\
z & = & w + x  
\end{eqnarray*}

\section{Equation numbering test}
This equation needs a number 
\begin{equation}\label{ab3}
\,\varphi\,=\,\left|\,
\begin{array}{c}
\psi_1 \\
\psi_2
\end{array}\,\right|\,; \quad {\rm and} \quad
\,\chi\,=\,\left|\,
\begin{array}{c}
\psi_3 \\
\psi_4
\end{array}\,\right|\,; \quad {\rm or} \quad
\,\eta\,=\,\left|\,
\begin{array}{c}
\tilde{\psi}_1 \\
\tilde{\psi}_2
\end{array}\,\right|\,; \quad {\rm and} \quad
\,\lambda\,=\,\left|\,
\begin{array}{c}
\tilde{\psi}_3 \\
\tilde{\psi}_4
\end{array}\,\right|\,;
\end{equation}
more text following

\section{Testing math environment closing}

For a while, getting \texttt{latex2rtf} to contain all the math elements
to the enclosing was a major headache.  It is working for now.  Here are
a few test cases.

Case 1 Here a math environment is found within an italic environment
\textit{s$_c+1$} or {\it s$_c$}

Case 2 The odd construction \verb#$a+\bf R$# follows $a+\bf R$ which
should make ``a'' italic and ``R'' bold

Case 3 Same as above but using \verb#\(# to enter a math environment
\(a+\bf R\) roman type follows

Case 4 Same as above but using \verb#\[# to enter a math environment \[a+\bf R\] 
roman type follows

Case 5 Same as above but using \verb#\begin{math}# to enter a math environment
\begin{math}a+\bf R\end{math} roman type follows

Case 6 Same as above but using \verb#\begin{equation}# to enter a math environment
\begin{equation}a+ \bf R\end{equation} roman type follows

Case 7 Same as above but using \verb#\begin{eqnarray}# to enter a math environment
\begin{eqnarray}a+ \bf R\end{eqnarray} roman type follows

Case 8 Same as above but using \verb#\begin{equation*}# to enter a math environment \\
Note: \verb#\begin{equation*}# produces LaTeX error.\\
Use \verb#\begin{displaymath}# instead.

Case 8a Same as above but using \verb#\begin{displaymath}# to enter a math environment
\begin{displaymath}a+ \bf R\end{displaymath} roman type follows

Case 9 Same as above but using \verb#$$# to enter a math environment
$$a+ \bf R$$ roman type follows

Note: Delimiting an equation by \verb|$$| is a plain\TeX{} command and
should \emph{not} be used in \LaTeX{} documents.


\section{Large Delimiters}

\subsection{Determinant}

\[
\det A = \left| \begin{array}{cccc}
a_{11} & a_{12} & \cdots & a_{1n}\\
a_{21} & a_{22} & \cdots & a_{2n}\\
\vdots & \vdots & \ddots & \vdots\\
a_{m1} & a_{m2} & \cdots & a_{mn}
\end{array} \right|
\]

\subsection{Mixed Delimiters}
\[
w =  \left| 4 x^3 + \left( (x-y) + \frac{42}{1+x^4} \right) \right|.
\]

\subsection{Submatrices}
\[
A = \left[ \begin{array}{cccc}
\left|\begin{array}{cc}
b_{11}&b_{12}\\
b_{21}&b_{22}
\end{array}\right|
 & a_{12} & \cdots & a_{1n}\\
a_{21} & a_{22} & \cdots & a_{2n}\\
\vdots & \vdots & \ddots & \vdots\\
a_{m1} & a_{m2} & \cdots & a_{mn}
\end{array} \right]
\]

\subsection{Fractions}
Simple
\[
{x \over y}
\]
More complicated
\[
{x+1 \over {x+2 \over y+z +w}}
\]
Missing braces
\[
x \over y
\]
Including braces
\[
{\{ x+y \} \over w}
\]
Including left

\[
{\left\{\sqrt{y+z}\right\}\over w}
\]

\section{fields}
Problem with mbox containing \$ in a field
\[
x[l]\leftarrow x[(l+m) \bmod  n] \oplus \mbox{shiftright}(x[l])
 \oplus \left\{ \begin{array}{ll}
                0   & \mbox{if LSB of $x[l]$=0} \\
                b   & \mbox{if LSB of $x[l]$=1,}
               \end{array}
        \right.
\]
problem with correctly delimiting the above equation 
$
x[l]\leftarrow x[(l+m) \bmod  n] \oplus \mbox{shiftright}(x[l])
 \oplus \left\{ \begin{array}{ll}
                0   & \mbox{if LSB of $x[l]$=0} \\
                b   & \mbox{if LSB of $x[l]$=1,}
               \end{array}
        \right.
$

Look at the position of the superscript in this:
\[
  \left[
    \begin{array}{ccc}
      1 & 2 & 3\\
      4 & 5 & 6\\
      7 & 8 & 9
    \end{array}
  \right]^T
\]
or the superscript and subscript superposition:
\[
  s = \sum_{i=1}^n x^2_i
\]
or embedded sub/superscripts:
\[
  s_n=s^{n^2}
\]
and
\[
  s_n=s^{n_2}
\]

\end{document}
