我有一组 4 x 3 的图形,我想将它们合并成一个图形。但是,当我使用以下代码时,它给出了三组图形(图 1、图 2 和图 3),而不是图 1a、图 1b 和图 1c,以及一个整体图 1 标题。任何帮助都将不胜感激。
\documentclass[12pt]{article}
\usepackage{rotating}
\usepackage{subfigure}
\begin{document}
\begin{sidewaysfigure}
\centering
\subfigure[$y=1$]{\includegraphics[width=4cm]{11.png}}
\subfigure[$y=2$]{\includegraphics[width=4cm]{12.png}}
\subfigure[$y=3$]{\includegraphics[width=4cm]{13.png}}
\subfigure[$y=4$]{\includegraphics[width=4cm]{14.png}}
\caption{Figure 1a}
\subfigure[$y=1$]{\includegraphics[width=4cm]{21.png}}
\subfigure[$y=2$]{\includegraphics[width=4cm]{22.png}}
\subfigure[$y=3$]{\includegraphics[width=4cm]{23.png}}
\subfigure[$y=4$]{\includegraphics[width=4cm]{24.png}}
\caption{Figure 1b}
\subfigure[$y=1$]{\includegraphics[width=4cm]{31.png}}
\subfigure[$y=2$]{\includegraphics[width=4cm]{32.png}}
\subfigure[$y=3$]{\includegraphics[width=4cm]{33.png}}
\subfigure[$y=4$]{\includegraphics[width=4cm]{34.png}}
\caption{Figure 1c}
\end{sidewaysfigure}
\end{document}
答案1
幸运的是,\thefigure
几乎可以设置为任何东西。
\documentclass[12pt]{article}
\usepackage{rotating}
\usepackage{subfigure}
\begin{document}
\listoffigures
\begin{sidewaysfigure}
\centering
\subfigure[$y=1$]{\includegraphics[width=4cm]{11.png}}
\subfigure[$y=2$]{\includegraphics[width=4cm]{12.png}}
\subfigure[$y=3$]{\includegraphics[width=4cm]{13.png}}
\subfigure[$y=4$]{\includegraphics[width=4cm]{14.png}}
\renewcommand{\thefigure}{1a}
\caption{Figure 1a}
\subfigure[$y=1$]{\includegraphics[width=4cm]{21.png}}
\subfigure[$y=2$]{\includegraphics[width=4cm]{22.png}}
\subfigure[$y=3$]{\includegraphics[width=4cm]{23.png}}
\subfigure[$y=4$]{\includegraphics[width=4cm]{24.png}}
\renewcommand{\thefigure}{1b}
\caption{Figure 1b}
\subfigure[$y=1$]{\includegraphics[width=4cm]{31.png}}
\subfigure[$y=2$]{\includegraphics[width=4cm]{32.png}}
\subfigure[$y=3$]{\includegraphics[width=4cm]{33.png}}
\subfigure[$y=4$]{\includegraphics[width=4cm]{34.png}}
\renewcommand{\thefigure}{1c}
\caption{Figure 1c}
\addtocounter{figure}{-2}% \thefigure will be restored automatically
\end{sidewaysfigure}
\end{document}
此版本创建了一个单独的 subsubfigure 环境。
\documentclass[12pt]{article}
\usepackage{rotating}
\usepackage{subcaption}
\DeclareCaptionSubType{subfigure}
\captionsetup[subfigure]{labelformat=simple,labelsep=colon}
\captionsetup[subsubfigure]{labelformat=parens,labelsep=space}
\renewcommand{\thesubfigure}{\figurename~\thefigure\alph{subfigure}}
\renewcommand{\thesubsubfigure}{\roman{subsubfigure}}
\AtBeginDocument{% trial and error
\let\oldsubsubfigure=\subsubfigure
\renewcommand{\subsubfigure}{\expandafter\def\csname @captype\endcsname{subfigure}%
\oldsubsubfigure}%
}
\begin{document}
\listoffigures
\begin{sidewaysfigure}
\begin{subfigure}{\linewidth}
\centering
\begin{subsubfigure}{4cm}
\includegraphics[width=4cm]{11.png}
\caption{$y=1$}
\end{subsubfigure}%
\begin{subsubfigure}{4cm}
\includegraphics[width=4cm]{12.png}
\caption{$y=2$}
\end{subsubfigure}%
\begin{subsubfigure}{4cm}
\includegraphics[width=4cm]{13.png}
\caption{$y=3$}
\end{subsubfigure}%
\begin{subsubfigure}{4cm}
\includegraphics[width=4cm]{14.png}
\caption{$y=4$}
\end{subsubfigure}
\caption{Figure 1a}
\end{subfigure}
\begin{subfigure}{\linewidth}
\centering
\begin{subsubfigure}{4cm}
\includegraphics[width=4cm]{21.png}
\caption{$y=1$}
\end{subsubfigure}%
\begin{subsubfigure}{4cm}
\includegraphics[width=4cm]{22.png}
\caption{$y=2$}
\end{subsubfigure}%
\begin{subsubfigure}{4cm}
\includegraphics[width=4cm]{23.png}
\caption{$y=3$}
\end{subsubfigure}%
\begin{subsubfigure}{4cm}
\includegraphics[width=4cm]{24.png}
\caption{$y=4$}
\end{subsubfigure}
\caption{Figure 1a}
\end{subfigure}
\begin{subfigure}{\linewidth}
\centering
\begin{subsubfigure}{4cm}
\includegraphics[width=4cm]{31.png}
\caption{$y=1$}
\end{subsubfigure}%
\begin{subsubfigure}{4cm}
\includegraphics[width=4cm]{32.png}
\caption{$y=2$}
\end{subsubfigure}%
\begin{subsubfigure}{4cm}
\includegraphics[width=4cm]{33.png}
\caption{$y=3$}
\end{subsubfigure}%
\begin{subsubfigure}{4cm}
\includegraphics[width=4cm]{34.png}
\caption{$y=4$}
\end{subsubfigure}
\caption{Figure 1a}
\end{subfigure}
\caption{main caption}
\end{sidewaysfigure}
\end{document}