I have 2 subfigures vertically arranged using the subcaption package. I can set the vertical space between the 2 to something specific (using \bigskip
or \vspace
), but I would like to put as much space as possible between the 2 instead, so that the first subfigure is at the top of the page, and the second one at the bottom (with the caption for the whole figure beneath it) – something like \vfill
.
Minimal working example:
\documentclass[10pt,a4paper]{article}
\usepackage{graphicx}
\usepackage{subcaption}
\begin{document}
\begin{figure}
\begin{subfigure}{\textwidth}
\centering \rule{4cm}{4cm} % 1st subfigure: \includegraphics{fig}...
\end{subfigure}
\par\bigskip % maximise vertical space here instead
\begin{subfigure}{\textwidth}
\centering \rule{4cm}{4cm} % 2nd subfigure: \includegraphics{fig}...
\end{subfigure}
\caption{Some caption}
\end{figure}
\end{document}
Best Answer
I put a
\vspace*{...}
inside thesubfigure
block, just before\end{subfigure}
. It applied the specified amount of spacing between my three subfigures. I did not try it using\fill
, but I expect it would have a similar result. I've included a vague snippet of my code below. Hooray for simplicity!