![并排插入多个 TikZ 图像](https://linux22.com/image/439221/%E5%B9%B6%E6%8E%92%E6%8F%92%E5%85%A5%E5%A4%9A%E4%B8%AA%20TikZ%20%E5%9B%BE%E5%83%8F.png)
我正在使用以下代码借用自这里经过一些修改:
\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}
\caption
如下图所示,插入不正确:
如何解决这个问题?
答案1
s的第二个参数minipage
ie5cm
指定了这些框的高度,但高度不会延伸,因此当您的图表的高度大于 5 厘米时,它们会延伸到框外面,并且您会在日志中收到几个“过满 vbox”警告。
如果将该参数留空,则框将具有框中内容的高度:
\begin{minipage}[b][][s]{.45\linewidth}
顺便问一下,s
这里要做什么?我不认为这是有效的选项之一,但也许我错了。