O'Reilly logo

LaTeX Beginners Guide by Stefan Kottwitz

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required