\documentclass[12pt]{article}

%I'm a comment line! LaTeX ignores me.
\begin{document}
This is just a stupid little LaTeX document.
It demonstrates some of the formatting commands described
in the {\bf Very Quick Guide to Using Latex in Algorithms}.

A new paragraph begins by just skipping a line (like I did above).        And notice
how LaTeX ignores the extra white space...this is true except in verbatim mode.

i.e. Here's another paragraph.
But one could do this too!\\
Hey, while we're at it, why not skip two?\\ \\
See, now we don't get the paragraph indent, just a new line.
But hey, enough already. Its time for {\em some phrase}. No,
its time for {\bf the Govinator!}.

And what if I wanted to draw something?
\vspace*{1.5in}\\
Guess I just got 1.5 inches to do so....

But wait, there's more! Here's a list:
\begin{enumerate}
\item I'm item number one!
\item Number two!
\item and so on...
\end{enumerate}
And another
\begin{itemize}
\item Foo
\item On
\item You
\end{itemize}

But who cares about words? Its the equation power we want!
So, here's a really simple inline equation: $x = y + z$.
And here it is, broken onto its own line:
\[ x = y + z \]

This is how you would specify the ``log'' function (whose variable is $x$): $\log(x)$.
This one probably isn't what you'd intend: $log(x)$.

And check out this fraction:
\[\frac{(x + y)^n}{\log{z}}\]
And here's a couple more that were described in the quick guide:
\[ {x}_{i} = {z}^{y} \]
\[ x_i = z^y \]
See -- I told you they'd look the same.
And here's what you'd do if you wanted to have multiline formulas:
\begin{eqnarray}
x = y + z \\
z = a + b \\
\Leftrightarrow x = y + a + b
\end{eqnarray}
Note that they're numbered automatically for convenience.
Same thing would be true here (see, they're consecutive):
\begin{eqnarray}
x = y + z \\
z = a + b \\
\Leftrightarrow x = y + a + b
\end{eqnarray}
If you wanted to turn of numbering you'd do
\begin{eqnarray}
x = y + z \nonumber \\
z = a + b \nonumber \\
\Leftrightarrow x = y + a + b \nonumber
\end{eqnarray}
And now consider the Euclidean distance of some $n$-dimensional vector $x$:
\[ \Big( \sum_{i=1}^{n} (x_i)^2 \Big)^{\frac{1}{2}} \]
Notice how I used the the ``backslash-Big'' construct to make the outer parens bigger.
You might ask -- why did I write backslash out? Because its more involved to make LaTeX
print out a backslash (and that's because those usually indicate LaTeX commands, see?) and 
I'm too lazy too look up the magical incantation for doing so.

So now, lets at some nifty symbols!
\[
\sum \ \prod \ \infty \ \subset \ \subseteq \
\]
Notice I used the single backslash to put a space between each one.
That was so much fun, lets do some more!
\[
\in \ \forall \ \exists \ \emptyset 
\]
\[
\Leftrightarrow \ \Rightarrow \ \rightarrow \ \leq \ \geq \ \Theta \ \Omega \
\]
Better stop before we die of exhaustion, eh?

Alright, so how about formatting some code right before we go?
\begin{verbatim}
insertion_sort(A) {
  for i = 1 to n {
    blah      blah      blah
  }
}
\end{verbatim}

Well, its been so nice to spend this time together but I do believe it's time
to say good bye. And good luck LaTeX programming, you hacker you!

\end{document}
