% Any line starting with a % is a comment and gets ignored by the typesetter!

% Typesetting commands always start with a \



%  Here is what a bare-minimum LaTeX file might look like (without the %s):
%
% \documentclass{article}
% \begin{document}
% blah blah blah
% \end{document}
%
% Pretty easy, right?




%\documentclass tells LaTeX what type of thing you are writing.  Some useful document classes are
% 		article, report, book, and letter
% You can experiment with different document classes to see how the output changes.
% [12pt] chooses the default font size.  Other options are [10pt] and [11pt].
\documentclass[12pt]{article}

\title{A Sample LaTeX File}
\author{Matt Noonan}
\date{}

% You tell LaTeX that you are ready to begin with the document
% 		by using the \begin{document} command
\begin{document}

%Let's put the title here.  \maketitle doesn't work for letters since
%		letters don't have titles.  It works for books, articles,
%		and reports to create either a title page or a title line.
\maketitle

\section{Introduction}
This is a sample LaTeX file.  You type your content just like this.  Nothing tricky at all.  If I want an equation like ``two plus two equals four'' then I just write $2 + 2 = 4$.  The dollar signs put you in math mode.  You can also give an equation its own line like this: \[2^2 = 2+2 = 4\] or even \[\int_a^b f(x) dx = f(b) - f(a)\]

\section{Things You Can Do}
If you want to give some text special emphasis, use the \emph{emph command}.

To get a new paragraph, just put in a blank line.  Notice how the typesetter chose to indent this paragraph, but not the one immediately following the section heading.  These stylistic things add a professional touch to your work without any extra thought from you.

You can make a big quote like: 
\begin{quote}
In the book, men are portrayed as polygons whose social class is directly proportional to the number of sides they have; therefore, triangles, having only three sides, are at the bottom of the social ladder and are considered generally unintelligent, while the Priests are composed of multi-sided polygons whose shapes approximate a circle, which is considered to be the``perfect" shape. On the other hand, the female population is comprised only of lines, who are required by law to sway back and forth and sound a ``peace-cry" as they walk, because when a line is coming towards an observer in a 2-D world, it appears merely as a point...
\end{quote}
without worrying about how to arrange it yourself.

Footnotes are also easy.\footnote{Just use the footnote command.}  The footnote numbering is automatic.\footnote{Of course.}

One annoying thing: to make an open quotation mark, use `` rather than the quotation mark ".  Somewhat related: \% and \# are special characters in LaTeX, so they must be typeset using commands instead of directly in the text.

\section{Some Math Tricks}

Here are some things you might want to do in math mode.

% fractions
\[\frac{d}{dx} x^2 = 2x\]

% subscripts, superscripts
\[a_{n + 1} = a_1^n\]

% integrals
\[\int_0^1 x^2 dx = \frac{1}{3}\]

% sums
\[\sum_{k = 1}^n k = \frac{n \cdot (n + 1)}{2}\]

% limits
\[\lim_{x \rightarrow 0} \frac{\sin(x)}{x} = 1\]

% functions
\[ \cos(\sin(\log(1))) = 1\]

Notice that LaTeX takes care of typesetting integrals and fractions differently when they are in display mode:
\[\int_0^1 x^2 dx = \frac{1}{3}\]
versus inline mode $\int_0^1 x^2 dx = \frac{1}{3}$.


% We are done with the document, so tell LaTeX to stop working:
\end{document}

