子标题 - 如何使用“图 x”代替字母编号?

子标题 - 如何使用“图 x”代替字母编号?

我当前的图像表如下所示:

在此处输入图片描述

但是,我希望标题包含“图”而不是 (a),并继续从之前的图开始编号。我该怎么做?

一位 MWE 表示:

\documentclass{article}
\usepackage{graphicx} % Figures
\usepackage{subcaption}
\begin{document}
    \begin{figure}[t!]
      \centering
      \begin{subfigure}[b]{0.3\linewidth}
        \includegraphics[width=\linewidth]{Media/Speaker.png}
        \caption{JBL Flip 4 Speaker\\ }
      \end{subfigure}
      \begin{subfigure}[b]{0.3\linewidth}
        \includegraphics[width=\linewidth]{Media/Meter.png}
        \caption{Dostmann SL328 Sound Level Meter}
      \end{subfigure}
      \begin{subfigure}[b]{0.3\linewidth}
        \includegraphics[width=\linewidth]{Media/test.png}
        \caption{Computer with Bluetooth, Python 3.7.0, and pyaudio module.}
      \end{subfigure}
      \begin{subfigure}[b]{0.3\linewidth}
        \includegraphics[width=\linewidth]{Media/test.png}
        \caption{6}
      \end{subfigure}
      \begin{subfigure}[b]{0.3\linewidth}
        \includegraphics[width=\linewidth]{Media/test.png}
        \caption{4}
      \end{subfigure}
      \begin{subfigure}[b]{0.3\linewidth}
        \includegraphics[width=\linewidth]{Media/test.png}
        \caption{5}
      \end{subfigure}
      \label{fig:test}
    \end{figure}
\end{document}

答案1

不要使用subfigure,而要使用minipage

在此处输入图片描述

\documentclass{article}

\usepackage{graphicx}

\begin{document}

\begin{figure}[t!]
  \begin{minipage}[b]{0.3\linewidth}
    \includegraphics[width = \linewidth]{example-image-a}
    \caption[JBL Flip 4 Speaker]
      {JBL Flip 4 Speaker \\ \\}
  \end{minipage}\hfill
  \begin{minipage}[b]{0.3\linewidth}
    \includegraphics[width = \linewidth]{example-image-b}
    \caption[Dostmann SL328 Sound Level Meter]
      {Dostmann SL328 Sound Level Meter \\}
  \end{minipage}\hfill
  \begin{minipage}[b]{0.3\linewidth}
    \includegraphics[width = \linewidth]{example-image-c}
    \caption{Computer with Bluetooth, Python 3.7.0, and pyaudio module.}
  \end{minipage}

  \bigskip

  \begin{minipage}[b]{0.3\linewidth}
    \includegraphics[width = \linewidth]{example-image-c}
    \caption{6}
  \end{minipage}\hfill
  \begin{minipage}[b]{0.3\linewidth}
    \includegraphics[width = \linewidth]{example-image-b}
    \caption{4}
  \end{minipage}\hfill
  \begin{minipage}[b]{0.3\linewidth}
    \includegraphics[width = \linewidth]{example-image-a}
    \caption{5}
  \end{minipage}
\end{figure}

\end{document}

这样编号就会连续。

答案2

您应该更改命令\thesubfigure 并使用 添加一些格式细节\captionsetup

也可以看看http://www.peteryu.ca/tutorials/publishing/latex_captions以获得更多选项。

\documentclass{article}
\usepackage{graphicx} % Figures
\usepackage{subcaption}
\renewcommand{\thesubfigure}{Figure \arabic{subfigure}}
\captionsetup[subfigure]{labelformat=simple, labelsep=period}


\begin{document}
    \begin{figure}[t!]
      \centering
      \begin{subfigure}[b]{0.3\linewidth}
        \includegraphics[width=\linewidth]{example-image-a}
        \caption{A1}
      \end{subfigure}
      \begin{subfigure}[b]{0.3\linewidth}
        \includegraphics[width=\linewidth]{example-image-duck}
        \caption{It's a duck}
      \end{subfigure}
      \begin{subfigure}[b]{0.3\linewidth}
        \includegraphics[width=\linewidth]{example-image-c}
        \caption{C1}
      \end{subfigure}
      \begin{subfigure}[b]{0.3\linewidth}
        \includegraphics[width=\linewidth]{example-image-duck}
        \caption{Here is a duck}
      \end{subfigure}
      \begin{subfigure}[b]{0.3\linewidth}
        \includegraphics[width=\linewidth]{example-image-b}
        \caption{B2}
      \end{subfigure}
      \begin{subfigure}[b]{0.3\linewidth}
        \includegraphics[width=\linewidth]{example-image-duck}
        \caption{The last duck}
      \end{subfigure}
      \label{fig:test}
    \end{figure}
\end{document}

在此处输入图片描述

相关内容