1

I have two figures, 1 and 2. Figure 1 should be placed on top, so a \begin{figure}[t] is the way to go. In the syntax, figure 2 is loaded just after the first one with a \begin{figure}[h] command, so that both figures are placed just below/above each other. But what I get is that a text line from the previous page is forced in between the images. Also [!h] for the second figure does not help. I am sure this problem was already discussed and solved, thus no MWE here. I could not find the solution yet. Any help?

2
  • 4
    Use just one figure environment for both figures. Jul 29 '15 at 15:58
  • 2
    you can use \begin{figure}[ht] for the second figure.
    – touhami
    Jul 29 '15 at 16:07
1

Here is a solution with floatrow:

\documentclass[a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{lipsum}
\usepackage{graphicx}
\usepackage{etoolbox}
\usepackage{caption, floatrow}
\DeclareFloatVCode{interrowsep}{\vskip 5ex}
\DeclareFloatVCode{bottomrowsep}{}
\captionsetup{labelfont = sc}
\begin{document}

\lipsum[2]
\begin{figure}[!htbp]
  \floatsetup{justification =centering, postcode=interrowsep}
  %
  \begin{floatrow}[1]
    \ffigbox[\FBwidth]
    {\includegraphics[scale = 0.8]{sendak}}
    {\caption{Where Wild Things are}
      \label{fig:Maurice}}
  \end{floatrow}
  %
  \begin{floatrow}[1]
    \ffigbox[\FBwidth]
    {\includegraphics[scale = 0.5]{AliceSteadman}}
    {\caption{Ralph}
      \label{fig:Wabbit}}
  \end{floatrow}\vskip -6ex
\end{figure}%
\lipsum[4]

\end{document} 

enter image description here

Not the answer you're looking for? Browse other questions tagged or ask your own question.