我正在使用命令 \begin{subfigure}...\end{subfigure} 并排插入三张图片。但我想知道如何在两者之间留出空间,因为它们彼此太近了。
\begin{figure}
\begin{subfigure}
here's the first image
\end{subfigure}
\begin{subfigure}
here's the second image
\end{subfigure}
\begin{subfigure}
here's the third image
\end{subfigure}
\end{figure}
Run Code Online (Sandbox Code Playgroud)
我建议在图像之间使用subcaption和添加一些\hspace:
\documentclass{article}
\usepackage{subcaption,graphicx}
\begin{document}
\begin{figure}
\centering
\begin{subfigure}{.3\linewidth}
\centering
\includegraphics[width = \linewidth]{example-image-a}
\caption{First image}
\end{subfigure}%
\hspace{1em}% Space between image A and B
\begin{subfigure}{.3\linewidth}
\centering
\includegraphics[width = \linewidth]{example-image-b}
\caption{Second image}
\end{subfigure}%
\hspace{2em}% Space between image B and C
\begin{subfigure}{.3\linewidth}
\centering
\includegraphics[width = \linewidth]{example-image-c}
\caption{Third image}
\end{subfigure}
\caption{A number of images}
\end{figure}
\end{document}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
24664 次 |
| 最近记录: |