表格未在页面居中

表格未在页面居中
\documentclass[12pt]{article} %
\linespread{1.5} % one-and-a-half spacing; 1.6 for double spacing
\usepackage{times}
\usepackage{lmodern}
\usepackage[margin=3cm]{geometry} % Ajusta margen hoja
\usepackage{float} % Permite opción float en Figures para las que querés fijar en una página
\usepackage{graphicx}
\usepackage{chngpage}  % Permite ajustar margenes para tablas específicas
\usepackage{geometry}
\usepackage[flushleft]{threeparttable}

\begin{document}

 \begin{table}[htbp]
        \centering
      \caption{Regressions with positive trade flows. Dependent variable: trade flows (log)}
        \scalebox{0.6}{
        \begin{tabular}{p{110}ccccccc}
        \toprule
              & (1)   & (2)   & (3)   & (4)   & (5)   & (6)   & (7) \\
                  \midrule
              &       &       &       &       &       &       &  \\
        GDP origin (log) & 1.027*** & 1.026*** & 1.017*** & 1.006*** & 1.031*** & 1.035*** & 1.025*** \\
              & (768.36) & (768.44) & (763.19) & (728.81) & (742.00) & (744.59) & (735.26) \\
              &       &       &       &       &       &       &  \\
        GDP destination (log) & 0.859*** & 0.858*** & 0.850*** & 0.850*** & 0.872*** & 0.876*** & 0.866*** \\
              & (672.51) & (672.43) & (667.15) & (641.06) & (654.84) & (657.39) & (647.66) \\
              &       &       &       &       &       &       &  \\
        Distance (log) & -1.218*** & -1.160*** & -1.049*** & -1.058*** & -1.027*** & -1.024*** & -1.021*** \\
              & (-359.45) & (-315.65) & (-268.14) & (-269.71) & (-263.32) & (-262.83) & (-263.03) \\
              &       &       &       &       &       &       &  \\
        1 for contiguity &       & 0.705*** & 0.674*** & 0.679*** & 0.496*** & 0.457*** & 0.433*** \\
              &       & (40.36) & (38.76) & (39.10) & (28.63) & (26.39) & (25.06) \\
              &       &       &       &       &       &       &  \\
        1 for free trade agreement in force &       &       & 1.137*** & 1.101*** & 1.073*** & 1.057*** & 1.074*** \\
              &       &       & (79.62) & (76.90) & (75.56) & (74.52) & (75.90) \\
              &       &       &       &       &       &       &  \\
        1 if origin is GATT/WTO &       &       &       & 0.210*** & 0.189*** & 0.193*** & 0.190*** \\
              &       &       &       & (31.70) & (28.70) & (29.41) & (29.07) \\
              &       &       &       &       &       &       &  \\
        1 if destination is GATT/WTO &       &       &       & 0.0428*** & 0.0210** & 0.0229*** & 0.0199** \\
              &       &       &       & (6.53) & (3.23) & (3.53) & (3.07) \\
              &       &       &       &       &       &       &  \\
        1 for common official of primary language &       &       &       &       & 0.782*** & 0.632*** & 0.549*** \\
              &       &       &       &       & (103.79) & (76.99) & (66.17) \\
              &       &       &       &       &       &       &  \\
        1 for common legal origin &       &       &       &       &       & 0.296*** & 0.263*** \\
              &       &       &       &       &       & (45.26) & (40.30) \\
              &       &       &       &       &       &       &  \\
        1 if current or past colonial link &       &       &       &       &       &       & 1.093*** \\
              &       &       &       &       &       &       & (60.30) \\
              &       &       &       &       &       &       &  \\
        Constant & -4.008*** & -4.525*** & -5.327*** & -5.274*** & -6.007*** & -6.176*** & -6.061*** \\
              & (-65.52) & (-72.48) & (-84.65) & (-83.84) & (-95.71) & (-98.38) & (-96.79) \\
              &       &       &       &       &       &       &  \\
            Year FE & Yes & Yes & Yes & Yes & Yes & Yes & Yes \\ 
            Observations & 624145 & 624145 & 624145 & 624145 & 624145 & 624145 & 624145 \\
            \bottomrule
        \end{tabular}}%
        \begin{tablenotes}
          \small
          \item Note: t statistics in parentheses.  * p$<$0.05  ** p$<$0.01 *** p$<$0.001
        \end{tablenotes}    
      \label{tab:tab1}%
    \end{table}%

\end{document}

答案1

只需\usepackage[flushleft]{threeparttable}改为\usepackage{threeparttable}

但是下面这一行仍然存在问题:

    \begin{tabular}{p{110}ccccccc} % <==================================110

例如将其更改为

    \begin{tabular}{p{5cm}ccccccc} % <==================================110

然后您的表格足够小,可以位于页面中央,如下面的 MWE 所示:

\documentclass[12pt]{article} %

\linespread{1.5} % one-and-a-half spacing; 1.6 for double spacing
\usepackage{times}
\usepackage{lmodern}

\usepackage[margin=3cm]{geometry} % Ajusta margen hoja
\usepackage{float} % Permite opción float en Figures para las que querés fijar en una página
\usepackage{graphicx}
\usepackage{chngpage}  % Permite ajustar margenes para tablas específicas

%\usepackage[flushleft]{threeparttable}
\usepackage{threeparttable} % <=========================================

\usepackage{booktabs} % <===============================================


\begin{document}

\begin{table}[htbp]
    \centering
  \caption{Regressions with positive trade flows. Dependent variable: trade flows (log)}
    \label{tab:tab1}%
    \scalebox{0.6}{
    \begin{tabular}{p{5cm}ccccccc} % <==================================110
    \toprule
          & (1)   & (2)   & (3)   & (4)   & (5)   & (6)   & (7) \\
              \midrule
          &       &       &       &       &       &       &  \\
    GDP origin (log) & 1.027*** & 1.026*** & 1.017*** & 1.006*** & 1.031*** & 1.035*** & 1.025*** \\
          & (768.36) & (768.44) & (763.19) & (728.81) & (742.00) & (744.59) & (735.26) \\
          &       &       &       &       &       &       &  \\
    GDP destination (log) & 0.859*** & 0.858*** & 0.850*** & 0.850*** & 0.872*** & 0.876*** & 0.866*** \\
          & (672.51) & (672.43) & (667.15) & (641.06) & (654.84) & (657.39) & (647.66) \\
          &       &       &       &       &       &       &  \\
    Distance (log) & -1.218*** & -1.160*** & -1.049*** & -1.058*** & -1.027*** & -1.024*** & -1.021*** \\
          & (-359.45) & (-315.65) & (-268.14) & (-269.71) & (-263.32) & (-262.83) & (-263.03) \\
          &       &       &       &       &       &       &  \\
    1 for contiguity &       & 0.705*** & 0.674*** & 0.679*** & 0.496*** & 0.457*** & 0.433*** \\
          &       & (40.36) & (38.76) & (39.10) & (28.63) & (26.39) & (25.06) \\
          &       &       &       &       &       &       &  \\
    1 for free trade agreement in force &       &       & 1.137*** & 1.101*** & 1.073*** & 1.057*** & 1.074*** \\
          &       &       & (79.62) & (76.90) & (75.56) & (74.52) & (75.90) \\
          &       &       &       &       &       &       &  \\
    1 if origin is GATT/WTO &       &       &       & 0.210*** & 0.189*** & 0.193*** & 0.190*** \\
          &       &       &       & (31.70) & (28.70) & (29.41) & (29.07) \\
          &       &       &       &       &       &       &  \\
    1 if destination is GATT/WTO &       &       &       & 0.0428*** & 0.0210** & 0.0229*** & 0.0199** \\
          &       &       &       & (6.53) & (3.23) & (3.53) & (3.07) \\
          &       &       &       &       &       &       &  \\
    1 for common official of primary language &       &       &       &       & 0.782*** & 0.632*** & 0.549*** \\
          &       &       &       &       & (103.79) & (76.99) & (66.17) \\
          &       &       &       &       &       &       &  \\
    1 for common legal origin &       &       &       &       &       & 0.296*** & 0.263*** \\
          &       &       &       &       &       & (45.26) & (40.30) \\
          &       &       &       &       &       &       &  \\
    1 if current or past colonial link &       &       &       &       &       &       & 1.093*** \\
          &       &       &       &       &       &       & (60.30) \\
          &       &       &       &       &       &       &  \\
    Constant & -4.008*** & -4.525*** & -5.327*** & -5.274*** & -6.007*** & -6.176*** & -6.061*** \\
          & (-65.52) & (-72.48) & (-84.65) & (-83.84) & (-95.71) & (-98.38) & (-96.79) \\
          &       &       &       &       &       &       &  \\
        Year FE & Yes & Yes & Yes & Yes & Yes & Yes & Yes \\ 
        Observations & 624145 & 624145 & 624145 & 624145 & 624145 & 624145 & 624145 \\
        \bottomrule
    \end{tabular}}%
    \begin{tablenotes}
      \small
      \item Note: t statistics in parentheses.  * p$<$0.05  ** p$<$0.01 *** p$<$0.001
    \end{tablenotes}    
\end{table}%

\end{document}

结果如下:

在此处输入图片描述

如果可能的话,我建议不要使用\scalebox{0.6}该表......

请注意,我已将命令移动到\label\caption所属的位置...并且我将缺失的包添加booktabs到 MWE。

相关内容