![如何使用附加代码中的子标题来调整文本?](https://linux22.com/image/441283/%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8%E9%99%84%E5%8A%A0%E4%BB%A3%E7%A0%81%E4%B8%AD%E7%9A%84%E5%AD%90%E6%A0%87%E9%A2%98%E6%9D%A5%E8%B0%83%E6%95%B4%E6%96%87%E6%9C%AC%EF%BC%9F.png)
我使用的是 revtex4-2 格式,有 2 列。我想有 2x2 子图,每个子图都用不同的字母标记。我希望标题对齐。但是,附加的代码生成居中文本。我该如何纠正这个问题?
我知道有人建议改用 subfloat (子图子标题位于中心)。但是,我无法使用 subfloat 分别标记两个并排的图形。
\documentclass[%
reprint,
superscriptaddress,
amsmath,amssymb,
aps,
pra,
]{revtex4-2}
\usepackage[demo]{graphicx}
\usepackage{subcaption}
\usepackage{blindtext}
\begin{document}
\preprint{APS/123-QED}
\title{Some Title}
\author{First author}
\affiliation{Place 1}
\author{Second author}
\email{[email protected]}
\affiliation{Place 1}
\affiliation{Place 2}
\date{\today}
\begin{abstract}
\blindtext
\end{abstract}
\maketitle
\blindtext
\begin{figure}[t]
\includegraphics[width=0.95 \linewidth]{Figures/Aperture_image.jpg}
\caption{\blindtext}
\label{Fig:Model}
\end{figure}
\blindtext
\blindtext
\blindtext
\begin{figure}
\begin{subfigure}{0.24\textwidth}
\includegraphics[width=\linewidth]{Figures_7/S0_Ex.eps}
\caption{} \label{fig:7deg:a}
\end{subfigure}\hspace*{\fill}
\begin{subfigure}{0.24\textwidth}
\includegraphics[width=\linewidth]{Figures_7/S0_Th.eps}
\caption{} \label{fig:7deg:b}
\end{subfigure}
\medskip
\begin{subfigure}{0.24\textwidth}
\includegraphics[width=\linewidth]{Figures_7/Stokes_full_Ex.eps}
\caption{} \label{fig:7deg:c}
\end{subfigure}\hspace*{\fill}
\begin{subfigure}{0.24\textwidth}
\includegraphics[width=\linewidth]{Figures_7/Stokes_full_Th.eps}
\caption{} \label{fig:7deg:d}
\end{subfigure}
\caption{\blindtext} \label{fig:7deg}
\end{figure}
\blindtext
\blindtext
\end{document}
答案1
您会收到一个警告,即
Package caption Warning: Unknown document class (or package),
(caption) standard defaults will be used.
See the caption package documentation for explanation.
该caption
包不应与 一起使用revtex4-2
。
不过,您可以使用subfig
。
\documentclass[
reprint,
superscriptaddress,
amsmath,amssymb,
aps,
pra,
]{revtex4-2}
\usepackage[demo]{graphicx}
\usepackage[caption=false]{subfig}
\usepackage{blindtext}
\begin{document}
\preprint{APS/123-QED}
\title{Some Title}
\author{First author}
\affiliation{Place 1}
\author{Second author}
\email{[email protected]}
\affiliation{Place 1}
\affiliation{Place 2}
\date{\today}
\begin{abstract}
\blindtext
\end{abstract}
\maketitle
\blindtext
\blindtext
\begin{figure}[t]
\includegraphics[width=0.95\columnwidth]{Figures/Aperture_image.jpg}
\caption{\blindtext}
\label{Fig:Model}
\end{figure}
\blindtext
\blindtext
\blindtext
\begin{figure}
\subfloat[\label{fig:7deg:a}]{%
\includegraphics[width=0.48\columnwidth]{Figures_7/S0_Ex.eps}%
}\hspace*{\fill}%
\subfloat[\label{fig:7deg:b}]{%
\includegraphics[width=0.48\columnwidth]{Figures_7/S0_Th.eps}%
}
\medskip
\subfloat[\label{fig:7deg:c}]{%
\includegraphics[width=0.48\columnwidth]{Figures_7/Stokes_full_Ex.eps}%
}\hspace*{\fill}%
\subfloat[\label{fig:7deg:d}]{%
\includegraphics[width=0.48\columnwidth]{Figures_7/Stokes_full_Th.eps}%
}
\caption{\blindtext} \label{fig:7deg}
\end{figure}
\blindtext
\blindtext
\blindtext
\blindtext
\blindtext
\blindtext
\end{document}