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:

  1. Go back to the previous example. This time, add the options h and t:
    \begin{figure}[ht]
    \centering
    \includegraphics{test}
    \caption{Test figure}
    \end{figure}
  2. Typeset, notice the change in the output.
  3. Change the options into !b:
    \begin{figure}[!b]
    
  4. Typeset, the figure is now forced to float to the bottom. Compare both results:
    Time for action – letting a figure float

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.