我正在尝试创建一个由三列组成的图形。第 1 列和第 3 列有三个子图,每个子图下方都有子图,第 2 列有一个细长的图形,其长度与页面高度相同。
如何才能实现这一目标?
到目前为止我已经:
\begin{figure}
\centering
\begin{subfigure}{0.33\textwidth}
\centering
\includegraphics[width=\textwidth]{png}
\caption{}
\label{subfig:}
\end{subfigure}%
\hfil
\begin{subfigure}{0.3\textwidth}
\centering
\includegraphics[height=1\textheight]{png}
\end{subfigure}%
\hfil
\begin{subfigure}{0.33\textwidth}
\centering
\includegraphics[width=\textwidth]{png}
\caption{}
\label{subfig:}
\end{subfigure}%
答案1
\valign
当然,这是一个使用的好地方。;-)
\documentclass{article}
\usepackage{subcaption,graphicx}
\begin{document}
\begin{figure}[p]
\valign{#\cr
\hbox{\begin{subfigure}{0.33\textwidth}
\includegraphics[width=\textwidth]{example-image}
\caption{First}
\label{subfig:first}
\end{subfigure}}
\vfill
\hbox{\begin{subfigure}{0.33\textwidth}
\includegraphics[width=\textwidth]{example-image}
\caption{Second}
\label{subfig:second}
\end{subfigure}}
\vfill
\hbox{\begin{subfigure}{0.33\textwidth}
\includegraphics[width=\textwidth]{example-image}
\caption{Third}
\label{subfig:third}
\end{subfigure}}
\cr\noalign{\hfill}
\hbox{\begin{subfigure}[b]{0.15\textwidth}
\includegraphics[height=0.8\textheight,width=\textwidth]{example-image}
\caption{Middle}\label{subfig:middle}
\end{subfigure}}
\cr\noalign{\hfill}
\hbox{\begin{subfigure}{0.33\textwidth}
\includegraphics[width=\textwidth]{example-image}
\caption{Fourth}
\label{subfig:fourth}
\end{subfigure}}
\vfill
\hbox{\begin{subfigure}{0.33\textwidth}
\includegraphics[width=\textwidth]{example-image}
\caption{Fifth}
\label{subfig:fifth}
\end{subfigure}}
\vfill
\hbox{\begin{subfigure}{0.33\textwidth}
\includegraphics[width=\textwidth]{example-image}
\caption{Sixth}
\label{subfig:sixth}
\end{subfigure}}
\cr
}
\caption{Global caption}\label{fig:global}
\end{figure}
\end{document}
答案2
minipage
在s 和的帮助下\vfill
。
\documentclass{article}
\usepackage{subcaption}
\usepackage[demo]{graphicx}
\newlength{\myheight}
\setlength{\myheight}{\textheight}
\begin{document}
\begin{figure}
\centering
\begin{subfigure}{0.33\textwidth}
\begin{minipage}[c][\myheight][c]{\linewidth}
\centering
{\includegraphics[width=\textwidth]{png}
\caption{}
\label{subfig:}}
\vfill
{\includegraphics[width=\textwidth]{png}
\caption{}
\label{subfig:}}
\vfill
{\includegraphics[width=\textwidth]{png}
\caption{}
\label{subfig:}}
\end{minipage}
\end{subfigure}%
\hfil
\begin{subfigure}{0.3\textwidth}
\centering
\includegraphics[height=1\textheight, width=\textwidth]{png}
\end{subfigure}%
\hfil
\begin{subfigure}{0.33\textwidth}
\begin{minipage}[c][\myheight][c]{\linewidth}
\centering
{\includegraphics[width=\textwidth]{png}
\caption{}
\label{subfig:}}
\vfill
{\includegraphics[width=\textwidth]{png}
\caption{}
\label{subfig:}}
\vfill
{\includegraphics[width=\textwidth]{png}
\caption{}
\label{subfig:}}
\end{minipage}
\end{subfigure}%
\end{figure}
\end{document}