我想将图中的子图拆分成两页。我的第一页只包含两个段落,后面有空白。所以我想将图拆分成两页。我试过了,\ContinuedFloat
但没有成功。
\documentclass[twoside,12pt]{article}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{amsmath}
\usepackage{lipsum}
\begin{document}
\lipsum[1-2]
\begin{figure}[htbp]
\centering
\begin{subfigure}{0.25\textwidth}
\includegraphics[width=3cm,height=3cm]{example-image}
\subcaption{}
\label{2a}
\end{subfigure}\hfil
\begin{subfigure}{0.25\textwidth}
\includegraphics[width=3cm,height=3cm]{example-image}
\subcaption{}
\label{2b}
\end{subfigure}\hfil
\begin{subfigure}{0.25\textwidth}
\includegraphics[width=3cm,height=3cm]{example-image}
\subcaption{}
\label{2c}
\end{subfigure}
\medskip
\begin{subfigure}{0.25\textwidth}
\includegraphics[width=3cm,height=3cm]{example-image}
\subcaption{}
\label{2d}
\end{subfigure}\hfil
\begin{subfigure}{0.25\textwidth}
\includegraphics[width=3cm,height=3cm]{example-image}
\subcaption{}
\label{2e}
\end{subfigure}\hfil
\begin{subfigure}{0.25\textwidth}
\includegraphics[width=3cm,height=3cm]{example-image}
\subcaption{}
\label{2f}
\end{subfigure}
\medskip
\begin{subfigure}{0.25\textwidth}\ContinuedFloat
\includegraphics[width=3cm,height=3cm]{example-image}
\subcaption{}
\label{2g}
\end{subfigure}\hfil
\begin{subfigure}{0.25\textwidth}
\includegraphics[width=3cm,height=3cm]{example-image}
\subcaption{}
\label{2h}
\end{subfigure}\hfil
\begin{subfigure}{0.25\textwidth}
\includegraphics[width=3cm,height=3cm]{example-image}
\subcaption{}
\label{2i}
\end{subfigure}
\medskip
\begin{subfigure}{0.25\textwidth}
\includegraphics[width=3cm,height=3cm]{example-image}
\subcaption{}
\label{2j}
\end{subfigure}\hfil % <-- added
\begin{subfigure}{0.25\textwidth}
\includegraphics[width=3cm,height=3cm]{example-image}
\subcaption{}
\label{2k}
\end{subfigure}\hfil % <-- added
\begin{subfigure}{0.25\textwidth}
\includegraphics[width=3cm,height=3cm]{example-image}
\subcaption{}
\label{2l}
\end{subfigure}
\caption{Manually Segmentation Tomatoes leaves. (\subref{2a})-(\subref{2f}) healthy leaves for $1^{\text{st}}$ data until $6^{\text{th}}$ data. (\subref{2g})-(\subref{2l}) leaves infected by disease for $1^{\text{st}}$ data until $6^{\text{th}}$ data.}
\label{Gambar2}
\end{figure}
\end{document}
结果是
第一页:
第二页:
我想:第一页是
第二页是
有人能帮助我吗?
答案1
将图形分成两个 \begin{figure),然后\ContinuedFloat
像我一样将其添加到第二个图形中。这就是你想要的吗?
\documentclass[twoside,12pt]{article}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{amsmath}
\usepackage{lipsum}
\usepackage[skip=0.5ex]{subcaption}
\begin{document}
\lipsum[1-2]
\begin{figure}[htbp]
\centering
\begin{subfigure}{0.25\textwidth}
\includegraphics[width=3cm,height=3cm]{example-image}
\subcaption{}
\label{2a}
\end{subfigure}\hfil
\begin{subfigure}{0.25\textwidth}
\includegraphics[width=3cm,height=3cm]{example-image}
\subcaption{}
\label{2b}
\end{subfigure}\hfil
\begin{subfigure}{0.25\textwidth}
\includegraphics[width=3cm,height=3cm]{example-image}
\subcaption{}
\label{2c}
\end{subfigure}
\medskip
\begin{subfigure}{0.25\textwidth}
\includegraphics[width=3cm,height=3cm]{example-image}
\subcaption{}
\label{2d}
\end{subfigure}\hfil
\begin{subfigure}{0.25\textwidth}
\includegraphics[width=3cm,height=3cm]{example-image}
\subcaption{}
\label{2e}
\end{subfigure}\hfil
\begin{subfigure}{0.25\textwidth}
\includegraphics[width=3cm,height=3cm]{example-image}
\subcaption{}
\label{2f}
\end{subfigure}
\end{figure} %end first part of figure
\medskip
\begin{figure}\ContinuedFloat %begin second part of figure
\begin{subfigure}{0.25\textwidth}
\includegraphics[width=3cm,height=3cm]{example-image}
\subcaption{}
\label{2g}
\end{subfigure}\hfil
\begin{subfigure}{0.25\textwidth}
\includegraphics[width=3cm,height=3cm]{example-image}
\subcaption{}
\label{2h}
\end{subfigure}\hfil
\begin{subfigure}{0.25\textwidth}
\includegraphics[width=3cm,height=3cm]{example-image}
\subcaption{}
\label{2i}
\end{subfigure}
\medskip
\begin{subfigure}{0.25\textwidth}
\includegraphics[width=3cm,height=3cm]{example-image}
\subcaption{}
\label{2j}
\end{subfigure}\hfil % <-- added
\begin{subfigure}{0.25\textwidth}
\includegraphics[width=3cm,height=3cm]{example-image}
\subcaption{}
\label{2k}
\end{subfigure}\hfil % <-- added
\begin{subfigure}{0.25\textwidth}
\includegraphics[width=3cm,height=3cm]{example-image}
\subcaption{}
\label{2l}
\end{subfigure}
\caption{Manually Segmentation Tomatoes leaves. (\subref{2a})-(\subref{2f}) healthy leaves for $1^{\text{st}}$ data until $6^{\text{th}}$ data. (\subref{2g})-(\subref{2l}) leaves infected by disease for $1^{\text{st}}$ data until $6^{\text{th}}$ data.}
\label{Gambar2}
\end{figure}
\end{document}