\documentclass[12pt]{article}
\usepackage{amsmath,amssymb,color}
\title{My First Document}
\author{Your Name}
\date{\today}
\begin{document}
\maketitle
\tableofcontents
\newpage
\section{Introduction}
This is my first document in \LaTeX.
\section{Making Sections and Paragraphs}
This is an example of a section. This section will be numbered.
\subsection{The Subsection}
This is a subsection.
Here we can write a paragraph. If we use a double carriage return, we can get another paragraph.
Here it is.
\LaTeX\ treats a single space the same way as a double space or a single carriage return. It treats them all as a single space, so this text does not create a new paragraph.
\section*{Another type of section}
If you use a * after the command for a new section, the section will be unnumbered.
\subsection{Changing fonts}
We can try a few different ways of emphasizing text. We can make text \textbf{bold}. We can also \emph{emphasize} a word. Other options include \textit{italics}, \textsc{small caps}, \uppercase{uppercase} and \texttt{typewriter}.
We can also make different sizes of font, such as \tiny{tiny}, \small{small}, \normalsize{normal size}, \large{large}, \Large{Large}, \LARGE{LARGE}, \huge{huge}, and \Huge{Huge}.
\normalsize
We also can use \color{red}{colors}. \color{green}Green, \color{yellow}Yellow, or \color{magenta}magenta! You can also change back to \color{black} black.
\subsection{Comments}
It can be useful to add comments. Anything I type after the percent sign % will not appear in my document.
\section{In which we type math}
We can write math inline as in $x+y=z$. (Note: If we want to use dollar signs to indicate a monetary amount, we need to use a backslash. As in, \$3.50, or similarly, 75\%.) Alternatively we can write math in display mode:
\[ x^2+y^2=z^2\]
\[ x_1+x_2+x_3+\dots+x_n \]
\[ \sin x +\cos x \]
\[ \frac{1}{6}\]
\[ \sqrt{x} \]
\[ \frac{x+y}{\sqrt[3]{x}}\]
\[ \lim_{x\to\infty} \frac{1}{x} \]
\[ \sum_{i=1}^n x^n \]
\end{document}