Graphics, Figures & TablesSplitting subfigures/minipage between two pages

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
lukaszskowron96
Posts: 36
Joined: Tue Oct 09, 2018 1:01 pm

Splitting subfigures/minipage between two pages

Post by lukaszskowron96 »

Hi. So I have this situation as you can see on the picture.
I want to have row of pictures placed on the end of one page and the second row the beginning of the next page. Is there a way to do that?
Here's the code that generates the pictures.

Code: Select all

\begin{figure}[!ht]
\begin{minipage}[b]{0.5\linewidth}
\includegraphics[width=1\textwidth]{StripFootingOxLim6}
\subcaption{Fifth refinement, elements = 13809, \(\frac{kB}{s_{um}} = 0\)}
\end{minipage}
\begin{minipage}[b]{0.5\linewidth}
\includegraphics[width=1\textwidth]{StripFootingOxLim_k=1kPa}
\subcaption{Fifth refinement, elements = 13602, \(\frac{kB}{s_{um}} = 1\)}
\end{minipage}
\begin{minipage}[b]{0.5\linewidth}
\includegraphics[width=1\textwidth]{StripFootingOxLim_k=3kPa}
\subcaption{Fifth refinement, elements = 11344, \(\frac{kB}{s_{um}} = 3\)}
\end{minipage}
\begin{minipage}[b]{0.5\linewidth}
\includegraphics[width=1\textwidth]{StripFootingOxLim_k=5kPa}
\subcaption{Fifth refinement, elements = 10820, \(\frac{kB}{s_{um}} = 5\)}
\end{minipage}
\caption{Mesh refinements for soil with a strip footing on top for different values of\(\frac{kB}{s_{um}}\)}
\end{figure}
I know the two pictures might not fit on the end of that page, but if there is a way to achieve what I want, I cut away some stuff so they fit.
latexforumsplittingtheimage.png
latexforumsplittingtheimage.png (60.8 KiB) Viewed 8752 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

lukaszskowron96
Posts: 36
Joined: Tue Oct 09, 2018 1:01 pm

Splitting subfigures/minipage between two pages

Post by lukaszskowron96 »

Ok, I solved it. The code below solves the issue.

Code: Select all

\begin{figure}[b]
\begin{minipage}[b]{0.5\linewidth}
\includegraphics[width=1\textwidth]{StripFootingOxLim6}
\subcaption{Fifth refinement, elements = 13809, \(\frac{kB}{s_{um}} = 0\)}
\end{minipage}
\begin{minipage}[b]{0.5\linewidth}
\includegraphics[width=1\textwidth]{StripFootingOxLim_k=1kPa}
\subcaption{Fifth refinement, elements = 13602, \(\frac{kB}{s_{um}} = 1\)}
\end{minipage}
\end{figure}
\newpage
\begin{figure}[!ht]\ContinuedFloat
\begin{minipage}[b]{0.5\linewidth}
\includegraphics[width=1\textwidth]{StripFootingOxLim_k=3kPa}
\subcaption{Fifth refinement, elements = 11344, \(\frac{kB}{s_{um}} = 3\)}
\end{minipage}
\begin{minipage}[b]{0.5\linewidth}
\includegraphics[width=1\textwidth]{StripFootingOxLim_k=5kPa}
\subcaption{Fifth refinement, elements = 10820, \(\frac{kB}{s_{um}} = 5\)}
\end{minipage}
\caption{Mesh refinements for soil with a strip footing on top for different values of\(\frac{kB}{s_{um}}\)}
\end{figure}
Post Reply