0

I have two figures that I want to force to appear on the same page. What is the best way to accomplish this? Here is my MWE:

\documentclass{book}
\usepackage[semibold,tt=false]{libertine}
\usepackage{graphicx}
\usepackage{lipsum}

\begin{document}

\lipsum[1-4]

\begin{figure}
  \centering
  \includegraphics[width=0.9\textwidth]{example-image-a}
  \caption{First figure}\label{fig:first}
\end{figure}

\lipsum[5-8]

\begin{figure}
  \centering
  \includegraphics[width=0.9\textwidth]{example-image-b}
  \caption{Second figure}\label{fig:second}
\end{figure}

\lipsum[9-12]

\end{document}

Over at StackOverflow, someone is suggesting to place both images in the same figure environment, but honestly, that doesn't seem very elegant. So I thought I'd ask the experts here!

1
  • 4
    Nobody prevents you to put multiple \includegraphics and \captions in a single figure environment.
    – campa
    Nov 11 '20 at 16:10

Browse other questions tagged or ask your own question.