如何在模板‘revtex’的宽文本环境中将表格居中?

如何在模板‘revtex’的宽文本环境中将表格居中?

我想在模板的宽文本环境中将表格居中revtex,但是即使我使用命令,它也不起作用\centering,它还保持两列状态。我怎样才能使表格居中?

此外,我曾问过类似的问题,关于在该环境中将 tcolorbox 居中,答案是在[width=\textwidth]命令后添加一个,所以我尝试在命令或\begin{tcolorbox}命令后添加相同的命令,但它返回了很多错误。以下是我的 MWE:\begin{table}\begin{tabular}

\documentclass[reprint,bibnotes,amsmath,amssymb,aps,prb,]{revtex4-2}
\usepackage{booktabs}
\usepackage{multirow}
\begin{document}

\preprint{APS/123-QED}

\title{A derivation to the article:\\Time-dependent transport in (non)interacting resonant-tunneling systems}

\maketitle
\begin{widetext}
    \centering
    \begin{table}[htbp]
      \centering
      \caption{Rules for analytic continuation}
        \begin{tabular}{ll}
        \toprule
        \multicolumn{1}{l}{Contour} & Real Axis \\
        \toprule
        \multirow{2}[0]{*}{$C=\int_CAB$} & $C^<=\int_t[A^rB^<+A^<B^a]$ \\
              & $C^r=\int_tA^rB^r$ \\
        \multirow{2}[0]{*}{$D=\int_CABC$} & $D^<=\int_t[A^rB^rC^<+A^rB^<C^a+A^<B^aC^a]$ \\
              & $D^r=\int_tA^rB^rC^r$ \\
        \multirow{2}[0]{*}{$C(\tau,\tau^\prime)=A(\tau,\tau^\prime)B(\tau,\tau^\prime)$} & $C^<(t,t^\prime)=A^<(t,t^\prime)B^<(t,t^\prime)$ \\
              & $\begin{aligned}
                C^r(t,t^\prime)=&A^<(t,t^\prime) B^r(t,t^\prime)+A^r(t,t^\prime)B^<(t,t^\prime)\\
                &+A^r(t,t^\prime)B^r(t,t^\prime)
              \end{aligned}$ \\
        \multirow{2}[0]{*}{$D(\tau,\tau^\prime)=A(\tau,\tau^\prime)B(\tau^\prime,\tau)$} & $D^<(t,t^\prime)=A^<(t,t^\prime)B^>(t^\prime,t)$ \\
              & $D^r(t,t^\prime)=A^<(t,t^\prime)B^a(t^\prime,t)+A^r(t,t^\prime)B^<(t^\prime,t)$ \\
          \bottomrule
        \end{tabular}%
      \label{tab:addlabel}%
    \end{table}%
  \end{widetext}
\end{document}

即使我使用了居中命令,表格也无法居中

答案1

我认为revtex文档类无法让用户以我们在其他 LaTeX 文档类中习惯的方式\centering在环境中使用。无论如何,让表格适合正常列的宽度并不是特别困难。哦,我会使用环境而不是环境,这样我就不用输入大量符号了。widetextarraytabular$

在此处输入图片描述

\documentclass[reprint,bibnotes,amsmath,amssymb,
               aps,prb]{revtex4-2}
\usepackage{booktabs,lipsum}

\begin{document}
\preprint{APS/123-QED}
\title{A derivation to the article: Time-dependent transport \\
in (non)interacting resonant-tunneling systems}
\maketitle

\begin{table}[htb]
\caption{Rules for analytic continuation}
$\begin{array}{@{} ll @{}}
\toprule
\text{Contour} & \text{Real Axis} \\
\midrule
C=\int_C AB
     & C^< = \int_t [A^rB^<+A^<B^a] \\ 
     \addlinespace
     & C^r = \int_t A^rB^r \\
\addlinespace[9pt]
D=\int_C ABC
     & D^< = \begin{array}[t]{@{}l@{}}
               \int_t[A^rB^rC^< +A^rB^<C^a \\
               \quad +A^<B^aC^a]
             \end{array} \\ 
     \addlinespace
     & D^r =\int_t A^rB^rC^r \\
\addlinespace[9pt]
C(\tau,\tau')=A(\tau,\tau')B(\tau,\tau')
     & C^<(t,t') = A^<(t,t')B^<(t,t') \\ 
     \addlinespace
     & C^r(t,t') =
             \begin{array}[t]{@{}l@{}}
               A^<(t,t') B^r(t,t')\\
               \quad +A^r(t,t')B^<(t,t')\\
               \quad +A^r(t,t')B^r(t,t')
             \end{array} \\
\addlinespace[9pt]
D(\tau,\tau') =A(\tau,\tau')B(\tau',\tau) 
     & D^<(t,t') = A^<(t,t')B^>(t',t) \\ 
     \addlinespace
     & D^r(t,t') = 
             \begin{array}[t]{@{}l@{}}
               A^<(t,t')B^a(t',t)\\
               \quad +A^r(t,t')B^<(t',t) 
             \end{array} \\
\bottomrule
\end{array}$
\end{table}
  
\lipsum

\end{document}

相关内容