Better appearance of the document. In most cases, a figure put as a float will have its location determined depending on certain criteria defined by float
package. Such advantage is mostly noticeable when you have a lot of large tables, figures, and equations in close proximity to each other - a situation in which a lot of empty spaces in pages can show up in the output. One other disturbing case is when you have a large figure with only two or three lines under it. For those kinds of figures, it is almost always better to have them alone in a page.
One of the important terms in floating is "float page" which stands for a page that are reserved for floats. These kinds of pages are automatically generated depending on the contents of your documents and some other options that you can fine-tune in your preamble to get the best result for the type of content and the document class you have. These options are:
\renewcommand{\floatpagefraction}{0.5}
: minimum fraction of float page that must be occupied by floats, therefore not leaving blank space (default: 0.5)
\renewcommand{\dblfloatpagefraction}{0.5}
: minimum fraction of double column float on two column page that must be occupied by floats, therefore not leaving blank space (default: 0.5). Note that increasing this value too much makes it difficult to produce float pages in the first place.
\renewcommand{\textfraction}{0.2}
: minimum fraction of normal (nonfloat) page that must be occupied by text (default: 0.2)
\renewcommand{\topfraction}{0.9}
: maximum fraction of the top of a page that can be occupied by floats (default: 0.7)
\renewcommand{\dbltopfraction}{0.5}
: maximum fraction of the top of double-column page that can be occupied by floats (default: 0.7)
\renewcommand{\bottomfraction}{0.8}
: maximum fraction of the bottom of a page that can be occupied by floats (default: 0.3). Note that there is no such command as \dblbottomfraction
You still can force the figure to be in certain place like in using H
, but a word of warning: this may sometimes lead to erroneous results where the figure does not appear in the first place!
Another important feature of floating is that you do not only have floated figures, but floated figures and floated tables, which gives a second degree of flexibility in enhancing the document appearance, i.e., it could be better to put figures and tables in float pages rather than only figures.
Some people argue that having the text wrapping around a figure is more visually pleasing, but that depends on the discipline and the kind of document. For instance, in applied sciences and engineering theses and publications, this is not the case.
\captionof
. But mostly, it is about getting good page breaks.