2

我正在尝试在 LaTeX 中的一些数字周围绘制框。我有 6 个子图,我想在成对的周围画框。它们以 2 行和 3 列布局布局,我想在 (0,0) 和 (1,0)、(0,1) 和 (1,1) 等周围绘制一个框。

|---------|---------|---------|
| Figure1 | Figure2 | Figure3 |
|         |         |         |
| Figure4 | Figure5 | Figure6 |
|_________|_________|_________|
   caption for all figures

类似上面的东西。

我的代码是:

\begin{figure}[ht]
\centering
\includegraphics[width=0.23\textwidth]{Figure1.pdf}\hfill
\includegraphics[width=0.23\textwidth]{Figure2.pdf}\hfill
\includegraphics[width=0.23\textwidth]{Figure3.pdf}

\includegraphics[width=0.23\textwidth]{Figure4.pdf}\hfill
\includegraphics[width=0.23\textwidth]{Figure5.pdf}\hfill
\includegraphics[width=0.23\textwidth]{Figure6.pdf}
\caption{This is the caption.}
\end{figure}
4

1 回答 1

0

你可以把它们放在一张桌子上:

\documentclass{article}

\usepackage{graphicx}
\usepackage{tabularx}
\usepackage{array}

\newcolumntype{Y}{>{\centering\arraybackslash}X}

\begin{document}

\begin{figure}[ht]
\begin{tabularx}{\linewidth}{|Y|Y|Y|}
\hline
\includegraphics[width=0.23\textwidth]{example-image-duck}&
\includegraphics[width=0.23\textwidth]{example-image-duck}&
\includegraphics[width=0.23\textwidth]{example-image-duck}\\
\includegraphics[width=0.23\textwidth]{example-image-duck}&
\includegraphics[width=0.23\textwidth]{example-image-duck}&
\includegraphics[width=0.23\textwidth]{example-image-duck}\\
\hline
\end{tabularx}
\caption{This is the caption.}
\end{figure}


\end{document}

在此处输入图像描述

于 2020-03-31T07:42:56.900 回答