1

I am using the following code borrowed from here with some modifications:

\documentclass[10pt]{article}

\usepackage{graphicx}
\usepackage{tikz}
\usetikzlibrary{positioning}

\begin{document}

\begin{figure}

\begin{minipage}[b][5cm][s]{.45\linewidth}
\begin{tikzpicture}[
  pool/.style={
    circle, draw=blue!50, fill=blue!20, thick,
    inner sep=0pt, minimum size=10mm
  }
]
  \node[pool] (A)              {A};
  \node[pool] (B) [right=of A] {B};
  \draw [<->] (A) -- (B);
\end{tikzpicture}

\vspace*{1cm}

\begin{tikzpicture}[
  pool/.style={
    circle, draw=blue!50, fill=blue!20, thick,
    inner sep=0pt, minimum size=10mm
  }
]
  \node[pool] (A)              {A};
  \node[pool] (B) [right=of A] {B};
  \draw [<->] (A) -- (B);
\end{tikzpicture}

\vspace*{1cm}

\begin{tikzpicture}[
  pool/.style={
    circle, draw=blue!50, fill=blue!20, thick,
    inner sep=0pt, minimum size=10mm
  }
]
  \node[pool] (A)              {A};
  \node[pool] (B) [right=of A] {B};
  \draw [<->] (A) -- (B);
\end{tikzpicture}

\vspace*{1cm}

\begin{tikzpicture}[
  pool/.style={
    circle, draw=blue!50, fill=blue!20, thick,
    inner sep=0pt, minimum size=10mm
  }
]
  \node[pool] (A)              {A};
  \node[pool] (B) [right=of A] {B};
  \draw [<->] (A) -- (B);
\end{tikzpicture}
\end{minipage}
\begin{minipage}[b][5cm][s]{.45\linewidth}

\begin{tikzpicture}[
  pool/.style={
    circle, draw=blue!50, fill=blue!20, thick,
    inner sep=0pt, minimum size=10mm
  }
]
  \node[pool] (A)              {A};
  \node[pool] (B) [right=of A] {B};
  \draw [<->] (A) -- (B);
\end{tikzpicture}

\vspace*{1cm}

\begin{tikzpicture}[
  pool/.style={
    circle, draw=blue!50, fill=blue!20, thick,
    inner sep=0pt, minimum size=10mm
  }
]
  \node[pool] (A)              {A};
  \node[pool] (B) [right=of A] {B};
  \draw [<->] (A) -- (B);
\end{tikzpicture}

\vspace*{1cm}

\begin{tikzpicture}[
  pool/.style={
    circle, draw=blue!50, fill=blue!20, thick,
    inner sep=0pt, minimum size=10mm
  }
]
  \node[pool] (A)              {A};
  \node[pool] (B) [right=of A] {B};
  \draw [<->] (A) -- (B);
\end{tikzpicture}

\vspace*{1cm}

\begin{tikzpicture}[
  pool/.style={
    circle, draw=blue!50, fill=blue!20, thick,
    inner sep=0pt, minimum size=10mm
  }
]
  \node[pool] (A)              {A};
  \node[pool] (B) [right=of A] {B};
  \draw [<->] (A) -- (B);
\end{tikzpicture}
\end{minipage}

\caption{Numerous images.}

\end{figure}

\end{document}

The \caption is not inserted properly as seen in the image below:

enter image description here

How to fix this?

1 Answer 1

2

The second argument to your minipages, i.e. 5cm, specifies the height of those boxes, but the height doesn't stretch, so when your diagrams have a height bigger than 5cm, they extend outside the box, and you get a couple of "overfull vbox"-warnings in the log.

If you leave that argument empty, the box will have the height of the content in the box:

\begin{minipage}[b][][s]{.45\linewidth}

By the way, what is s intended to do here? I didn't think that was one of the valid options, but perhaps I'm mistaken.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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