7 Floating material

On packages  

The LaTeX kernel is rather limited: to get around that we load packages:


\usepackage[options]{package}
  

or


\usepackage{package1,package2,…}
  

We have already seen the lipsum package!

Documentation for packages is available in exactly the same way as for classes.

Including external images  

Graphics can also be ‘drawn’ in LaTeX using the TikZ package: a course in itself!

Floating figures  

A floating figure


\begin{figure}[htbp]
  \centering
  \includegraphics{myimage}
  \caption{A Sample Figure}
  \label{fig:sample}
\end{figure}

…needs a cross-reference


as is show in Figure~\ref{fig:sample}

Tables  

Tables  

A simple table


\begin{table}
  \centering
  \caption{A caption}
  \label{tab:example}
  \begin{tabular} {lcr}
   \toprule
      Heading &  Another one &  A third \\
    \midrule
      a &  b &  c \\
      d &  e &  f \\
      \multicolumn{3}{c}{Wide text}  \\
    \bottomrule
  \end{tabular}
\end{table}