[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
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
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.
