\documentclass{article} % could also do report, book, slides.  try them out!

\usepackage{amsmath}    % gives us all the equation environment goodness
\usepackage{amsfonts}   % can't do math without greek letters and scripty 't's now can we?
\usepackage{graphicx}   % so we can insert figures.  I like using .png images for PDFs
\usepackage{times}      % gives nice postscript fonts
\usepackage{fullpage}   % by default LaTeX has HUGE margins.  this is more sane.
\author{Brent W. Woodruff\\   % Its-a Me!
Appalachian State University}
\title{A \LaTeX\ Example}     % the title. \LaTeX gives the LaTeX logo.  the extra
                              % slash on the end gives a space between it and 'Example'

\begin{document}   % anything you \begin{} you MUST also \end{}
\maketitle         % This builds the title, author, and date on the page

\begin{abstract}
This is the abstract of the paper.  In this example we'll show how to format research papers, equations, tables, insert graphics, and do all kinds of neato references.
\end{abstract}

\section{This is a section}
First we'll start of with some plain text.  Pretty plain, right?  You'll notice that this paragraph is not indented and sometimes you don't always want that.  In fact, there are quite a few times \LaTeX\ will put things everywhere but where you want them.  Learn it and love it, because the equation formatting makes it \emph{so} much better than a WYSIWYG word processor.

This new paragraph is indented.  I'll try to fill up the rest of this line so it looks more like a paragraph.  You can also do subsections as well as sections, like so.

\subsection{This is a subsection}
Astounding isn't it?  Let me start a new section and we'll do some equations.

\section{Equations}
Simply put, \LaTeX\ can format equations in tons of ways using the amsmath and amsfonts package.  You can do inline equations like $y=x^2$ and even more complicated ones like $u(x,0)=sin(x)$ and $f(x)=\frac{\sqrt{12-x}}{x^3-3}$.  If you want an equation centered on a line by itself you can do this:  $$c(x)\rho(x)\frac{du}{dt}(x,t)=\frac{d}{dx}[K_0(x)\frac{du}{dx}(x,t)]$$ and if you want it to have a number, use the equation environment
\begin{equation}
	\int_{0}^{1} e^{x} dx = e - 1.
	\label{myintegral-eqn}
\end{equation}
Now I can reference the above equation like so: Equation (\ref{myintegral-eqn}) was made up on the spot.

\section{Figures}
\LaTeX\ can process a number of different graphics formats to include in files.  I have found that for creating PDF files, using .png images is quite nice.  It is important to state the the images probably won't come up in the file where you expect them.  The idea here is to just put the image directly after the text where it is supposed to show, hope for the best, and then consult \LaTeX\ gurus if you need them somewhere else.  Figure placement should probably be the \emph{last} thing you worry about.

\begin{figure} \centering
\includegraphics[width=2in, height=2in]{xsquared.jpg}
\caption{You can put equations in captions. $y=x^2$}
\label{xsquared-fig}
\end{figure}

And like equations, you can reference figures.  Figure \ref{xsquared-fig} is the graph of $y=x^2$.

\section{Tables}

I had a hard time finding an example of constructing tables in \LaTeX\, so here's one of mine:
\begin{center}            % the table will be left-aligned if you don't use this
\begin{tabular} {cc||ccc} % the 'c's here are just place-markers for the columns.
       &   &  \multicolumn{3}{c}{Block Length / 32} \\  % multicolumn merges cells
       &   &  4 &  6 &  8 \\
\hline \hline             % two horizontal lines to seperate the header from the rest.
Key    & 4 & 10 & 12 & 14 \\
Length & 6 & 12 & 12 & 14 \\   % the & signs separate the entries
/ 32   & 8 & 14 & 14 & 14 \\
\end{tabular}
\end{center}
This is from a paper I wrote on AES.  There are comments in the source file on it.

\section{A short References howto}
One of the more tricky things to do in \LaTeX\ is get your references working.  There is a full-blown program for this called BibTeX, but you really only want to use that if you are a full time researcher or writing a HUGE thesis or something.  Anyways, I have a two item Bibliography section below and here I will cite one of them \cite{DaemenVincent}.

\section{That's all for now, folks}
This should be enough to get you started.  I don't claim this is very informative, I just want to introduce people that don't know anything at all about \LaTeX\ to this wonderful piece of software.

% The bibliography environment will create a section called 'references.'
% The {99}, straight from the manual is:
% "`... text that, when printed, is approximately as wide as the widest
%       item label produced by the \bibitem command."

\begin{thebibliography}{99}

\bibitem{Zwillinger} Daniel Zwillinger,  {\it CRC Standard Mathematical Tables and Formulae, 30th Edition},  CRC Press, 1996.

\bibitem{DaemenVincent} Joan Daemen and Vincent Rijmen,  {\it The Design of Rijndael},  Springer, 2002.

\end{thebibliography}

\end{document}
