% -*- Mode: LaTeX -*- \documentclass{article} \begin{document} The conditional statement is illustrated in Figure~\ref{fig:conditional}. \begin{figure} \tt \small \begin{verbatim} if (x>0) then return x else return -x; \end{verbatim} \caption{Example of a conditional statement.} \label{fig:conditional} \end{figure} \LaTeX\ will move the figure to a point not earlier than the page on which the text preceeding the figure lies. Note that a backslash is required after the macro call to \verb+\LaTeX+ in the preceeding sentence. \end{document}