\documentclass[11pt]{article} \usepackage[mtbold]{mathtime} \usepackage{graphics} \input{page} \input{thcmac2e} \begin{document} \title{Figure Placement} \author{} \date{} \maketitle \noindent There are a few guidelines for figure placement that you should follow. \subheading{Figures should float} \begin{quote} Put your figures in a figure environment. Do not just lay them into the document in the midst of the text. \end{quote} Although putting your figures in the midst of the text might seem like an ideal place, omitting the figure environment means that you cannot insert a caption, nor can you refer to the figure by number. So use the figure environment. ``Ah-ha,'' you say, ``but the figure environment allows me to use the \verb`[h]` option to place the figure right where I want it. I get the best of both worlds: captions and references, plus placement where I want it.'' \begin{figure}[h] \includegraphics{Dijkstra-proof.eps} \figcaption{So there!} \label{fig:here} \end{figure} \noindent You see, I can put Figure~\ref{fig:here} right here! \medskip One problem with using the \verb`[h]` option is that if your figure doesn't fit on the current page, it will float to the top of the next page anyway. \begin{figure}[h] \resizebox{!}{3in}{\includegraphics{Dijkstra-proof.eps}} \figcaption{So there!} \label{fig:big} \end{figure} \noindent So even though you think you put it ``here,'' it isn't here. Here's some text that shows what happens. Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah. Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah. Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah. Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah. Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah. \bigskip The other problem with using \verb`[h]` is that it can be hard to determine where the division between the text and the figure is. So let figures float. \subheading{The default placement is usually pretty good} It is rare that I have to override where \LaTeX{} places a figure. Of course, I have redefined several parameters in \~{ }thc/mytex/page.tex so that \LaTeX{} is more willing to put figures at the top of a page. In the entire book, which has 237 figures, we overrode the default placement twice. I just checked, and one of those was unnecessary. The place where we needed to override was Figure~19.6 on page~467, where I used \verb`[t]` to override \LaTeX{}'s desire to have that figure be on its own page. \subheading{Putting figures together} Sometimes you have multiple figures that you really want to appear consecutively. If you put them in separate figure environments, they might not appear together. \begin{figure} \scalebox{.8}{\includegraphics{flow-network.eps}} \figcaption{\figpart{a} A flow network $G = (V,E)$ for the Lucky Puck Company's trucking problem. The Vancouver factory is the source $s$, and the Winnipeg warehouse is the sink $t$. Pucks are shipped through intermediate cities, but only $c(u,v)$ crates per day can go from city $u$ to city $v$. Each edge is labeled with its capacity. \figpart{b} A flow $f$ in $G$ with value $\abs{f} = 19$. Only positive flows are shown. If $f(u,v) > 0$, edge $(u,v)$ is labeled by $f(u,v)/c(u,v)$. (The slash notation is used merely to separate the flow and capacity; it does not indicate division.) If $f(u,v) \leq 0$, edge $(u,v)$ is labeled only by its capacity.} \label{fig:flow-network} \vspace*{6ex} \scalebox{.8}{\includegraphics{residual-network.eps}} \figcaption{\figpart{a} The flow network $G$ and flow $f$ of Figure~\ref{fig:flow-network}(b). \figpart{b} The residual network $G_{f}$ with augmenting path $p$ shaded; its residual capacity is $c_{f}(p) = c_{f}(v_2,v_3) = 4$. \figpart{c} The flow in~$G$ that results from augmenting along path $p$ by its residual capacity~$4$. \figpart{d} The residual network induced by the flow in~(c).} \label{fig:residual-network} \end{figure} No problem. Put them in one figure environment. You might need to put some vspace between them. \subheading{Where to put figures} \LaTeX{}'s algorithm for determining where to put figures is explained on pages 197--198 of Lamport. The explanation is more clear than the U.S. tax code. Where a figure \emph{should} go is either on the first page that mentions the figure, or on the next available page afterward. There is an exception, however. If the figure is first mentioned near the beginning of a section, and its placement at the top of the page beginning the section would cause the figure to appear in the previous section, then let the figure appear a page later. Here's what \emph{I} do. I put the figure environment right after the first paragraph that mentions the figure. 90\% of the time, that gives me exactly the placement I want. On occasion, the figure will appear on the next page, even though there is room on the page that first mentions the figure. That's because the mention is somewhere in the middle of a paragraph and by the time you get to the end of the paragraph, there's not enough room for the figure. In these cases, I move the figure environment just before the paragraph that first mentions the figure. If that puts the figure on the same page as the first mention, mazel tov. If not, then I don't worry about it. \subheading{Pet peeve} This pet peeve isn't about figure placement itself. It's about placement of the \emph{mention} of a figure. Here's what I despite with every ounce of hemoglobin that I can muster: \begin{quote} The [algorithm, procedure, method, system] works as follows. [Looooooong explanation.] Figure~4 shows an example. \end{quote} Thanks a lot! After I've read your looooooong explanation, \emph{then} you tell me there was a figure that would have helped me understand what the heck you were trying to tell me? Do your reader the courtesy of mentioning the figure \emph{before} the long explanation: \begin{quote} Figure~4 shows how the [algorithm, procedure, method, system] works. [Looooooong explanation.] \end{quote} \end{document}