我使用以下
\documentclass[aps,pra,twocolumn]{revtex4-2}
%
\usepackage{amssymb,amsmath,amsthm}
\usepackage{caption}
\captionsetup{singlelinecheck = false}
\usepackage{graphicx}
%\usepackage{subfig}
\usepackage{overpic}
\usepackage{subcaption}
\captionsetup{compatibility=false}
\begin{document}
\begin{figure*}
%\centering
\caption{(a) The type of circuit described in Ref. [37] that allows the
recovery of 2n eigenvalues of the averaged noise channel of the
device. The random Pauli gates (blue) are used to twirl the channel and by averaging over a number of random choices of Pauli gates,
the noise channel in the device is transformed into a Pauli channel. In a similar way to randomized benchmarking, by repeating the}
\label{fig1}
\end{figure*}
\end{document}
答案1
正如 David 在评论中所说,包caption
(因此也是subcaption
) 和类revtex4-2
实际上并不兼容。通常caption
会警告:
Package caption Warning: Unknown document class (or package),
(caption) standard defaults will be used.
See the caption package documentation for explanation.
因为这。
尽管如此,为了获得想要的结果,您可以加载包ragged2e
,然后使用caption
选项justification=Justified
(注意大写J
!):
\documentclass[aps,pra,twocolumn]{revtex4-2}
%
\usepackage{amssymb,amsmath,amsthm}
\usepackage[compatibility=false]{caption}
\usepackage{graphicx}
%\usepackage{subfig}
\usepackage{overpic}
\usepackage{subcaption}
\usepackage{ragged2e}% Needed for justification=Justified (uppercase J!)
\captionsetup{singlelinecheck = false,justification=Justified}
\begin{document}
\begin{figure*}
%\centering
\caption{(a) The type of circuit described in Ref. [37] that allows the
recovery of 2n eigenvalues of the averaged noise channel of the
device. The random Pauli gates (blue) are used to twirl the channel and by averaging over a number of random choices of Pauli gates,
the noise channel in the device is transformed into a Pauli channel. In a similar way to randomized benchmarking, by repeating the}
\label{fig1}
\end{figure*}
\end{document}
但是,不要指望这将解决和组合的所有caption
问题revtex4-2
。