0

Well, I am very much new in Latex and having an issue. I have spent many hours to solve it but unfortunately, it is still not working. I have three figures to put in a subfigure, and there are big as well. So I put them top of each other not side by side. Also, one figure has to go the 2nd page as they are big. So, I used \continuedfloat. Which is working but the problem is that as I have some text after them, the text comes to the first-page immediately after two figures and from the 2nd page again the figure started. But I don't want the text to come between the three figures. How can I do that? Please help.

\begin{figure}[t!]
\centering
\begin{subfigure}{0.7\textwidth}
  \centering
  \includegraphics[width=0.9\linewidth,height=0.8\linewidth]{figures/num1.pdf}
  \caption{one}
  \label{fig:s1}
\end{subfigure}\\
\begin{subfigure}{0.7\textwidth}
  \centering
  \includegraphics[width=0.9\linewidth,height=0.8\linewidth]{figures/num2.pdf}
  \caption{two}
  \label{fig:s2}
\end{subfigure}
\end{figure}
\begin{figure}[t!]
\ContinuedFloat
\centering
\begin{subfigure}{0.7\textwidth}
  \centering
  \includegraphics[width=0.9\linewidth,height=0.8\linewidth]{figures/num3.pdf}
  \caption{three}
  \label{fig:s1}
\end{subfigure}
\caption{The figure}
\label{eyefig1}
\end{figure}

enter image description here

Vincent
  • 20,157
Taylor
  • 1
  • Welcome to tex.sx. If it's so important that no text come on the (first) page with two figures, I would add some explicit space to the bottom of each, just enough to avoid the text. Probably, \vspace{3\baselineskip} would do the job. (And the page should look a bit nicer with more space between the figures.) – barbara beeton Feb 22 '20 at 02:06
  • Thank you so much for your reply. Yes, it did work but as there is the spacing between figures. Is it ok for a report writing point of view? I have another issue, perhaps I can add this here. – Taylor Feb 22 '20 at 04:59
  • 1
    Can't you make the first float a page float? – Ulrike Fischer Feb 22 '20 at 09:11
  • If the spacing between the two figures looks too big, then less space could be added to the first, and more to the second. It's also worth trying @UlrikeFischer's suggestion; floats of the same class should be kept i order, so that should only delay the appearance of the first for one additional page. – barbara beeton Feb 22 '20 at 14:35
  • See https://tex.stackexchange.com/questions/278727/split-subfigures-over-multiple-pages/278748#278748. Use figure specifiers as are used in my answer. – Zarko Feb 22 '20 at 16:23

1 Answers1

1

This approach will allow the first figure to start on the bottom of a page as well as the top.

BTW, [!] doesn't do what you think it does. Most of the time, it has no effect whatsoever.

\documentclass{article}
\usepackage{graphicx}
\usepackage{subcaption}
\usepackage{lipsum}% MWE only

\def\bottomfraction{0.7}

\begin{document}
\lipsum[1]

\begin{figure}[bp]
\centering
\begin{subfigure}{0.7\textwidth}
  \centering
  \includegraphics[width=0.9\linewidth,height=0.8\linewidth]{example-image-a}
  \caption{one}
  \label{fig:s1}
\end{subfigure}
\end{figure}
\begin{figure}[p]
\ContinuedFloat
\centering
\begin{subfigure}{0.7\textwidth}
  \centering
  \includegraphics[width=0.9\linewidth,height=0.8\linewidth]{example-image-b}
  \caption{two}
  \label{fig:s2}
\end{subfigure}
\end{figure}
\begin{figure}[tp]
\ContinuedFloat
\centering
\begin{subfigure}{0.7\textwidth}
  \centering
  \includegraphics[width=0.9\linewidth,height=0.8\linewidth]{example-image-c}
  \caption{three}
  \label{fig:s1}
\end{subfigure}
\caption{The figure}
\label{eyefig1}
\end{figure}

\lipsum[2-8]
\end{document}
John Kormylo
  • 79,712
  • 3
  • 50
  • 120