0

My subfigure consists of 5 single images, 2 in each line. Before and after comes text. When I try to split it, the first two images end up at the bottom of the page instead of directly under the text (see image). Is there a way that there is not so much space without me having to make the images smaller?

\begin{figure}[!b]
     \centering
     \begin{subfigure}{0.3\textwidth}
         \centering
         \includegraphics[scale=0.7]{figures/ErsterSchritt_ml.png}
         \caption{Erster Schritt nach \Gls{perturbation}}
         \label{fig:ersterSchrittml}
     \end{subfigure}
     \hspace{3cm}
     \begin{subfigure}{0.3\textwidth}
         \centering
         \includegraphics[scale=0.7]{figures/ZweiterSchritt_ml.png}
         \caption{Zweiter Schritt nach \Gls{perturbation}}
         \label{fig:zweiterSchrittml}
     \end{subfigure}
     %\\
     \end{figure}%
  \begin{figure}[ht]
  \ContinuedFloat
     \centering
     \begin{subfigure}{0.3\textwidth}
         \centering
         \includegraphics[scale=0.7]{figures/DritterSchritt_ml.png}
         \caption{Zweiter Schritt nach \Gls{perturbation}}
         \label{fig:dritterSchrittml}
     \end{subfigure}
     \hspace{3cm}
     \begin{subfigure}{0.3\textwidth}
         \centering
         \includegraphics[scale=0.7]{figures/VierterSchritt_ml.png}
         \caption{Vierter Schritt nach \Gls{perturbation}}
         \label{fig:vierterSchrittml}
     \end{subfigure}
     \hfill
     %\\
     \end{figure}%
  \begin{figure}[ht]
  \ContinuedFloat
  \centering
     \begin{subfigure}{0.3\textwidth}
         \centering
         \includegraphics[scale=0.7]{figures/FuenfterSchritt_ml.png}
         \caption{Fünfter Schritt nach \Gls{perturbation}}
         \label{fig:fuenfterSchrittml}
     \end{subfigure}  
        \caption{Mittelwerte der \Glsxtrshort{mos}-\glsxtrshort{ml} [mm] der Assessments. Es wird unterschieden nach Richtung der \Gls{perturbation} und Zeitpunkt des Assessments. Untersucht wurden die ersten fünf Schritte nach Auftreten einer \Gls{perturbation}}
        \label{fig:fuenfSchritteml}
\end{figure}

\newpage Bei Untersuchung des ersten Schrittes nach Auftreten einer \Gls{perturbation} zeigt sich, dass die \Glsxtrshort{mos}-\glsxtrshort{ap} bei \Gls{perturbation}en nach vorne beim ersten Laufband-Assessment zum Zeitpunkt T0 eine größere Streuung hat, als zu allen anderen Zeitpunkten und Richtungen (siehe Abbildung \ref{fig:assessments_ersterSchrittAp}). Die Werte während des ersten Laufband-Assessments T0 haben eine größere Streuung als die des zweiten Laufband-Assessments T0 und des Laufband-Assessments T14. \

Image

  • Welcome. // Unfortunately nobody can copy and compile your code: please try yourself and add, what's missing. Thank you – MS-SPO Aug 18 '23 at 13:11
  • By starting on the bottom [b!], you avoid getting text between the figures. You could use a smaller font in the captions. \footnotesize is popular. I would use \hfil or \hfill instead of \hspace. – John Kormylo Aug 18 '23 at 13:45
  • See, if https://tex.stackexchange.com/questions/278727/split-subfigures-over-multiple-pages/278748#278748 can elp you. To my opinion your question is duplicate to question in above link. – Zarko Aug 18 '23 at 16:51

1 Answers1

0

Since you had some free space in the last row, I moved some of the subcaptions (text) there. Also, you need to add [b!] to every figure which might wind up on the first page, and the [h] is redundant since every float is either at the bottom or top of a page.

The \makebox keeps the spacing constant across the rows, but may cause overlapping. Then again, 0.3\textwidth is proabably too small anyway. You might wan to use \subfloat instead, or \includegraphics[width=\linewidth].

\documentclass{article}
\usepackage{subcaption}
\usepackage[draft]{graphicx}
\usepackage{glossaries}

\usepackage{lipsum}

\begin{document}

\lipsum[1-3]

\begin{figure}[!b] \centering \begin{subfigure}{0.3\textwidth} \centering \includegraphics[scale=0.7]{figures/ErsterSchritt_ml.png} \caption{}\label{fig:ersterSchrittml} \end{subfigure}% \hfil \begin{subfigure}{0.3\textwidth} \centering \includegraphics[scale=0.7]{figures/ZweiterSchritt_ml.png} \caption{}\label{fig:zweiterSchrittml} \end{subfigure} \end{figure}% \begin{figure}[tb!] \ContinuedFloat \centering \begin{subfigure}{0.3\textwidth} \centering \includegraphics[scale=0.7]{figures/DritterSchritt_ml.png} \caption{}\label{fig:dritterSchrittml} \end{subfigure}% \hfil \begin{subfigure}{0.3\textwidth} \centering \includegraphics[scale=0.7]{figures/VierterSchritt_ml.png} \caption{} \label{fig:vierterSchrittml} \end{subfigure} \end{figure}% \begin{figure}[t]% if they all fit on ome page, you wouldn't be doing this \ContinuedFloat \centering \begin{subfigure}[c]{0.3\textwidth} \centering \includegraphics[scale=0.7]{figures/FuenfterSchritt_ml.png} \caption{} \label{fig:fuenfterSchrittml} \end{subfigure}% \hfil \makebox[0.3\textwidth]{\begin{tabular}[c]{@{}cl@{}} (\subref{fig:ersterSchrittml}) & Erster Schritt nach \Gls{perturbation} \ (\subref{fig:zweiterSchrittml}) & Zweiter Schritt nach \Gls{perturbation} \ (\subref{fig:dritterSchrittml}) & Dreiter Schritt nach \Gls{perturbation} \ (\subref{fig:zweiterSchrittml}) & Vierter Schritt nach \Gls{perturbation} \ (\subref{fig:fuenfterSchrittml}) & Fünfter Schritt nach \Gls{perturbation} \end{tabular}}

 \caption{Mittelwerte der \Glsxtrshort{mos}-\Glsxtrshort{ml} [mm] der Assessments. Es wird unterschieden nach Richtung der
    \Gls{perturbation} und Zeitpunkt des Assessments. Untersucht wurden die ersten fünf Schritte nach Auftreten einer
    \Gls{perturbation}}
    \label{fig:fuenfSchritteml}

\end{figure}

\lipsum[4-5] \end{document}


You can save even more space by putting the subcaptions beside the images.

\documentclass{article}
\usepackage{subcaption}
\usepackage[draft]{graphicx}
\usepackage{glossaries}

\usepackage{lipsum} \usepackage{duckuments}

\begin{document}

\lipsum[1-2]

\begin{figure}[!b] \centering \includegraphics[width=0.3\textwidth]{figures/ErsterSchritt_ml.png}% \begin{subfigure}{2em} \caption{}\label{fig:ersterSchrittml} \end{subfigure}% \hfil \includegraphics[width=0.3\textwidth]{figures/ZweiterSchritt_ml.png}% \begin{subfigure}{2em} \caption{}\label{fig:zweiterSchrittml} \end{subfigure} \end{figure}% \begin{figure}[tb!] \ContinuedFloat \centering \includegraphics[width=0.3\textwidth]{figures/DritterSchritt_ml.png}% \begin{subfigure}{2em} \caption{}\label{fig:dritterSchrittml} \end{subfigure}% \hfil \includegraphics[width=0.3\textwidth]{figures/VierterSchritt_ml.png}% \begin{subfigure}{2em} \caption{}\label{fig:vierterSchrittml} \end{subfigure} \end{figure}% \begin{figure}[t]% if they all fit on ome page, you wouldn't be doing this \ContinuedFloat \centering \sbox9{\includegraphics[width=0.3\textwidth]{figures/FuenfterSchritt_ml.png}}% measure height \usebox9 \begin{subfigure}{2em} \caption{}\label{fig:fuenfterSchrittml} \end{subfigure}% \hfil \raisebox{\dimexpr 0.5\ht9 - 0.5\height + 0.5\depth}{% center align with image \makebox[\dimexpr 0.3\textwidth+2em]{\begin{tabular}[b]{@{}cl@{}} (\subref{fig:ersterSchrittml}) & Erster Schritt nach \Gls{perturbation} \ (\subref{fig:zweiterSchrittml}) & Zweiter Schritt nach \Gls{perturbation} \ (\subref{fig:dritterSchrittml}) & Dritter Schritt nach \Gls{perturbation} \ (\subref{fig:zweiterSchrittml}) & Vierter Schritt nach \Gls{perturbation} \ (\subref{fig:fuenfterSchrittml}) & Fünfter Schritt nach \Gls{perturbation} \end{tabular}}}

 \caption{Mittelwerte der \Glsxtrshort{mos}-\Glsxtrshort{ml} [mm] der Assessments. Es wird unterschieden nach Richtung der
    \Gls{perturbation} und Zeitpunkt des Assessments. Untersucht wurden die ersten fünf Schritte nach Auftreten einer
    \Gls{perturbation}}
    \label{fig:fuenfSchritteml}

\end{figure}

\lipsum[3-5] \end{document}

John Kormylo
  • 79,712
  • 3
  • 50
  • 120