LaTeX code formatting regarding placement of floats and where best to place figures with respect to main body text references

This is probably no more than an expanded comment, but it does benefit from experience in juggling floats in TUGboat for (my idea of) best effect. Details of the rules of float placement are given in this question: How to influence the position of float environments like figure and table in LaTeX?, as already suggested in a comment; in case what is written here isn't clear, refer to that, or to the TUGboat article cited therein. This discussion is mostly applicable to single-column pages; full-width floats on multi-column pages have special requirements and depend on whether the columns are defined by a document-class option or the multicol package.

When writing the initial draft, place the floats close to their references. A good starting location is just after the reference. It's best to input the instructions for a float while in vertical mode, i.e., at a paragraph break, with a blank line before and another one after the float. If placement is important for a particular figure, add options as appropriate; [tbp] is the default, and if no explicit options are given, that is how LaTeX will apply them. (If a float is large, and p is omitted from options that are specified, this will result in the large float and all following floats of the same class being deferred until the end of the document.)

Sometimes it's essential that a figure or table appear exactly in a particular place. If this inclusion is small, and there is no question that it won't fit where it is wanted, you might try inserting it in-line using \captionof to provide the caption (requires the caption package). \includegraphics can be inserted as an unnumbered display within \[ ... \], to provide some vertical space above and below. (I don't remember whether \captionof will work within the display, but many small graphics don't require a caption.) \begin{center} ... \end{center} is the equivalent of a display for a table regarding surrounding space.

After the text is essentially complete, compile the document and review the location of the floats. If a float appears on the page following its reference, but there's room on the reference page after the reference (perhaps the reference is at the beginning of a very long paragraph), that float can be moved from after to before the paragraph, with the option [t] or [b] as most appropriate. (Notice that I don't recommend the use of [h] or [H].) If it's really important to squeeze a float onto a page and the available space is only a line short, it may be possible to gain a line with \enlargethispage(1\baselineskip} on the current page or (often preferable) a page or two earlier.

Remember that every adjustment may affect anything that comes later. For that reason, make adjustments one at a time, starting from the beginning; if the document is a book, separate chapters can be be considered independent for this purpose.

Edit: I have to eat my words regarding the use of [h]. I have just received a submission from a regular TUGboat columnist who makes good use of this option. A figure is placed in the middle of a column, just below where it is mentioned but without a formal reference, and indeed between paragraphs. In fact, this is the only way to ensure that a floating object can be placed explicitly in the middle of a page or column. But, again, this is a declaration that is best left for final fine tuning.


No, the float, well, floats. You tell where you want it with [htbp] (prefer here, top of a page, bottom of a page, extra page; it doesn't force placement). Most of the time, LaTeX does a good job here. You have some control over what you want by placing the float next to the reference in the code (don't worry, it won't e.g. interrupt a paragraph unless there is no better placement). Packages like float allow to force placement, but I'd use that as a last resort once the rest of the document is stable. Forcing a float here might look very ugly if the "here" changes because you deleted a paragraph...