I want to control the placement of figures. The paper that I am currently writing contains a lot of figures, resulting in some figures ending up in the bibliography section. Therefore I want to manually control their placement. I know options like [t]
and [h]
will help, but I am unable to find a good tutorial.
Floats – How to Use Placement Options [t], [h] with Figures in LaTeX
floatspositioning
Best Answer
The document "Using Imported Graphics in LaTeX and pdfLaTeX" contains a section about float placement and how to use those options, it's 17.2 Figure Placement.
It's available for download on CTAN in English and French.
In short, the placement options means allowing placement at certain locations:
h
means here: Place the figure in the text where the figure environment is written, if there is enough room left on the paget
means top: Place it at the top of a page.b
means bottom: Place it at the bottom of a page.p
means page: Place it on a page containing only floats, such as figures and tables.!
allows to ignore certain parameters of LaTeX for float placement, for example:\topfraction
: maximal portion of a page (or column resp., here and below), which is allowed to be used by floats at its top, default 0.7\bottomfraction
: maximal portion of a page, which is allowed to be used by floats at its bottom, default value 0.3\textfraction
: minimal portion of a page, which would be used by body text, default value 0.2\floatpagefraction
: minimal portion of a float page, which has to be filled by floats, default value 0.2. This avoids too much white space on float pages.topnumber
: maximal number of floats allowed at the top of a page, default 2bottomnumber
: maximal number of floats allowed at the bottom of a page, default 1totalnumber
: maximal number of floats allowed at whole page, default 3This means, if you add
!
, the float will be placed if it fits onto the current page and if there aren't further waiting float objects of the same type, ignoring predefined propotions of text and floats as above. Such floats are also called bang floats.Fractions can be changed by
\renewcommand
, numbers are counters which can be changed by\setcounter
, further there are lenghts for spacing before, after, and between floats. This gives an impression how LaTeX automatically takes care of sensible figure placement, which you could adjust yourself - or override by!
if meaningful.These options can be combined, such as
[!htbp]
. Their order doesn't matter, LaTeX itself attempts using allowed places in orderh
,t
,b
,p
, even if[pbth]
was used.You should even consider combining as many options as sensible. If a figure cannot be placed, it blocks subsequent figures. This can be a reason why figures end up very late, as you noticed. Specifically, ensure that the figures are not too big to fit into the margins.