如何使用附加代码中的子标题来调整文本?

如何使用附加代码中的子标题来调整文本?

我使用的是 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}

在此处输入图片描述

相关内容