我正在使用以下代码制作一个包含许多行的表格。我希望包含数字的列能够左右对齐,就像“年份”行那样。我真的很想做到这一点,而不必转到每个单元格并使用多列命令。还有其他方法吗?
我希望其中有一些东西:\begin{tabular}{l*{13}{S[table-align-text-post=false]}}
但我不知道正确的命令是什么。
\documentclass{article}
\usepackage{booktabs}
\usepackage{siunitx}
\usepackage{adjustbox}
\usepackage{graphicx}
\usepackage{rotating}
\pagestyle{empty}
\sisetup{input-symbols = ()}
\begin{document}
\begin{sidewaystable}[]
\def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi}
\caption{tbl1{tab1}}
\sisetup{table-space-text-post = \sym{***}}
\begin{adjustbox}{width=\textwidth,totalheight=\textheight,keepaspectratio}
\begin{tabular}{l*{13}{S[table-align-text-post=false]}}
\toprule
& \multicolumn{6}{c|}{FT Differential (1964-2012)} & \multicolumn{6}{c}{ Scale (1986-2012)} \\ \midrule
& \multicolumn{2}{c}{Full Sample} & \multicolumn{2}{c}{Dem} & \multicolumn{2}{c|}{Rep} & \multicolumn{2}{c}{Full Sample} & \multicolumn{2}{c}{Demo} & \multicolumn{2}{c}{Rep} \\\midrule
\textbf{V1} & \multicolumn{1}{r}{0.207} & \multicolumn{1}{l}{(3.44)} & \multicolumn{1}{r}{2.25} &\multicolumn{1}{l}{(4.69)} & -3.99 & \multicolumn{1}{l|}{(5.81)} & 32.02\sym{***} & (4.82) & 19.27\sym{**} & (6.69) & 52.75\sym{***} & (8.22) \\
\textbf{Year} & 7.27\sym{*} & (3.16) & 9.23\sym{*} & (4.52) & 3.65 & \multicolumn{1}{l|}{(5.11)} & 21.94\sym{***} & (3.97) & 19.37\sym{***} & (5.03) & 33.09\sym{***} & (7.37) \\
\bottomrule
\multicolumn{5}{l}{\footnotesize Standard errors in parentheses}\\
\multicolumn{5}{l}{\footnotesize Source: }\\
\multicolumn{5}{l}{\footnotesize \sym{*} $p<0.05$, \sym{**} $p<0.01$, \sym{***} \ ($p<0.001$}\\
\end{tabular}
\end{adjustbox}
\end{sidewaystable}
\end{document}