不同页面中多个子图的单一标题

不同页面中多个子图的单一标题

我有如下图所示的排列图表,想做一个标题。我需要所有三页,如图 3.1 所示,但我得到的是图 3.3,它是 latex 将每页都算作一个带标题的图表。

\documentclass[a4paper,11pt,twoside,openright]{report}
\usepackage[firstpage]{draftwatermark}
\usepackage{gensymb}
\usepackage{xpatch}
\usepackage{fancyhdr}
\usepackage{changebar}
\usepackage[comma]{natbib}
\RequirePackage{import}
\usepackage{acronym}
\usepackage{graphicx}
\graphicspath{{images/}}
\usepackage{epstopdf}
\usepackage{threeparttable}
\usepackage{pbox}
\usepackage{amssymb,amsmath}
\usepackage{color}
\usepackage{url}
\usepackage{longtable}
\usepackage{tikz}
\usepackage{array}
\usepackage[list=true]{subcaption}
\usepackage{lscape}
\usepackage{rotating}
\usepackage{xcolor}


\newpage
\begin{figure}[!ht]
\begin{subfigure}{.5\linewidth}
%\includegraphics[scale=0.50]{data1.png}
\includegraphics[scale=0.50]{data2.png}
\end{subfigure}%
\begin{subfigure}{.5\linewidth}
\includegraphics[scale=0.50]{data3.png}
\end{subfigure}%
\\
\begin{subfigure}{.5\linewidth}
\includegraphics[width=1.\linewidth]{data4.png}
\end{subfigure}%
\begin{subfigure}{.5\linewidth}
\includegraphics[scale=0.50]{data5.png}
\end{subfigure}
\\
\begin{subfigure}{.5\linewidth}
\includegraphics[scale=0.50]{data6.png}
\end{subfigure}%
\begin{subfigure}{.5\linewidth}
\includegraphics[scale=0.50]{data7.png}
\end{subfigure}
\\
\end{figure}
\begin{figure}[!ht]
\centering
\includegraphics[scale=0.50]{data8.png}
\caption{ Rotation curve of $H_\alpha$ and blue shifted Na D with offset velocity...}
\label{big-offset}
\end{figure}

答案1

预先说明一下:您提供的代码生成与最终figure环境相关的数字“3.2”,而不是“3.3”。

由于您正在加载subcaption包,caption并且它也会自动加载包,因此我建议您\ContinuedFloat在每个环境开始时插入figure不应该接收新增加的标题编号的指令。

简化的 MWE(最小工作示例)和相关屏幕截图:

在此处输入图片描述

\documentclass[draft, % remove 'draft' option in real doc.
               11pt,a4paper,twoside,openright]{report}          
\usepackage{graphicx}
\usepackage{subcaption}

\begin{document}
\setcounter{chapter}{3} % just for this example

\begin{figure}[!ht]
\begin{subfigure}{.5\linewidth}
\includegraphics[scale=0.50]{data2.png}
\end{subfigure}%
\begin{subfigure}{.5\linewidth}
\includegraphics[scale=0.50]{data3.png}
\end{subfigure}

\begin{subfigure}{.5\linewidth}
\includegraphics[width=\linewidth]{data4.png}
\end{subfigure}%
\begin{subfigure}{.5\linewidth}
\includegraphics[scale=0.50]{data5.png}
\end{subfigure}

\begin{subfigure}{.5\linewidth}
\includegraphics[scale=0.50]{data6.png}
\end{subfigure}%
\begin{subfigure}{.5\linewidth}
\includegraphics[scale=0.50]{data7.png}
\end{subfigure}
\end{figure}

\begin{figure}[!ht]
\ContinuedFloat % <-- new
\centering
\includegraphics[scale=0.50]{data8.png}

\caption{Rotation curve of $H_\alpha$ and blue shifted Na D with offset velocity~\dots}
\label{big-offset}
\end{figure}
\end{document}

相关内容