多页图并排,包含自己的子图

多页图并排,包含自己的子图

对于我的论文,我希望将两个图形并排放置,每个图形由五个子图形组成,这些子图形需要显示在彼此下方。我设法使用subfigcaption和包的组合来实现这一点float。但是,现在这两个图形填满了整个页面,因此图形的放置毫无意义。此外,我不需要将所有子图形都放在一页上,但是我确实希望保留两个不同的图形,每个图形都有自己的子图形。

当使用不同的图形环境时,\ContinuedFloat不同图形的子图的命名会变得混乱。

现在我的部分代码:

\documentclass{article}

\usepackage{subfig}
\usepackage[demo]{graphicx}
\usepackage{caption}
\usepackage{float}

\begin{document}
\begin{figure}[H]
    \begin{minipage}{0.45\textwidth}
        \noindent\subfloat[1a]{\includegraphics[height=3cm]{image1}}
        \hfill
        \subfloat[1b]{\includegraphics[height=3cm]{this008}}    
        \hfill
        \subfloat[1c]{\includegraphics[height=3cm]{this009}}
        \hfill
        \subfloat[1d]{\includegraphics[height=3cm]{this010}}
        \hfill
        \subfloat[1d]{\includegraphics[height=3cm]{this011}}
        \caption{Caption figure 1}
    \end{minipage}
    \hfill
    \begin{minipage}{0.45\textwidth}
        \noindent\subfloat[2a]{\includegraphics[height=3cm]{d3plot001}}
        \hfill
        \subfloat[2b]{\includegraphics[height=3cm]{d3plot003}}  
        \hfill
        \subfloat[2c]{\includegraphics[height=3cm]{d3plot004}}
        \hfill
        \subfloat[2d]{\includegraphics[height=3cm]{d3plot005}}
        \hfill
        \subfloat[2e]{\includegraphics[height=3cm]{d3plot006}}  
        \caption{Caption figure 2}
    \end{minipage}
\end{figure}
\end{document}

它产生了我想要的结果,但它不能跨越多页。我想要:

 1a          2a
 1b          2b
-pagebreak-
 1c          2c
 1d          2d
 1e          2e
 caption 1   caption 2

答案1

此解决方案使用longtable创建多页图形。图形列表的条目在开头单独写入。

\documentclass{article}

\usepackage[demo]{graphicx}
\usepackage{caption}
\usepackage{longtable}

\newcommand{\listcaption}[1]{\addcontentsline{lof}{figure}%
  {\protect\numberline{\thefigure}{\ignorespaces#1}}}%

\newsavebox{\boxA}
\newsavebox{\boxB}

\begin{document}
\listoffigures
\newpage

\savebox{\boxA}{\begin{minipage}{0.45\textwidth}
  \captionof{figure}[]{Caption figure 1}
\end{minipage}}% increments figure counter on creation only
\listcaption{Caption figure 1}% write to listoffigures
%
\savebox{\boxB}{\begin{minipage}{0.45\textwidth}
  \captionof{figure}[]{Caption figure 2}
\end{minipage}}%
\listcaption{Caption figure 2}% write to listoffigures
%
\begin{longtable}{cc}
  \endhead
  \usebox{\boxA} & \usebox{\boxB} \\
  \endfoot
  \includegraphics[height=3cm]{image1} & \includegraphics[height=3cm]{d3plot001} \\
  \nopagebreak 1a & 2a \\[\abovecaptionskip]
  \includegraphics[height=3cm]{this008} & \includegraphics[height=3cm]{d3plot003} \\
  \nopagebreak 1b & 2b \\[\abovecaptionskip]
  \includegraphics[height=3cm]{this009} & \includegraphics[height=3cm]{d3plot004} \\
  \nopagebreak 1c & 2c \\[\abovecaptionskip]
  \includegraphics[height=3cm]{this010} & \includegraphics[height=3cm]{d3plot005} \\
  \nopagebreak 1d & 2d \\[\abovecaptionskip]
  \includegraphics[height=3cm]{this011} & \includegraphics[height=3cm]{d3plot006} \\
  \nopagebreak 1e & 2e \\[\abovecaptionskip]
\end{longtable}
\end{document}

答案2

不太好,但通过对figuresubfigure计数器的一些操作,它似乎起作用了:

\documentclass{article}

\usepackage{subfig}
\usepackage[demo]{graphicx}
\usepackage{caption}

\begin{document}
  \begin{figure}
    \begin{minipage}{0.45\textwidth}
        \noindent\subfloat[1a]{\includegraphics[height=3cm]{image1}}
        \hfill
        \subfloat[1b]{\includegraphics[height=3cm]{this008}}    
        \caption{Caption figure 1}
    \end{minipage}
    \hfill
    \begin{minipage}{0.45\textwidth}
        \noindent\subfloat[2a]{\includegraphics[height=3cm]{d3plot001}}
        \hfill
        \subfloat[2b]{\includegraphics[height=3cm]{d3plot003}}  
        \caption{Caption figure 2}
    \end{minipage}
  \end{figure}

  \begin{figure}
    \addtocounter{figure}{-1}%
    \begin{minipage}{0.45\textwidth}
        \ContinuedFloat
        \noindent
        \subfloat[1c]{\includegraphics[height=3cm]{this009}}
        \hfill
        \subfloat[1d]{\includegraphics[height=3cm]{this010}}
        \hfill
        \subfloat[1e]{\includegraphics[height=3cm]{this011}}
        \caption{Caption figure 1}
        \addtocounter{subfigure}{-3}%
    \end{minipage}
    \hfill
    \begin{minipage}{0.45\textwidth}
        \noindent
        \subfloat[2c]{\includegraphics[height=3cm]{d3plot004}}
        \hfill
        \subfloat[2d]{\includegraphics[height=3cm]{d3plot005}}
        \hfill
        \subfloat[2e]{\includegraphics[height=3cm]{d3plot006}}  
        \caption{Caption figure 2}
    \end{minipage}
\end{figure}

\end{document}

在此处输入图片描述

相关内容