2

I used the subcaption package in the past to format two or more images next to each other in a single figure float environment and it worked as expected. Now, I try to use it again but cannot get a placement of the subcaptionbox at the bottom of the first page.

\documentclass{scrreprt}

\usepackage{graphicx}
\usepackage{subcaption}

\usepackage{lipsum}

\listfiles

\begin{document}

% \begin{figure}[b]
%   \centering
%   \includegraphics[width=0.49\linewidth]{example-image-a}
%   \caption{single}\label{fig:plane}
% \end{figure}

\begin{figure}[b]
  \centering
  \subcaptionbox{first\label{fig:first}}
  [0.49\linewidth]{\includegraphics[width=\linewidth]{example-image-a}}
  %
  \subcaptionbox{second\label{fig:sec}}
  [0.49\linewidth]{\includegraphics[width=\linewidth]{example-image-a}}
  %
  \caption{subcaption test}\label{fig:subtest}
\end{figure}

\lipsum[1-6]

\end{document}

Instead of the bottom, the float is shifted to an own [p] as it seems:

enter image description here

With a single image only it works (commented part) or with a [!b] enforcing the position.

How can I get again a placement at the bottom of the first page as in the single image example?

1
  • The culprit here is \bottomfraction which defualts to 0.3, as opposed to \topfraction with 0.7. And no, they don't have to add up to one. Commented yesterday

1 Answer 1

3

Use \begin{figure}[!b] instead of \begin{figure}[b]. The ! symbol tells LaTeX to ignore certain parameters that control how much of the float areas may be occupied.

\documentclass{scrreprt}

\usepackage{graphicx}
\usepackage{subcaption}

\usepackage{lipsum}

\listfiles

\begin{document}

% \begin{figure}[b]
%   \centering
%   \includegraphics[width=0.49\linewidth]{example-image-a}
%   \caption{single}\label{fig:plane}
% \end{figure}

\begin{figure}[!b]
  \centering
  \subcaptionbox{first\label{fig:first}}
  [0.49\linewidth]{\includegraphics[width=\linewidth]{example-image-a}}
  %
  \subcaptionbox{second\label{fig:sec}}
  [0.49\linewidth]{\includegraphics[width=\linewidth]{example-image-a}}
  %
  \caption{subcaption test}\label{fig:subtest}
\end{figure}

\lipsum[1-6]

\end{document}

enter image description here

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.