% includes some excerpts from Charles Dickens' Little Dorrit as
% filler text

\documentclass[a4paper]{article}
\usepackage{graphicx}
\usepackage{array,bigstrut}
% bigstrut for excel2latex-exported table

% the settings below make it easier for latex to place figures
\setcounter{topnumber}{2}
\setcounter{bottomnumber}{2}
\setcounter{totalnumber}{3}
\setcounter{dbltopnumber}{2}
\renewcommand{\topfraction}{.9}
\renewcommand{\textfraction}{.1}
\renewcommand{\bottomfraction}{.75}
\renewcommand{\floatpagefraction}{.9}
\renewcommand{\dblfloatpagefraction}{.9}
\renewcommand{\dbltopfraction}{.9}

\begin{document}

\title {Example document}
\author {A.U. Thor}
\maketitle

\tableofcontents

\listoffigures

\listoftables

\section{Non-floating figures}

You can include figures in the running text, as a separate
paragraph, such as:

\noindent
\includegraphics[width=.7\linewidth]{figures/libochart}

This way, \LaTeX{} treats a figure just like any normal
character. You can also include a small graphic or symbol
\includegraphics[height=.6\baselineskip]{figures/blocks} within a
line.

\subsection{Automatic conversion from eps to pdf}

The non-floating picture below is in eps format, which is not
directly supported by pdflatex, but pdflatex converts it to pdf by
invoking an external program\footnote{However, \TeX{} Live can be
  configured to forbid this. In that case, you must convert manually
  beforehand.}.

\includegraphics{figures/diamonds}

\section{Floating figures and tables}

The other examples are included as floats, with a numbered caption:
figures \ref{fig:penguins} and \ref{fig:upsidedown}, and also
table~\ref{tab:table} on page~\pageref{tab:table}.

There are packages to to wrap text around figures. The CTAN
Catalogue recommends wrapfig and floatflt.

The intervening text consists of snippets from Charles Dickens'
novel Little Dorrit.

\begin{figure}[p] % float page
  \centering
  \includegraphics[width=.8\linewidth]{figures/penguins}
  \caption{A figure on a `float page' (`p' placement
    parameter)}
\label{fig:penguins}
\end{figure}

\section{Containing the whole science of government}

The Circumlocution Office was (as everybody knows without being
told) the most important Department under Government. No public
business of any kind could possibly be done at any time without the
acquiescence of the Circumlocution Office. Its finger was in the
largest public pie, and in the smallest public tart. It was equally
impossible to do the plainest right and to undo the plainest wrong
without the express authority of the Circumlocution Office. If
another Gunpowder Plot had been discovered half an hour before the
lighting of the match, nobody would have been justified in saving
the parliament until there had been half a score of boards, half a
bushel of minutes, several sacks of official memoranda, and a
family-vault full of ungrammatical correspondence, on the part of
the Circumlocution Office.

Through this delicate perception, through the tact with which it
invariably seized it, and through the genius with which it always
acted on it, the Circumlocution Office had risen to overtop all the
public departments; and the public condition had risen to be -- what
it was.


\section{The evening of a long day}

\subsection {Peerage}

\begin{figure}
\centering
\includegraphics[height=5cm,angle=180]{figures/bridge}
\caption{An upside-down picture}\label{fig:upsidedown}
\end{figure}

That illustrious man and great national ornament, Mr Merdle,
continued his shining course. It began to be widely understood that
one who had done society the admirable service of making so much
money out of it, could not be suffered to remain a commoner. A
baronetcy was spoken of with confidence; a peerage was frequently
mentioned.

\subsection{A table}

Tables are numbered separately from figures. See table
\ref{tab:table} on page \pageref{tab:table}.

\begin{table} % Placement specifier omitted
  \centering % omit if you want your figure/table left-aligned instead
  \input{some_data.inc}
  \caption{The included file contains a tabular environment
    generated by excel2latex.}\label{tab:table}
\end{table}

\subsection{Closing}

The illustrious visitor then put out his coat-cuff, and for a
moment entombed Mrs Sparkler's hand: wrist, bracelet, and all. Where
his own hand had shrunk to, was not made manifest, but it was as
remote from Mrs Sparkler's sense of touch as if he had been a highly
meritorious Chelsea Veteran or Greenwich Pensioner.

Thoroughly convinced, as he went out of the room, that it was the
longest day that ever did come to an end at last, and that there
never was a woman, not wholly devoid of personal attractions, so
worn out by idiotic and lumpish people, Fanny passed into the
balcony for a breath of air. Waters of vexation filled her eyes; and
they had the effect of making the famous Mr Merdle, in going down
the street, appear to leap, and waltz, and gyrate, as if he were
possessed of several Devils.
\end{document}
