\documentclass[9pt]{article}
\usepackage{graphicx}
\setlength{\parindent}{0pt}
\begin{document}
\title{Latex Example 1.1 - Math 348}
\author{Karen Mortensen and revised by GF}
\maketitle
\textbf{Theorem. } \textit{For all real numbers $x$ and $y$, \[ xy|=|x||y| \].}
\marginpar{Modified for pictures.}
\textbf{Proof.} To prove this, first suppose that $x \ge 0$ and $y \ge 0$.
Then $xy \ge 0$.
By definition of absolute value, $|xy| = xy$, $|x| = x$ and $|y|=y$.
Therefore $|xy| = |x| |y|$.
\begin{figure}[h]
\includegraphics[width=1in]{images/optiverse-tiny.jpg}
\caption{This is a 2 inch wide figure.jpg included in this tex.pdf}
\end{figure}
Next suppose that $x \ge 0$ and $y < 0$. Then $xy \le 0$. By definition,
$|xy| = -(xy)$, $|x| = x$ and $|y| = -y$. Since $ -(xy) = x(-y)$, we conclude
that $|xy| = |x| |y|$.
You may need this kind of math for your essay for F3. In general, you'll do
well to just look on the web (google: latex symbols )
For example, a fraction with roots \[ \frac{x}{\sqrt{1+x^2}}. \]
You can try to place a picture without special formatting, but you may
not succeed in getting just what you want.
%\includegraphics{images/ipaint.png}
\includegraphics{optiverse-tiny.jpg}
\end{document}
Note that text written after the \end{document} does not need to be
commented out. It won't be considered by the typesetter anyway.
One way to include images into your .pdf typeset LaTeX files is
illustrated above.
In the preamble (the part after \documentclass and before \begin{document},
you write \usepackage{graphicx}. This package knows what to do when you
use the command \includegraphics{foo.jpg}, where foo.jpg is a .jpg image
you want to include. However, pictures you pick up from somewhere are
rerely of just the right size you want. So, a better way is to use the
figure-environment, which begins with \begin{figure} and ends with
\end{figure}. You can try to persuade TeX to insert the figure right here,
by appending the [h] location marker. And you can resize a figure to
have the desired width by splicing in [width=2in] as above.
Note that various image formats work here, and the figure may be
located elsewhere than in the directory with the .tex file.
Exercise: Move both pictures to the center by placing the \includegraphics
command inside a centering environment. That is, write \begin{center}
before the item you want to center, and then write \end{center}.