Time for action – letting a figure float
Both the figure
and the table
environment take an optional argument affecting the final placement of the figure or the table. We shall test the effect in our graphics example:
- Go back to the previous example. This time, add the options
h
andt
:\begin{figure}[ht] \centering \includegraphics{test} \caption{Test figure} \end{figure}
- Typeset, notice the change in the output.
- Change the options into
!b
:\begin{figure}[!b]
- Typeset, the figure is now forced to float to the bottom. Compare both results:
What just happened?
Just by adding some characters standing for placement options, we could force the figure to appear ...
Get LaTeX Beginners Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.