我怎样才能取消图形编号?

我怎样才能取消图形编号?

我之前的图形编号是 11。我正在添加以下图形,我的期望是得到图 12。但我的编号是 14。如何消除它们的编号?

\documentclass[graybox]{svmult} %special version 
   \usepackage{mathptmx}       % selects Times Roman as basic font
\usepackage{helvet}         % selects Helvetica as sans-serif font
\usepackage{courier}        % selects Courier as typewriter font
\usepackage{type1cm}        % activate if the above 3 fonts are
                            % not available on your system

\usepackage{epstopdf}       % Converts eps to pdf if your version of 
                            % Tex (or pdflatex) does not support eps

%
\usepackage{makeidx}         % allows index generation
\usepackage{graphicx}        % standard LaTeX graphics tool
                             % when including figure files
\usepackage{multicol}        % used for the two-column index
\usepackage[bottom]{footmisc}% places footnotes at page bottom
\usepackage{float}
\usepackage{amsmath}
\usepackage{mathtools}
\usepackage{amssymb}
\usepackage{caption}
%\usepackage{subfigure}
\usepackage{subcaption}
\captionsetup{compatibility=false}
\usepackage{placeins}
\usepackage{epstopdf}
\usepackage{multirow}
\usepackage{romannum}
\usepackage{cite}
\usepackage{ragged2e} 
\usepackage{longtable}
\usepackage{lscape}


\usepackage[justification=centering]{caption}

\begin{document}
 \begin{figure}[h!]
    \begin{minipage}{1.0\textwidth}
    \begin{subfigure}[h!]{\textwidth}
         \includegraphics[width=\linewidth]{example-image.jpg}
          \centering
            \caption*{example-image}
     \end{subfigure}
     \end{minipage}
    \begin{minipage}{1.0\textwidth}
     \begin{subfigure}[h!]{\textwidth}
        \includegraphics[width=\linewidth]{example-image.jpg}
    \centering
       \caption*{example-image} 
    \end{subfigure}
    \end{minipage}
    \caption*{Images include to example-image} 
    \end{figure}
    \begin{figure}
     \begin{minipage}{1.0\textwidth}
    \begin{subfigure}[h!]{\textwidth}\ContinuedFloat
    \includegraphics[width=\linewidth]{example-image.jpg}
        \caption*{example-image}
    \end{subfigure}
    \end{minipage}
    \begin{minipage}{1.0\textwidth}
    \begin{subfigure}[h!]{\textwidth}\ContinuedFloat
    \includegraphics[width=\linewidth]{example-image.jpg}
        \caption*{example-image}
    \end{subfigure}
    \end{minipage}
    \caption*{Images include example-image} 
    \end{figure}
    \begin{figure}
    \begin{minipage}{1.0\textwidth}
    \begin{subfigure}[h!]{\linewidth}
     \includegraphics[width=\linewidth]{example-image.jpg}
     \centering
        \caption*{example-image}
    \end{subfigure}
    \end{minipage}
     \begin{minipage}{1.0\textwidth}
    \begin{subfigure}[h!]{\textwidth}\ContinuedFloat
    \includegraphics[width=\linewidth]{example-image.jpg}
        \caption*{example-image}
    \end{subfigure} 
     \end{minipage}
    \caption*{Images include example-image} 
    \caption{Used grouped images with their features and their corresponding histograms}
    \label{fig:example-image}
    \end{figure}
\end{document}

谢谢!

答案1

问题在于子图形内的\caption*(或\subcaption*\subcaption或) 步进了外部计数器 - 这种情况甚至发生在标准类中,并且是因为它无法知道外部图形是否编号。您可以通过手动调整来抵消此问题\captionfigurearticle

  \addtocounter{figure}{-1}

在外部图形的开头(无论该图形包含多少个子图形)。在下面的代码中,我已将该调整应用于第三个图形,但没有应用于第一个图形。

示例输出

\documentclass{article}

\usepackage{graphicx}

\usepackage{caption}
\usepackage{subcaption}

\begin{document}

\begin{figure}
  \centering
  \begin{subfigure}{\textwidth}
    \centering
    \fbox{Subfigure}
    \subcaption*{Test subcaption unnumbered}
  \end{subfigure}

  \medskip
    \fbox{Figure}
  \caption*{Test caption unnumbered}
\end{figure}

\begin{figure}
  \centering
  \begin{subfigure}{\textwidth}
    \centering
    \fbox{Subfigure}
    \subcaption*{Test subcaption unnumbered}
  \end{subfigure}

  \medskip
    \fbox{Figure}
  \caption{Test caption numbered}
\end{figure}

\begin{figure}
  \addtocounter{figure}{-1}
  \centering
  \begin{subfigure}{\textwidth}
    \centering
    \fbox{Subfigure}
    \subcaption*{Test subcaption unnumbered}
  \end{subfigure}
  \begin{subfigure}{\textwidth}
    \centering
    \fbox{Subfigure}
    \subcaption*{Test subcaption unnumbered}
  \end{subfigure}

  \medskip
    \fbox{Figure}
  \caption*{Test caption unnumbered}
\end{figure}

\begin{figure}
  \centering
  \begin{subfigure}{\textwidth}
    \centering
    \fbox{Subfigure}
    \subcaption*{Test subcaption unnumbered}
  \end{subfigure}

  \medskip
    \fbox{Figure}
  \caption{Test caption numbered}
\end{figure}

\end{document}

相关内容