乳胶图中的绘图框

问题描述 投票:1回答:1

我正在尝试在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}
latex figure box multicol
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}

enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.