以下是我正在使用的包裹:
\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。
有人已经遇到过这种问题吗?
答案 0 :(得分:3)
不要将caption
package(或subcaption
)与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}