\documentclass[11pt]{article}

%% the following is optional, it chooses a different font from the 
%% default (Computer Modern).  The New Century Schoolbook font 
%% shows up better in screen display of PDF files.
\usepackage{newcent}

%% The following loads a ``url'' macro that is useful for urls, commands, 
%% and other stuff that you want in a typewriter font.
\usepackage{url}

% define the title
\author{Emily Carlin}
\title{Quick Introduction to Latex}

\begin{document}
\maketitle

\section{Absolute Basics}

\begin{flushleft}
To create a new file create your file as documentName.tex\\
\end{flushleft}


\begin{flushleft}
To preview your file:\\
\verb|latex documentName| \\
\verb|dvips -o documentName.ps documentName.dvi| \\
Open Ghostview or another ps viewer open your .ps file.\\
\end{flushleft}

\begin{flushleft}
To print:\\
\verb|latex documentName| \\
\verb+dvips document.dvi | lpr+ or \verb|lpr documentName.ps| if you already have a .ps version. \\
\end{flushleft}

Alternatively, you can use Scott's \url{latex.sh} command, which gives
you single-letter prompts for converting to PostScript or PDF,
printing and the like.

\begin{verbatim}
latex.sh documentName
\end{verbatim}

\section{Special Latex Considerations}

\begin{flushleft}
Latex treats all white space as one ``space'' therefore using whitespace to space out your work does not work. To deliniate a paragraph in \LaTeX{} simply leave a line of space between the paragraph and the previous one (e.g. pressing ``return'' twice).
\end{flushleft}

\begin{flushleft}
Special characters:\\
\# \$  \% \^{} \& \{ \} \_ $\backslash $ 

To use these character put a backslash in front of them for example: \verb|\$|.  This does not work for the backslash itself as \verb|\\| is a linebreak. It also does not work for the \^{}, for this symbol you must type \verb|\^{}|. 
\end{flushleft}

\begin{flushleft}
Comments:\\
The \% sign makes comments.  Anything on a line after an \% is ignored in the final document.
\end{flushleft}

\begin{flushleft}
Enviroments:\\
In the document enviroments take the form:
\begin{verbatim}
\begin{enviromentName}
...
\end{enviromentName}
\end{verbatim}  

\end{flushleft}

\section{Bare Bones Latex Document}

\begin{flushleft}
Here is the minimum Latex document.
\end{flushleft}

\begin{verbatim}
\documentclass{article}
\begin{document}
Insert your text here.
\end{document}
\end{verbatim}

\begin{flushleft}
There are many options for the documentClass and there are special packages that can be added into the header of your document, but they will not be discussed here. One option that is useful if the font size option. \LaTeX{} prints 10pt fonts by default. To change this when you define your documentClass do the following \verb|\documentClass[12pt]{article}|.
\end{flushleft}

\section{Spacing}

\begin{flushleft}
To align your document use the commands: ``flushleft,'' ``flushright,'' and ``center.'' For example:
\begin{verbatim}
\begin{flushleft}
I want this text to be aligned left.
\end{flushleft}
\end{verbatim}
\end{flushleft}

\begin{flushleft}
If you have a section of text with complicated spacing, such as a computer program use the verbatim enviroment. Do this by entering \verb|\begin{verbatim} your code \end{verbatim}|. Note that all spacing must be done by pressing the ``Space Bar'' and not using the ``Tab'' key as \LaTeX{} does not recognize tabs. Here is an example of code written inside the ``verbatim'' enviroment.
\begin{verbatim}
while (arrivedHacker == 0) {
     if ((inBoat + arrivedHacker + arrivedSerf < 4) && (waitingHacker >= 2)) {
         waitingHacker = waitingHacker - 2;
         arrivedHacker = arrivedHacker + 2;
         waitingToBoardHacker.signal();
     } else {
         waitingToBoardHacker.wait();
     }
}
\end{verbatim}
\end{flushleft}

\section{CS Considerations}

\begin{flushleft}
For writing CS documents you will want to know how to make your code easily recognizable as code. The ``verbatim'' enviroment shows above is the best way to show large pieces of code. To show very short pieces of code use: \verb+\verb|your code here|+.  The pipes (\verb+||+) define the beginning and end of the short verbatim enviroment. You can also use plus signs for the same purpose (this is especially useful if you code has a pipe in it).
\end{flushleft}

\begin{flushleft}
You may also find that you want to display scientific notation or other mathematical operations. \LaTeX{} is particularly good at displaying mathematical functions and has a lot of options that will not be discussed here. To show scientific notation do the following \verb|$3 \cdot 10^{-6}$|. This will display as $3 \cdot 10^{-6}$ in your text.
\end{flushleft}

\begin{flushleft}
Also, if you want to display mathematical operations use the tag \verb|\mbox{}|. It will assure that the formula has the proper spacing. For example: \mbox{2+5=7}.
\end{flushleft}

\section{Writing Considerations}

\begin{flushleft}
If you are using \LaTeX{} to write a paper you will probably want to know how to put in quotations. If it is a short quotation just use quotation marks, but if it is a long quote you should use the quote enviroment. Here is an example:
\begin{verbatim}
\begin{quote}
This is a sample quotation. It's not quite as long as it should be, 
but it will have to do.
\end{quote}
\end{verbatim}
It produces output that looks like this:
\begin{quote}
This is a sample quotation. It's not quite as long as it should be, but it will have to do.
\end{quote}

If you want to quote poetry use the enviroment ``verse''.
\begin{verbatim}
\begin{verse}
Humpty dumpty sat on a wall.\\
Humpty dumpty had a great fall.\\
All the King's horses and all the King's men *added to make 
the line longer to show just what will happen to a long line*\\
Couldn't put Humpty together again.
\end{verse}
\end{verbatim}
This will look like this:
\begin{verse}
Humpty dumpty sat on a wall.\\
Humpty dumpty had a great fall.\\
All the King's horses and all the King's men *added to make 
the line longer to show just what will happen to a long line*\\
Couldn't put Humpty together again.
\end{verse}

You may also want to emphasize certain parts of you text, this can be done using the \verb|\emph{text to be emphasized}| tag. For example: \emph{This text has been emphasized}.  Or you can make your text \textbf{bold} using the \verb|\textbf{}| tag.
\end{flushleft}

\begin{flushleft}
\LaTeX{} makes footnotes incredibly easy. Just use the \verb|\footnote{}| tag. For example: \verb|\footnote{This is a footnote}| does this \footnote{This is a footnote}. \LaTeX{} will automatically number and arrange your footnotes, so you never have to worry about renumbering them.
\end{flushleft}

\section{Other Considerations}

\begin{flushleft}
At some point you may want to put an enumerated list in your document. This can be done in two ways, with itemized lists (numbered or bulleted) or descriptive lists. Here is an example of an itemized list:

\begin{enumerate} %numbered
\item This is a numbered item
\begin{itemize} %bulleted
\item This is bulleted
\item[-] You can also customize how and item is bulleted
\end{itemize}
\end{enumerate}

Here is the code that made that lovley list possible:
\begin{verbatim}
\begin{enumerate} %numbered
\item This is a numbered item
\begin{itemize} %bulleted
\item This is bulleted
\item[-] You can also customize how and item is bulleted
\end{itemize}
\end{enumerate}
\end{verbatim}

Note that the bullets were lists within the overall numbered list, as they were an itemized list within the enumerated list. You can also have a definition list. For example:

\begin{description} 
\item[Dog] an often cute and fuzzy animal
\item[Lists] can be quite nice
\end{description}

Here is the code for the preceeding:

\begin{verbatim}
\begin{description} 
\item[Dog] an often cute and fuzzy animal
\item[Lists] can be quite nice
\end{description}
\end{verbatim}

Note that all of the different lists can be used within each other, so feel free to mix and match if you so desire.
\end{flushleft}

\section{Note}

\begin{flushleft}
\LaTeX{} is a large and complicated program and this guide hasn't even scratched the surface of its capabilities. For more information go to \verb|www.latex-project.org| or \verb|www.tug.org|. Also there are online manulas at \verb|http://www.emerson.emory.edu/services/latex/latex_toc.html|, \verb|http://www.giss.nasa.gov/latex/ltx-2.html|, and \verb|http://www.scs.carleton.ca/~dehne/doc/latexMan/| and many other locations online.
\end{flushleft}

\end{document}
