我想插入 24 个数字,每两个并排。我正在这样做,\minipage
但我对结果并不满意,因为虽然数字看起来很小,但一页中只能有 4 个,这占用了很多空间。我对每两个数字重复这一部分,我得到了输出,但效果不太好,我想减少它们之间的水平和垂直空间。我将不胜感激任何建议。
\documentclass[a4paper,12pt]{report}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{subcaption}
\usepackage{floats}
\begin{document}
\begin{figure}[h!]
\centering
\begin{minipage}{.45\textwidth}
\captionsetup{type=figure}
\centering
\includegraphics[width=\linewidth]{figures/22.pdf}
\end{minipage}
\begin{minipage}{.45\textwidth}
\captionsetup{type=figure}
\centering
\includegraphics[width=\linewidth]{figures/T22.pdf}
\end{minipage}
\caption*{$H=1$}
\end{figure}
\end{document}
答案1
您的示例中的minipage
没有任何用处,而且您似乎也不想要浮动图形,所以我不会使用figure
。如果您需要 captionscaption
包提供的内容\captionof{figure}{...}
,但要将 24 张图片放在一起,您可以使用
{\centering
\includegraphics[width=.25\textwidth]{fig01}\linebreak[0]%
\includegraphics[width=.25\textwidth]{fig02}\linebreak[0]%
\includegraphics[width=.25\textwidth]{fig03}\linebreak[0]%
\includegraphics[width=.25\textwidth]{fig04}\linebreak[0]%
\includegraphics[width=.25\textwidth]{fig05}\linebreak[0]%
\includegraphics[width=.25\textwidth]{fig06}\linebreak[0]%
\includegraphics[width=.25\textwidth]{fig07}\linebreak[0]%
\includegraphics[width=.25\textwidth]{fig08}\linebreak[0]%
\includegraphics[width=.25\textwidth]{fig09}\linebreak[0]%
\includegraphics[width=.25\textwidth]{fig10}\linebreak[0]%
\includegraphics[width=.25\textwidth]{fig11}\linebreak[0]%
\includegraphics[width=.25\textwidth]{fig12}\linebreak[0]%
\includegraphics[width=.25\textwidth]{fig13}\linebreak[0]%
\includegraphics[width=.25\textwidth]{fig14}\linebreak[0]%
\includegraphics[width=.25\textwidth]{fig15}\linebreak[0]%
\includegraphics[width=.25\textwidth]{fig16}\linebreak[0]%
\includegraphics[width=.25\textwidth]{fig17}\linebreak[0]%
\includegraphics[width=.25\textwidth]{fig18}\linebreak[0]%
\includegraphics[width=.25\textwidth]{fig19}\linebreak[0]%
\includegraphics[width=.25\textwidth]{fig20}\linebreak[0]%
\includegraphics[width=.25\textwidth]{fig21}\linebreak[0]%
\includegraphics[width=.25\textwidth]{fig22}\linebreak[0]%
\includegraphics[width=.25\textwidth]{fig23}\linebreak[0]%
\includegraphics[width=.25\textwidth]{fig24}\linebreak[0]%
}
这将使行列分为 6 行,每行 4 行,行与\lineskip
行之间没有水平间距,行与行之间有粘连。当然,可以调整图像宽度和/或添加间距,而不是增加换行惩罚。