Skip to main content
If you need to control LaTeX figure positioning, you need to understand floats first. The placement options [h], [t], [b], [p], and [H] do not mean “put the image exactly here” in the way many beginners expect. This guide explains what each option actually does, why figures move, and how to get cleaner layouts without fighting the compiler.
Key concept: Figures are “floats” in LaTeX - they can move to optimize page layout. Understanding this behavior is essential for controlling positioning.

Understanding Floats

What Are Floats?

Floats are elements (figures, tables) that LaTeX can move to avoid awkward page breaks and maintain good typography. LaTeX uses sophisticated algorithms to determine optimal placement.
float-basics.tex
Ready to use this syntax? Continue in the browser editor when you want to adapt the example in a real project.Open LaTeX Cloud Studio

Why Floats Move

LaTeX moves floats to:
  • Avoid large white spaces
  • Prevent awkward page breaks
  • Keep related content together
  • Maintain consistent page density

Positioning Options

Basic Float Specifiers

positioning-options.tex

Positioning Priority

Forcing Exact Placement

force-placement.tex
Caution: Using [H] can create large white spaces and poor page breaks. Use sparingly.

Advanced Positioning Control

Float Parameters

float-parameters.tex

Clearing Floats

clearing-floats.tex

Multiple Figures Layout

Side-by-Side Positioning

side-by-side-advanced.tex

Custom Arrangements

custom-arrangements.tex

Page-Wide Figures

Full Width in Two-Column

full-width.tex

Landscape Figures

landscape-figures.tex

Precise Positioning

Absolute Positioning

absolute-positioning.tex

Margin Figures

margin-figures.tex

Float Management Strategies

Document-Wide Settings

global-settings.tex

Managing Many Figures

many-figures.tex

Debugging Float Issues

Common Problems and Solutions

float-debugging.tex

How to Force a Figure to Stay in Its Own Section

A float can drift several pages past the point where it was declared, which often means it appears under the wrong heading. This is normal float behaviour, not a bug: LaTeX moves floats to wherever they fit. The reliable fix is a float barrier. \usepackage{placeins} provides \FloatBarrier, which forces every pending float to be placed before the document continues. Put it at the end of a section, and no figure can escape into the next one. \usepackage[section]{placeins} does this automatically at every \section, which is usually what people want when they ask this question. \clearpage also flushes floats, but it starts a new page, so it is a heavier tool. Reach for \FloatBarrier first. Forcing exact placement with [H] from float is a different thing and a worse default — it disables floating entirely and tends to leave large gaps.

Best Practices

Float positioning guidelines:
  1. Default first: Start with [htbp] for most figures
  2. Avoid [h] only: Too restrictive, add alternatives
  3. Group related: Put related figures together
  4. Clear periodically: Use \clearpage at chapter/section ends
  5. Size appropriately: Oversized figures cause problems
  6. Think document-wide: Consider overall flow, not just local placement
  7. Use packages wisely: float, placeins, afterpage for control

Quick Reference

Placement Options

example.tex

Key Commands


Next: Learn about Creating tables to present structured data effectively. Tables use similar positioning concepts to figures. You might also be interested in Cross-referencing to link to your figures and tables. To test float placement without a local TeX installation, see the online LaTeX editor.