首先,我使用了以下内容:
\usepackage{rotating}
\usepackage{subfigure}
....
\begin{sidewaysfigure}
\subfigure[Title A]{\includegraphics[width=7cm]{figures/plot1a.png}}
\subfigure[Title B]{\includegraphics[width=7cm]{figures/plot1b.png}}
\subfigure[Title B]{\includegraphics[width=7cm]{figures/plot1c.png}}
\caption{Title for both}
\end{sidewaysfigure}
\begin{sidewaysfigure}
\subfigure[Title A]{\includegraphics[width=7cm]{figures/plot2a.png}}
\subfigure[Title B]{\includegraphics[width=7cm]{figures/plot2b.png}}
\subfigure[Title B]{\includegraphics[width=7cm]{figures/plot2c.png}}
\caption{Title for both}
\end{sidewaysfigure}
\begin{sidewaysfigure}
\subfigure[Title A]{\includegraphics[width=7cm]{figures/plot3a.png}}
\subfigure[Title B]{\includegraphics[width=7cm]{figures/plot3b.png}}
\subfigure[Title B]{\includegraphics[width=7cm]{figures/plot3c.png}}
\caption{Title for both}
\end{sidewaysfigure}
上面的代码创建了三个不同的页面,但我希望它们像一个 3 x 3 矩阵一样横向页面。 我怎样才能做到这一点?
答案1
如果你把所有东西都放在一个sidewaysfigure
环境中,即
\begin{sidewaysfigure}
\subfigure[Title A]{\includegraphics[width=7cm]{figures/plot1a.png}}
\subfigure[Title B]{\includegraphics[width=7cm]{figures/plot1b.png}}
\subfigure[Title B]{\includegraphics[width=7cm]{figures/plot1c.png}}
\caption{Title for all}
\subfigure[Title A]{\includegraphics[width=7cm]{figures/plot2a.png}}
\subfigure[Title B]{\includegraphics[width=7cm]{figures/plot2b.png}}
\subfigure[Title B]{\includegraphics[width=7cm]{figures/plot2c.png}}
\caption{Title for all}
\subfigure[Title A]{\includegraphics[width=7cm]{figures/plot3a.png}}
\subfigure[Title B]{\includegraphics[width=7cm]{figures/plot3b.png}}
\subfigure[Title B]{\includegraphics[width=7cm]{figures/plot3c.png}}
\caption{Title for all}
\end{sidewaysfigure}
它会起作用。另一个可能的解决方案涉及pdflscape
包(使用此包的优点是页面在 pdf 查看器中旋转,因此您不必转动脖子)。代码如下所示。该caption
包仅用于调整图形和标题之间的空间,通过\captionsetup
(如果您决定坚持使用,您也可以使用它)。如果图形在文档内,使用(从注释行中删除%)sidewaysfigure
可能会很有用afterpage
\documentclass[demo]{article}
\usepackage[top=2cm,bottom=2cm]{geometry}
\usepackage{graphicx}
\usepackage{pdflscape}
\usepackage{subfigure}
\usepackage{caption}
\captionsetup{aboveskip=0pt}
%\usepackage{afterpage}
\begin{document}
%\afterpage{
\begin{landscape}
\begin{figure}
\centering
\subfigure[Title A]{\includegraphics[width=7cm]{figures/plot1a.png}}
\subfigure[Title B]{\includegraphics[width=7cm]{figures/plot1b.png}}
\subfigure[Title B]{\includegraphics[width=7cm]{figures/plot1c.png}}
\caption{Title for all}
\vskip3ex
\subfigure[Title A]{\includegraphics[width=7cm]{figures/plot2a.png}}
\subfigure[Title B]{\includegraphics[width=7cm]{figures/plot2b.png}}
\subfigure[Title B]{\includegraphics[width=7cm]{figures/plot2c.png}}
\caption{Title for all}
\vskip3ex
\subfigure[Title A]{\includegraphics[width=7cm]{figures/plot3a.png}}
\subfigure[Title B]{\includegraphics[width=7cm]{figures/plot3b.png}}
\subfigure[Title B]{\includegraphics[width=7cm]{figures/plot3c.png}}
\caption{Title for all}
\end{figure}
\end{landscape}
%}
\end{document}