将图标题 (a) ... (e) 更改为图 1、...、图 5

将图标题 (a) ... (e) 更改为图 1、...、图 5
\documentclass{article}
\usepackage{graphicx,subcaption}
\begin{document}
\begin{figure}[h!]
    \centering
    \begin{subfigure}{4.4cm}
        \centering
        \includegraphics[height=3.3cm, width=4.4cm]{example-image}
        \caption{...}
    \end{subfigure}%
\begin{subfigure}{4.4cm}
    \centering
    \includegraphics[height=3.3cm, width=4.4cm]{example-image}
    \caption{...}
\end{subfigure}%
\\
\begin{subfigure}{4.4cm}
    \centering
    \includegraphics[height=3.3cm, width=4.4cm]{example-image}
    \caption{...}
\end{subfigure}%
\begin{subfigure}{4.4cm}
    \centering
    \includegraphics[height=3.3cm, width=4.4cm]{example-image}
    \caption{...}
\end{subfigure}
\\
\begin{subfigure}{4.4cm}
    \centering
    \includegraphics[height=3.3cm, width=4.4cm]{example-image}
    \caption{...}
\end{subfigure}%
    %\caption{Graph trajectories of $S$, $E$, $I$, $R$, $B$ at $R_0<1$}
    \label{fig2}
\end{figure}
\end{document}

我想将标题 (a)、(b)、...、(e) 更改为图 1.、图 2.、...、图 5。该怎么做?我想要与图片相同的布局图,所以我使用子图。但我不知道如何更改标题。

在此处输入图片描述

答案1

使用可用的子标题参数:

\documentclass{article}
\usepackage{graphicx,subcaption}
\renewcommand\thesubfigure{Figure\space\arabic{subfigure}}
\captionsetup[subfigure]{labelformat=simple}
\begin{document}
    \begin{figure}[h!]
        \centering
        \begin{subfigure}{4.4cm}
            \centering
            \includegraphics[height=3.3cm, width=4.4cm]{example-image}
            \caption{...}
        \end{subfigure}%
        \begin{subfigure}{4.4cm}
            \centering
            \includegraphics[height=3.3cm, width=4.4cm]{example-image}
            \caption{...}
        \end{subfigure}%
        \\
        \begin{subfigure}{4.4cm}
            \centering
            \includegraphics[height=3.3cm, width=4.4cm]{example-image}
            \caption{...}
        \end{subfigure}%
        \begin{subfigure}{4.4cm}
            \centering
            \includegraphics[height=3.3cm, width=4.4cm]{example-image}
            \caption{...}
        \end{subfigure}
        \\
        \begin{subfigure}{4.4cm}
            \centering
            \includegraphics[height=3.3cm, width=4.4cm]{example-image}
            \caption{...}
        \end{subfigure}%
        %\caption{Graph trajectories of $S$, $E$, $I$, $R$, $B$ at $R_0<1$}
        \label{fig2}
    \end{figure}
\end{document}

在此处输入图片描述

答案2

只需使用minipage而不是subfigure,例如:

\documentclass{article}
\usepackage{graphicx}
\begin{document}
\begin{figure}[h!]
    \centering
    \begin{minipage}{4.4cm}
        \centering
        \includegraphics[height=3.3cm, width=4.4cm]{example-image}
        \caption{...}
    \end{minipage}%
    \begin{minipage}{4.4cm}
        \centering
        \includegraphics[height=3.3cm, width=4.4cm]{example-image}
        \caption{...}
    \end{minipage}%
    \\[15pt]
    \begin{minipage}{4.4cm}
        \centering
        \includegraphics[height=3.3cm, width=4.4cm]{example-image}
        \caption{...}
    \end{minipage}%
    \begin{minipage}{4.4cm}
        \centering
         \includegraphics[height=3.3cm, width=4.4cm]{example-image}
        \caption{...}
    \end{minipage}
    \\[15pt]
    \begin{minipage}{4.4cm}
        \centering
        \includegraphics[height=3.3cm, width=4.4cm]{example-image}
        \caption{...}
    \end{minipage}%
    %\caption{Graph trajectories of $S$, $E$, $I$, $R$, $B$ at $R_0<1$}
    %\label{fig2}
\end{figure}
\end{document}

虽然 NBur 的答案使用每个图对子图进行计数,但该解决方案使用全局figure计数器来标记它们。

相关内容