\documentclass{report}
\usepackage{amsthm,amsfonts,amsmath,pdfpages,graphicx,hyperref}
\textwidth=6.25in
\textheight=9.5in
\headheight=0in
\headsep=.5in
\hoffset  -1in
\topmargin -.75in

\title{A Short Introduction to \LaTeX}
\author{R. Scott Williams}
\date{}

\begin{document}
\maketitle
\tableofcontents
\chapter{Why \LaTeX?}
The simplest answer is that it just looks better than anything else out there; not only for mathematical formulae but also for text.\\

Here is a quick comparison of the text produced using the default font and size for \LaTeX (left) and MS Word 2007 (right).
\begin{center}
\framebox{\begin{minipage}{3in}
Call me Ishmael. Some years ago -- never mind how long precisely -- having little or no money in my purse, and nothing particular to interest me on shore, I thought I would sail about a little and see the watery part of the world.
\end{minipage}}
\begin{minipage}{3.1in}
\includepdf[pages={1},noautoscale=true,frame=true,offset=60mm 18mm]{word_font.pdf}
\end{minipage}
\end{center}
\vspace{.25in}
The difference is even more evident when we begin using mathematical symbols and notation. Again, these are produced using the default settings in \LaTeX (left) and MS Word 2007 (right).
\begin{center}
\framebox{\begin{minipage}{1.75in}
\[\lim_{x\rightarrow\infty}\frac{\pi(x)}{x/\ln(x)}=1\]
\[\int_{-\infty}^\infty e^{-x^2}\ dx = \sqrt{\pi}\]
\end{minipage}}
\begin{minipage}{1.8in}
\includepdf[pages={1},noautoscale=true,frame=true,offset=50mm -25mm]{word_eqn.pdf}
\end{minipage}
\end{center}
\vspace{.25in}
Apart from arguments based on personal aesthetic preferences, \LaTeX\ has become the mathematical typesetting standard in all technical disciplines. Most, if not all, major publications in mathematics, computer science, engineering and physics use \LaTeX\ as the preferred typesetting system. In addition, unlike MS Word (and some other word processors), \LaTeX\ is completely free and available on almost every platform out there. \\

If you're seeking a career in mathematics (or another related field) it is highly unlikely that you will get very far without having to write your homework/papers/thesis/dissertation in \LaTeX. So why not take a bit of time and learn it now?\\

The following material is an extremely brief introduction to \LaTeX, for a more in-depth reference I suggest ``The Not So Short Introduction to \LaTeX\ (Or \LaTeX\ in 87 Minutes)''.



\chapter{Compilers \& Editing Software}
Before you can begin writing papers using \LaTeX\ you need to install it on your machine, so we will briefly discuss that now. One caveat is that the majority of my computing is done on Windows based machines, so the information presented here will be highly skewed toward Windows. 

Writing in \LaTeX\ is much different than writing in word processors; for one, there is a certain amount of coding and syntax which must be learned to create a \LaTeX\ document. At first the required syntax might seem cumbersome and slow to use; however, through practice the benefit and power of such syntax will hopefully become evident.

\section{Distributions}
As mentioned above, \LaTeX\ requires some special coding and syntax which needs to be compiled to create your document. For Windows two widely used compiler distributions are:
\begin{enumerate}
\item MiKTeX -- \url{http://www.miktex.org}
\item TeXLive -- \url{http://www.tug.org/texlive}
\end{enumerate}
As far as Linux goes, I believe that most distributions contain \LaTeX\ packages -- check for: \texttt{texlive} or \texttt{tetex}.

Having never used \LaTeX on a Mac I'm flying a bit blind here. Maybe give \texttt{MacTeX}\\(\url{http://www.tug.org/mactex/}) a try, or you might be better suited Googling it. 

\section{\LaTeX  Editors}
Once you have a compiler installed you can actually open any text editor and begin writing a \LaTeX\ document which would look just as good as anything out there; however, \LaTeX\ editors have been created to greatly simplify and speed the process of creating a \LaTeX\ document. 

Ask anyone what the best \LaTeX\ editor is and you probably won't hear the same program mentioned twice. There are dozens of editors out there, each with their own strengths and weaknesses; what is best suited for one user might be horrible for the next. Personally, I've always been partial to the editor which I first learned \LaTeX\ on (LEd). While I've tried a few others out, I always find myself going back to because it's simply the one I know best.

Here are a few \LaTeX\ editors for Windows:
\begin{enumerate}
\item LEd -- \url{http://www.latexeditor.org}
\item TeXnicCenter -- \url{http://www.texniccenter.org}
\item TeXstudio -- \url{http://texstudio.sourceforge.net}
\end{enumerate}

Again, I'm not nearly as familiar with Linux or Macs, but for Linux maybe give Kile\\(\url{http://kile.sourceforge.net}) a shot, and for Mac maybe try Aquamacs (\url{http://aquamacs.org}). Or spend some time on Google looking for a widely used editor for your system.

A comparison of some different \LaTeX\ editors can be found here:\\ \url{http://en.wikipedia.org/wiki/Comparison_of_TeX_editors}, but I don't know how beneficial it will actually be for you.

Each of the websites for the above editors should have detailed instructions on how to install and set up the program as well as any other required/suggested programs for you to install (there are a few programs like .dvi or .ps viewers that might be suggested for you to download).

\chapter{Getting Started}
Now that you have your compiler and editor installed it's time to start writing your document. \LaTeX\ documents are written in files with the \texttt{.tex} file extension and the compiled output can be saved in many different formats: PDF, Dvi, PS, just to name a few. 

The first thing which will be written in your \texttt{.tex} file will designate what type (or class) of document you are writing. This is done through using the command:

\begin{center}
\begin{minipage}{1.5in}
\begin{verbatim}
\documentclass{...}
\end{verbatim}
\end{minipage}
\end{center}
The built in classes are: \texttt{article}, \texttt{report}, \texttt{letter}, \texttt{book}, \texttt{proc} (you probably won't use this one much), and \texttt{slides}. Each class comes with its own set of formatting (margins, titles, page numbers, etc.) already built in.

After you have specified your document's class the next thing to specify are which packages you will be using. This is accomplished through the command:
\begin{center}
\begin{minipage}{1.5in}
\begin{verbatim}
\usepackage{...}
\end{verbatim}
\end{minipage}
\end{center} 
These packages provide added functionality (such as including graphics, changing colors, using new fonts or strange symbols, etc.) to what comes standard in \LaTeX. Don't worry about having to find and install these packages yourself; generally your \LaTeX\ editor will do it automatically for you (there are some cases where you have to do it manually, but it doesn't happen too often).

After these two commands you have the option to include others to perform tasks such as further changing the margins, defining your own commands, listing the title of your article/book, etc.. With time you'll find the optional commands that you like best, but to keep things basic let's forget about them for now.

The last thing to do is to actually begin your document. Which, rightfully so, is done using the command:
\begin{center}
\begin{minipage}{1.5in}
\begin{verbatim}
\begin{document}
\end{verbatim}
\end{minipage}
\end{center} 
Now that you've begun your document you can start writing. Since all good things must come to an end, once you've finished writing what you want you need to end your document, using the aptly named command:
\begin{center}
\begin{minipage}{1.5in}
\begin{verbatim}
\end{document}
\end{verbatim}
\end{minipage}
\end{center} 
Putting it all together, your \texttt{.tex} file should look something like:
\begin{center}
\begin{minipage}{1.5in}
\begin{verbatim}
\documentclass{article}
\usepackage{amsfonts}

\begin{document}
Here is my text!!
\end{document}
\end{verbatim}
\end{minipage}
\end{center} 

\chapter{Writing Your Document}
Now that you can create a \LaTeX\ document we should briefly discuss some of the most useful commands. This is going to be a very short list providing only the basics; however, the \LaTeX\ community is excellent and almost anything you would need to know has been asked and answered by someone online already. So, if you want to know how to do something that isn't covered here just Google it and you'll find your answer right away.

\section{Text Commands}
For the most part writing text in \LaTeX\ is done exactly the same way you would in any word processor, but there are things like bold/italic/underlined font, font sizes, lists, etc., that are nontrivial and will now be discussed.
\begin{itemize}
\item \textbf{Bold text can be accomplished using the command:}
\begin{center}
\begin{minipage}{1.5in}
\begin{verbatim}
\textbf{...}
\end{verbatim}
\end{minipage}
\end{center} 
\item \emph{Italicized text is created using the command:}
\begin{center}
\begin{minipage}{1.5in}
\begin{verbatim}
\emph{...}
\end{verbatim}
\end{minipage}
\end{center} 
\item \underline{Underlined text is given by:}
\begin{center}
\begin{minipage}{1.5in}
\begin{verbatim}
\underline{...}
\end{verbatim}
\end{minipage}
\end{center} 
\end{itemize}
Font size can be changed globally (i.e., for the entire document) by listing an option in your document class. It would look something like:
\begin{center}
\begin{minipage}{1.5in}
\begin{verbatim}
\documentclass[14pt]{article}
\end{verbatim}
\end{minipage}
\end{center} 
However, the default text size is usually ideal, so there aren't too many times you would need to change the text size globally like this. Rather, what happens more often, is that you would like to change the size of a letter/word/sentence/etc.. For this you have a few sizes to choose from: Huge, huge, LARGE, Large, large, normalsize (default), small, footnotesize, scriptsize, and tiny. 

If you only want to change the size of a letter/word/sentence then you would probably want to use a command like:
\begin{center}
\begin{minipage}{2.2in}
\begin{verbatim}
{\Large This text is rather large.}
\end{verbatim}
\end{minipage}
\end{center} 
which would produce the output:
\begin{center}
{\Large This text is rather large.}
\end{center}
If you want to change the size of a paragraph or even a few sentences a better approach might be the command:
\begin{center}
\begin{minipage}{4in}
\begin{verbatim}
\begin{tiny}
Call me Ishmael. Some years ago -- never mind how long
precisely -- having little or no money in my purse, 
and nothing particular to interest me on shore, I 
thought I would sail about a little and see the watery
part of the world.
\end{tiny}
\end{verbatim}
\end{minipage}
\end{center} 
which produces:\\
\begin{tiny}
Call me Ishmael. Some years ago -- never mind how long precisely -- having little or no money in my purse, and nothing particular to interest me on shore, I thought I would sail about a little and see the watery part of the world.
\end{tiny}\\

Numbered and bulleted lists (like the ones used in this document) are created using the commands:
\begin{center}
\begin{minipage}{1.5in}
\begin{verbatim}
\begin{enumerate}
\item 
\item 
\item 
\end{enumerate}
\end{verbatim}
\end{minipage}
\qquad\qquad
\begin{minipage}{1in}
\begin{verbatim}
\begin{itemize}
\item 
\item 
\item 
\end{itemize}
\end{verbatim}
\end{minipage}
\end{center} 
respectively. 

Once again, this barely scratches the surface of the things you can do to your text in \LaTeX, so if you're interested in more commands I suggest picking up a more in-depth \LaTeX\ reference or (again) spending some time on Google.

\section{Mathematical Commands}
It's finally time to talk about what \LaTeX\ is best at, math! When we want to begin writing something mathematical (like a variable/fraction/equation/etc.) we need to tell \LaTeX\ that we are switching from normal text to something mathematical. As with most things in \LaTeX\ there is more than one way to do this. The first is done in-line, usually used for variables or short functions, by offsetting the text in dollar-signs:
\begin{center}
\begin{minipage}{1in}
\begin{verbatim}
$f(x)=2x+1$
\end{verbatim}
\end{minipage}
\end{center} 
which will produce the output: $f(x)=2x+1$. 

When you have longer more complicated functions it's usually best to put them on their own line (and centered in the middle of the page). Here is one way to accomplish this:
\begin{center}
\begin{minipage}{2.1in}
\begin{verbatim}
\[f(x,y,z)=2x+4xy-3yz+7xz-z\]
\end{verbatim}
\end{minipage}
\end{center} 
will produce
\[f(x,y,z)=2x+4xy-3yz+7xz-z\]
which is centered and on its own line.

Multi-line equations can be formed using the
\begin{center}
\begin{minipage}{1in}
\begin{verbatim}
\begin{eqnarray}
...
\end{eqnarray}
\end{verbatim}
\end{minipage}
\end{center} 
command, but there are a few details which are being left out here, so it would be best to look this one up if you're interested.

Once you've entered this ``math mode'' the fun can really begin. Rather than giving a few sentences about all of the different symbols and notation that can be created we instead have chosen to provide a list of some of the most used commands for a quick and easy reference:
\newpage
\begin{center}
\textbf{Operations}\\
\verb1\times1 $=\times$\qquad \verb1\cdot1 $=\cdot$\qquad \verb1\div1 $=\div$\qquad \verb1\ast1 $=\ast$\qquad \verb1\circ1 $=\circ$
\end{center}

\begin{center}
\textbf{Exponents and Subscripts}\\
\verb1x^31 $=x^3$ \qquad \verb1x_{30}1 $=x^{30}$\qquad \verb1x_21 $=x_2$ \qquad \verb1x_{20}1 $=x_{20}$\\
\verb1x_2^31 $=x_2^3$ \qquad \verb1x_{2_4}^{3_5^7}1 $=x_{2_4}^{3_5^7}$
\end{center}

\begin{center}
\textbf{Fractions}\\
\verb1\frac{a}{b}1 $=\frac{a}{b}$ \qquad \verb1\dfrac{a}{b}1 $=\dfrac{a}{b}$ \qquad \verb1\frac{\frac{a}{b}}{c}1 $=\frac{\frac{a}{b}}{c}$
\end{center}

\begin{center}
\textbf{Limits}\\
\verb1\lim_{x\rightarrow a}f(x)1 $=\lim_{x\rightarrow a}f(x)$\\ \verb1\displaystyle\lim_{x\rightarrow \infty}f(x)1 $=\displaystyle\lim_{x\rightarrow \infty}f(x)$
\end{center}

\begin{center}
\textbf{Sums}\\
\verb1\sum_{i=0}^n(i+2)1 $=\sum_{i=0}^n(i+2)$\\
\verb1\displaystyle\sum_{i=0}^n(i+2)1 $=\displaystyle\sum_{i=0}^n(i+2)$
\end{center}

\begin{center}
\textbf{Integrals}\\
\verb1\int_a^b f(x)dx1 $=\int_a^b f(x)dx$\\
\verb1\displaystyle\int_a^b f(x)dx1 $=\displaystyle\int_a^b f(x)dx$\\
\verb1\iint f(x,y)dydx1 $=\iint f(x,y)dy dx$
\end{center}

\begin{center}
\textbf{Relations}\\
\verb1\neq1 $=\ \neq$\qquad \verb1\geq1 $=\ \geq$\qquad \verb1\leq1 $=\ \leq$\qquad \verb1\equiv1 $=\ \equiv$\qquad \verb1\cong1 $=\ \cong$\\ 
\verb1\in1 $=\ \in$\qquad \verb1\ni1 $=\ \ni$\qquad \verb1\subset1 $=\ \subset$\qquad \verb1\supset1 $=\ \supset$
\end{center}

\begin{center}
\textbf{Number Systems}\\
\verb1\mathbb{N},\mathbb{Z},\mathbb{R},\mathbb{C},\mathbb{F}1 $=\mathbb{N},\mathbb{Z},\mathbb{R},\mathbb{C},\mathbb{F}$
\end{center}

\begin{center}
\textbf{Greek Letters}\\
\verb1\alpha,\beta\gamma,\delta,\epsilon,...1 $=\alpha,\beta,\gamma,\delta,\epsilon,\ldots$
\end{center}

\end{document}
