在同一图形环境中放置多个图形时,LATEX在编号中跳过数字

在同一图形环境中放置多个图形时,LATEX在编号中跳过数字,latex,figure,Latex,Figure,以下是我正在使用的软件包: \documentclass[twocolumn,showpacs,preprintnumbers,amsmath,amssymb,superscriptaddress]{revtex4} \usepackage{graphicx} \usepackage{bm} \usepackage{subcaption} \usepackage{SIunits} \captionsetup{justification=raggedright, singlelinecheck

以下是我正在使用的软件包:

\documentclass[twocolumn,showpacs,preprintnumbers,amsmath,amssymb,superscriptaddress]{revtex4}
\usepackage{graphicx}
\usepackage{bm} 
\usepackage{subcaption}
\usepackage{SIunits} 
\captionsetup{justification=raggedright, singlelinecheck=false}
\bibliographystyle{approve}  
为了将两个图形相邻放置,即使使用twocolumn选项,也要使用页面的全宽,我使用以下语法:

\begin{figure*}
\centering
    \begin{subfigure}[b]{0.5\textwidth}
            \includegraphics[width=\textwidth]{mfploglog_A.eps}
    \end{subfigure}%
    \begin{subfigure}[b]{0.5\textwidth}
            \includegraphics[width=\textwidth]{mfploglog.eps}
    \end{subfigure}
    \caption{XXX}\protect\label{Eloglog}
\end{figure*}   
问题在于,使用这种方法进行编号是不正确的。对于每个图形,都会跳过一个数字,就像子图形环境作为一个图形计数一样。例如,如果我在代码中只放入这个图形,它将被标记为图2

是否有人已经遇到此类问题?

不要将(或)与一起使用。您将在
.log
中注意到包和类之间存在兼容性问题。相反,将两个图像并排放置在相同的
图*
中,而不使用
子图
环境:

\documentclass[twocolumn,showpacs,preprintnumbers]{revtex4-1}

\usepackage{graphicx}

\begin{document}

\begin{figure*}
  \centering
  \includegraphics[width=.3333\linewidth]{example-image-a} \qquad
  \includegraphics[width=.3333\linewidth]{example-image-b}
  \caption{XXX}
\end{figure*}

\end{document}


如果您希望向子图添加标题,请在
表格中设置结构,并手动枚举:


但是如果您希望在每个子图形上添加标题,该怎么办?我有3个图形,每个都有子图形。它们在我的文档中显示为图1、3和5,而不是图1、2和3。
\documentclass[twocolumn,showpacs,preprintnumbers]{revtex4-1}

\usepackage{graphicx}

\begin{document}

\begin{figure*}
  \centering
  \begin{tabular}{c @{\qquad} c }
    \includegraphics[width=.3333\linewidth]{example-image-a} &
    \includegraphics[width=.3333\linewidth]{example-image-b} \\
    \small (a) Left & \small (b) Right
  \end{tabular}
  \caption{XXX}
\end{figure*}

\end{document}