I want to add vertical space between two subfigures so that so that the upper figure is aligned with the top of the page and the last line of this figure caption is aligned with the
bottom of the page. My approach is the following one, but without success:
\begin{figure}[p]
%
\centering
\subfloat[]{\includegraphics[width=5cm]{Lenna.png}}\\
\vfill
\subfloat[]{\includegraphics[width=5cm]{Lenna.png}}
%
\caption{Vertical filling space (between the two subfigures) should
be added so that the upper figure is aligned with the top of the
page and the last line of this figure caption is aligned with the
bottom of the page.}
%
\end{figure}
Best Answer
Below I present two possibilities; in the first one, the object is treated as a floating object; in the second one, the object is static.
One option using a
minipage
inside thefigure
environment; theminipage
has fixed height equal to\textheight
; the object is treated as a float:One option using a
minipage
and\captionof
; theminipage
has fixed height equal to\textheight
; the object is static:The
demo
option forgraphicx
simply replaces actual figures with black rectangles; do not use that option in your actual document.