Figures
Graphics
Figures are denoted by \begin{figure} and \end{figure}.
They are automatically placed to fit the page.
The package graphicx is for including images.
The next code includes the image whose filename is fig1.png or fig1.jpg.
\usepackage{graphicx}
...
\begin{figure}
\centering
\includegraphics[width=0.5\textwidth]{fig1}
\caption{An example of including an image.} % The caption is optional
\end{figure}
For file organization, store images in a subdirectory with the command \graphicspath.
\graphicspath{{figs}}
The package TikZ is for making figures directly in LaTeX. It can draw just about anything.
\begin{center}
\begin{tikzpicture}
\draw (0,0) node[below]{$A$}
-- (3,0) node[below]{$B$}
-- (1.5,4) node[above]{$C$}
-- cycle;
\draw[dashed] (1.5,0) node[below]{$D$} -- (1.5, 4);
\end{tikzpicture}
\end{center}
Tables
Tables are denoted by \begin{table} and \end{table}.
Similarly to figures, they are automatically placed to fit the page.
The command \hline draws a horizontal line.
In a row, each column is separated by an ampersand &.
And, each row is separated by a newline character \\.
Each row must have the same number of columns, and this must match repetitions of c in the tabular environment.
Each vertical line | in c|c|c draws vertical lines between columns.
An entry can be blank.
\begin{table}
\centering
\caption{Example Table}
\begin{tabular}{c|c|c}
Column 1 & Column 2 & Column 3 \\ \hline
A & B & C \\ \hline
D & E & F \\ \hline
G & H & I \\
\end{tabular}
\end{table}