I'd like to center a table in the the widetext envrionment of the template revtex
, however it didn't work even if I use the command \centering
, it also keep the twocolumns state. How can I make the table centered?
What's more, I've asked the samilar question about centering a tcolorbox in that environment and the answer is just add a [width=\textwidth]
after the command \begin{tcolorbox}
, so I tried add the same command after the command \begin{table}
or \begin{tabular}
, however it returned me a lot of errors.
The following is my MWE:
\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}
Best Answer
I don't think that the
revtex
document class lets users employ\centering
inwidetext
environments in ways we might be used to doing in other LaTeX document classes. At any rate, it's not particularly difficult to make the table fit inside the width of a normal column. Oh, and I'd use anarray
environment instead of atabular
environment to save myself from having to type lots and lots of$
symbols.