[英]LATEX skips numbers in numbering when putting several figures in the same figure environment
这是我正在使用的包:
\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。
有人已经遇到过这种问题吗?
不要将caption
包 (或subcaption
caption
)与revtex4-1
一起revtex4-1
。 你会在.log
中注意到包和类之间存在兼容性问题。 相反,将两个图像并排放置在同一figure*
而不使用子subfigure
环境:
\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}
如果要为子图添加标题,请在tabular
设置构造并手动枚举它们:
\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}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.