在同一页顶部显示四幅图

在同一页顶部显示四幅图

我在论文中放置了四幅图。我想让它们都位于同一页的顶部,并附上一条注释,就像下图左侧一样。相反,它们会像图片右侧部分一样,在一页中以四幅图的形式相互显示!在此处输入图片描述 有人可以帮我做这件事吗?

\begin{figure}
\includegraphics[scale=1, angle=0]{Files/PN3.pdf}
\caption[PN3]{(a)}
\includegraphics[scale=1, angle=0]{Files/PN4.pdf}
\caption[PN4]{(b)}
\includegraphics[scale=1, angle=0]{Files/PN5.pdf}
\caption[PN5]{(c)}
\includegraphics[scale=1, angle=0]{Files/PN6.pdf}
\caption[PN6]{(d)}
\label{fig: 2.2}
\end{figure}
\begin{enumerate}[label=(\alph*)]
\item Net is not enabled because multiplicity of read arc $<$ 2
\item Net is not enabled C $>$1
\item The net is enabled
\item The net of (c) after firing.
\end{enumerate}

答案1

\documentclass{article}
\usepackage[demo]{graphicx}
\usepackage[labelformat=parens]{subfig}
\usepackage{caption}

\usepackage[inline]{enumitem}
\usepackage{lipsum}

\begin{document}
\lipsum[1]
    \begin{figure}[t]
    \centering
\subfloat[]{\includegraphics[scale=1, angle=0]{Files/PN3.pdf}}\hfil
\subfloat[]{\includegraphics[scale=1, angle=0]{Files/PN4.pdf}}

\subfloat[]{\includegraphics[scale=1, angle=0]{Files/PN5.pdf}}\hfil
\subfloat[]{\includegraphics[scale=1, angle=0]{Files/PN6.pdf}}

\medskip
\begin{minipage}{\linewidth}
\begin{enumerate*}[label=(\alph*)]
\item Net is not enabled because multiplicity of read arc $<$ 2
\item Net is not enabled C $>$1
\item The net is enabled
\item The net of (c) after firing.
\end{enumerate*}
\end{minipage}
\caption{}
\label{fig: 2.2}
\end{figure}

\lipsum[2-4]
    \begin{figure}[t]
    \centering
\subfloat[Net is not enabled because multiplicity of read arc $<2$] {\includegraphics[scale=1, angle=0]{Files/PN3.pdf}}\hfil
\subfloat[Net is not enabled C $>1$] {\includegraphics[scale=1, angle=0]{Files/PN4.pdf}}

\subfloat[The net is enabled]{\includegraphics[scale=1, angle=0]{Files/PN5.pdf}}\hfil
\subfloat[The net of (c) after firing]{\includegraphics[scale=1, angle=0]{Files/PN6.pdf}}
\caption{}
\label{fig: 2.2}
\end{figure}

\end{document}

第一种情况:

![在此处输入图片描述

第二种情况:

![在此处输入图片描述

编辑: 我想知道,为什么你使用对包含的图像没有任何改变的\includegraphics[scale=1, angle=0]{Files/PN6.pdf}选项(不缩放也不旋转图像)并使用图像类型扩展名。扩展名是多余的,因为无需声明它们就可以找到并处理具有受支持格式(、和)的图像文件。现代的 LaTeX 安装也可以使用文件,但间接地。当然,您的图像文件必须位于您拥有文档的目录中的子目录中。scale=1, angle=0graphicx.pdf.png.jpg.epsFiles

因此上述 MWE 可以写成(仅考虑上述 MWE 的第一部分):

\documentclass{article}
\usepackage[demo]{graphicx} % in real document option "demo" had to be deleted
\usepackage[labelformat=parens]{subfig}
\usepackage{caption}

\usepackage[inline]{enumitem}
\usepackage{lipsum}

\begin{document}
\lipsum[1]
    \begin{figure}[t]
    \centering
\subfloat[]{\includegraphics{Files/PN3}}\hfil
\subfloat[]{\includegraphics{Files/PN4}}

\subfloat[]{\includegraphics{Files/PN5}}\hfil
\subfloat[]{\includegraphics{Files/PN6}}

\medskip
\begin{minipage}{\linewidth}
\begin{enumerate*}[label=(\alph*)]
\item Net is not enabled because multiplicity of read arc $<$ 2
\item Net is not enabled C $>$1
\item The net is enabled
\item The net of (c) after firing.
\end{enumerate*}
\end{minipage}
\caption{}
\label{fig: 2.2}
    \end{figure}
\end{document}

答案2

您可能想看看这个subcaption包裹。

\documentclass{article}
\usepackage{graphicx}
\usepackage{subcaption}
\usepackage{lipsum}
\begin{document}
\lipsum[1]

\begin{figure}[htb]
  \centering
  \begin{tabular}{cc}
    \subcaptionbox{A picture.\label{Picture}}[0.4\linewidth]{\includegraphics[width=0.4\linewidth]{example-image}} &
    \subcaptionbox{Picture A.\label{PictureA}}[0.4\linewidth]{\includegraphics[width=0.4\linewidth]{example-image-a}} \\
    \subcaptionbox{Picture B.\label{PictureB}}[0.4\linewidth]{\includegraphics[width=0.4\linewidth]{example-image-b}} &
    \subcaptionbox{Picture C.\label{PictureC}}[0.4\linewidth]{\includegraphics[width=0.4\linewidth]{example-image-c}}
  \end{tabular}
  \caption{Test of four pictures.\label{fig:Four}}
\end{figure}

In Figure~\ref{fig:Four} there are four picture, where Figure~\ref{Picture} is one of them. 
\lipsum[2]
\end{document}

在此处输入图片描述

相关内容