我目前正在尝试使用 Multirow 包将多幅图像放置在表格内。
我当前的代码如下:
\begin{figure}
\centering
\begin{tabular}{cc}
&
\multirow{2}{0.65\textwidth}{\includegraphics[width = 0.65\textwidth]{kitties}}\\
\includegraphics[width = 0.32\textwidth]{tigers}
\\
\includegraphics[width = 0.32\textwidth]{lions}&
\\
\\
\includegraphics[width = 0.32\textwidth]{tigers}&
\multirow{2}{0.65\textwidth}{\includegraphics[width =0.65\textwidth{kitties}}\\
\includegraphics[width = 0.32\textwidth]{lions}\\
\end{tabular}
\caption[XYZ]{\label{fig:xyz} 1234}
\end{figure}
如您所见,我已经尝试了两种不同的选项/multirow
。我得到了以下输出:
如何才能将桌子里面的小猫与它们的亲戚对齐,使它们排成一排?
请注意,我不需要对图形进行单独的描述,当前 kitti 图像内的描述就足够了。
答案1
使用 minipages 的解决方案:
\documentclass[12pt]{article}
\usepackage{graphicx}
\usepackage{float}
\begin{document}
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravidamauris.
\begin{figure}[H]
\centering
\begin{minipage}[outer sep=0]{\textwidth}
\begin{minipage}[m]{0.34\textwidth}
\includegraphics[width =\textwidth]{example-image-a}\\[1ex]
\includegraphics[width =\textwidth]{example-image-b}
\end{minipage}\hfill
\begin{minipage}[m]{0.64\textwidth}
\includegraphics[width =\textwidth]{example-image-a}
\end{minipage}
\end{minipage}\vspace{1ex}
\begin{minipage}[outer sep=0]{\textwidth}
\begin{minipage}[m]{0.34\textwidth}
\includegraphics[width =\textwidth]{example-image-a}\\[1ex]
\includegraphics[width =\textwidth]{example-image-b}
\end{minipage}\hfill
\begin{minipage}[m]{0.64\textwidth}
\includegraphics[width =\textwidth]{example-image-b}
\end{minipage}
\end{minipage}
\caption[XYZ]{\label{fig:xyz} 1234}
\end{figure}
\end{document}
答案2
您可以使用可选参数来\multirow
调整其内容的位置:
\documentclass{article}
\usepackage{multirow}
\usepackage[demo]{graphicx}
\begin{document}
\begin{figure}
\centering
\begin{tabular}{cc}
\includegraphics[width = 0.32\textwidth]{tigers}
& \multirow{2}{*}[18.7ex] {\includegraphics[width = 0.65\textwidth, height=0.33\textheight]{kitties}}\\
\includegraphics[width = 0.32\textwidth]{lions} \\[4ex]
%%%%%%%%%%
\includegraphics[width = 0.32\textwidth]{tigers}
& \multirow{2}{0.65\textwidth}[17ex]{\includegraphics[width =0.65\textwidth, height=0.3\textheight]{kitties}} \\
\includegraphics[width = 0.32\textwidth]{lions}
\end{tabular}
\caption[XYZ]{\label{fig:xyz} 1234}
\end{figure}
\end{document}