我正在写我的学士论文,在定位子图时遇到了一些麻烦。我有三个不同大小的图形,我希望得到这样的输出:
我尝试输入以下代码:
\begin{figure}[H]
\centering
\begin{tabular}{cc}
\multirow{2}{*}{%
\begin{subfigure}[b]{.38\textwidth}
\centering
\includegraphics[trim=8cm 8.5cm 8cm 4cm,clip,width=.5\textwidth]{fig/mast01.eps}
\end{subfigure}} &%
\begin{subfigure}{.58\textwidth}
\centering
\includegraphics[trim=13cm 11cm 2.5cm 12cm,clip,width=.6\textwidth]{fig/mast01.eps}
\end{subfigure} \\ &%
\begin{subfigure}{.58\textwidth}
\centering
\includegraphics[trim=7cm 16cm 2.5cm 2cm,clip,width=.6\textwidth]{fig/mast02.eps}
\end{subfigure} \\%
\end{tabular}
\caption{Teknisk tegning af gittermasten}
\label{fig:gittermast}
\end{figure}
...但输出看起来很糟糕。
我怎样才能做到这一点?
答案1
您可以测量左边的图像,然后构建一个包含另外两张图像(作为subfigure
环境)的具有相同高度的小页面。
\documentclass{article}
\usepackage{graphicx}
\usepackage{subcaption}
\newsavebox{\bigimage}
\begin{document}
\begin{figure}
\centering
\sbox{\bigimage}{%
\begin{subfigure}[b]{.38\textwidth}
\centering
\includegraphics[width=\textwidth]{example-image-9x16}
\caption{Figure 1}
\vspace{0pt}% reference point at the very bottom
\end{subfigure}%
}
\usebox{\bigimage}\hfill
\begin{minipage}[b][\ht\bigimage][s]{.58\textwidth}
\begin{subfigure}{\textwidth}
\centering
\includegraphics[height=3.5cm,width=\textwidth]{example-image-16x9}
\caption{Figure 2}
\end{subfigure}%
\vfill
\begin{subfigure}{\textwidth}
\centering
\includegraphics[height=3.5cm,width=\textwidth]{example-image-16x9}
\caption{Figure 3}
\end{subfigure}
\vspace{0pt}% reference point at the very bottom
\end{minipage}
\caption{Full caption}
\end{figure}
\end{document}
但是还有一种更巧妙的方法,它需要低级 TeX 构造:
\documentclass{article}
\usepackage{graphicx}
\usepackage{subcaption}
\begin{document}
\begin{figure}
\centering
\tabskip=0pt
\valign{#\cr
\hbox{%
\begin{subfigure}[b]{.38\textwidth}
\centering
\includegraphics[width=\textwidth]{example-image-9x16}
\caption{Figure 1}
\end{subfigure}%
}\cr
\noalign{\hfill}
\hbox{%
\begin{subfigure}{.58\textwidth}
\centering
\includegraphics[height=3.5cm,width=\textwidth]{example-image-16x9}
\caption{Figure 2}
\end{subfigure}%
}\vfill
\hbox{%
\begin{subfigure}{.58\textwidth}
\centering
\includegraphics[height=3.5cm,width=\textwidth]{example-image-16x9}
\caption{Figure 3}
\end{subfigure}%
}\cr
}
\caption{Full caption}
\end{figure}
\end{document}