![不同尺寸的图形网格](https://linux22.com/image/455803/%E4%B8%8D%E5%90%8C%E5%B0%BA%E5%AF%B8%E7%9A%84%E5%9B%BE%E5%BD%A2%E7%BD%91%E6%A0%BC.png)
我的问题与这个问题非常相似:不同尺寸子图的网格布局
但是,我不能使用该subcaption
包(我正在使用subfigure
),并且我也不希望它们有标题,所以如果我可以subfigure
完全避免使用,也许会更好?
这是我需要的输出:
我尝试使用来自的代码Zarko 的这个回答但我无法让它工作。
\begin{figure}[!htb]
\centering
\begin{tabular}[t]{cc}
\includegraphics[width=0.32\linewidth,height=1.7\textwidth]{example-image-a}
&
\begin{tabular}{c}
\smallskip
\includegraphics[width=0.32\textwidth]{example-image-b}
\includegraphics[width=0.32\textwidth]{example-image-c}
\end{tabular}\\
\end{tabular}
\caption{Cats}
\end{figure}
请注意,此代码仅适用于前两列,我还没有尝试添加最后一列。
编辑:我目前的尝试如下(表格仅供参考):
\begin{figure}[!htb]
\centering
\setkeys{Gin}{width=\linewidth}
\begin{tabular}{|c|c|c|}
\hline
\multirow{2}{*}{\includegraphics[width=0.3\linewidth, valign=m]{example-image-a}} &
\includegraphics[width=0.25\linewidth, valign=m]{example-image-b} &
\multirow{2}{*}{\includegraphics[width=0.4\linewidth, valign=m]{example-image-c}}
\\ \hline
& \includegraphics[width=0.25\linewidth, valign=m]{example-image-c} & \\
\\ \hline
\end{tabular}
\end{figure}
编辑2:使用Zarko 的回答改变每个宽度会使图像变得非常小:
\begin{figure}[!htb]
\centering
\setkeys{Gin}{width=\linewidth}
\setlength\tabcolsep{0pt}
\begin{tblr}[t]{colspec={*{3}{X[c,m]}},
cell{1}{1,3} = {r=2}{ }
}
\includegraphics[width=0.3\linewidth, valign=m]{example-image-a}
& \includegraphics[width=0.15\linewidth, valign=m]{example-image-b}
& \includegraphics[width=0.4\linewidth, valign=m]{example-image-c} \\
& \includegraphics[width=0.15\linewidth,valign=m]{example-image-b}
& \\
\end{tblr}
\caption{Cats}
\end{figure}
答案1
请尝试以下操作:
\documentclass{article}
\usepackage[export]{adjustbox}
\usepackage{tabularray}
\begin{document}
\begin{figure}[!htb]
\centering
\setkeys{Gin}{width=\linewidth}
\begin{tblr}[t]{colspec={*{3}{X[c,m]}},
cell{1}{1,3} = {r=2}{ } % <--- define multirow cells
}
\includegraphics[height=1.5\linewidth, valign=m]{example-image-a}
& \includegraphics[valign=m]{example-image-b}
& \includegraphics[height=1.5\linewidth, valign=m]{example-image-c} \\
& \includegraphics[valign=m]{example-image-b}
& \\
\end{tblr}
\caption{Cats}
\end{figure}
\end{document}
编辑: 从编辑的问题中,您可以更改图像的所需外观,现在我猜,您正在寻找类似这样的内容:
\documentclass{article}
\usepackage[export]{adjustbox}
\usepackage{tabularray}
\begin{document}
\begin{figure}[!htb]
\centering
\setkeys{Gin}{width=\linewidth}
\begin{tblr}[t]{colspec={Q[c,m, wd=0.3\linewidth]
Q[c,m, wd=0.25\linewidth]
Q[c,m, wd=0.4\linewidth] },
cell{1}{1,3} = {r=2}{ } % <--- define multirow cells
}
\includegraphics[valign=m]{example-image-a}
& \includegraphics[valign=m]{example-image-b}
& \includegraphics[valign=m]{example-image-c} \\
& \includegraphics[valign=m]{example-image-b}
& \\
\end{tblr}
\caption{Cats}
\end{figure}
\end{document}