景观表超出边距

景观表超出边距

使用@mico 最近的建议,我在使用长表时遇到了问题,它超出了使用 \documentclass[12pt,notitlepage]{article} 和 \topmargin=-1.0cm \textheight=23.8cm \oddsidemargin=-0.3cm \evensidemargin=-0.0cm \textwidth=17.1cm 的范围

这是我的代码和输出:


\documentclass[12pt,notitlepage]{article}

%------------------------------------
% PACKAGES
%-------------------------------------
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{pdflscape}
\usepackage{tabularx}
\usepackage{longtable}
\usepackage{blindtext}
\usepackage[english]{babel}
\usepackage{lmodern}
\usepackage{textcomp}
\usepackage{mathtools, cuted}
\usepackage{cuted}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{newpxtext}
\usepackage[font={large,bf}]{caption} 
\usepackage{setspace}
\usepackage{threeparttable}  
\usepackage{tabulary}
\usepackage{booktabs}
\usepackage{float}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{rotating}
\usepackage[titletoc,title]{appendix}
\usepackage{array,multirow}
\usepackage[round]{natbib}


%%%%%% asterisk in Table %%%%%%%%%%%%%%%%%%
\usepackage{xcolor}
\newcommand\tc[1]{\textcolor{blue}{#1}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\bibpunct{(}{)}{;}{a}{,}{;}
\setcounter{MaxMatrixCols}{10}

\topmargin=-1.0cm \textheight=23.8cm \oddsidemargin=-0.3cm
\evensidemargin=-0.0cm \textwidth=17.1cm

%% new:
\usepackage{collcell}
\makeatletter
%% 'g' for 'gobble':
\newcolumntype{g}{>{\collectcell\@gobble}c<{\endcollectcell}}
\makeatother








\begin{document}
\begin{landscape}
%\texttt{}\begin{sidewaystable}[!ht]
\small
\centering
\begin{threeparttable}
\caption{Main effects of sanctions on Global sectoral indices}
    \label{tab:table_1}

 \begin{tabular}{@{} l *{2}{wc{2.5cm}}g *{2}{*{2}{wc{2cm}}g} @{}}
\toprule
  & \multicolumn{2}{c}{\textbf{Episodes sanctions \#2011}}& 
  & \multicolumn{2}{c}{\textbf{Episodes sanctions \#2019}}     &
  & \multicolumn{2}{c}{\textbf{Episodes sanctions \#2022}}\\
  & \multicolumn{2}{c}{SPX vs. SHC} &
  & \multicolumn{2}{c}{SPX vs. SHC }  &
  & \multicolumn{2}{c}{SPX vs. MOEX}\\
  \cmidrule(lr){2-3} \cmidrule(lr){5-6} \cmidrule(l){8-10}
  &\multicolumn{1}{c}{(1)}&\multicolumn{1}{c}{(2)}&
  &\multicolumn{1}{c}{(1)}&\multicolumn{1}{c}{(2)}&
  &\multicolumn{1}{c}{(1)}&\multicolumn{1}{c}{(2)}&\\
  \cmidrule[\lightrulewidth](l){2-10}
  ARMA-GARCH. & & & \\ 
  \hspace{5mm}{1991--1997}& & & & & & & & & \\
  \addlinespace 
   
    \textbf{Constant for mean equation: $\alpha$} &0.000 & 0.000&    &        -0.000   &      -0.000 &          & -0.008\tc{***}  & -0.001   & \\
                                               & (0.001)& (0.001)& &     (0.001)   &     (0.001)   &        &(0.002)& (0.002)   & \\                                     
                                                                        $\phi_{1}$   &    &   &               &              &  &   &  -0.166\tc{***}&  -0.147 & \\
                                               &    &  &                &              &    &   & (0.051)&(0.408) & \\
                                      
                                                                            
                                                                            $\phi_{2}$ &    &   &                &     0.009           &  0.772\tc{**}  &   & & & \\
                                               &    &  &                &     (0.033)             &  (0.352)  &   & & & \\
                                      
                                      $\theta_{1}$ &      &  &                &                &   &      &0.563\tc{***} & 0.336 & \\
                                               &     &      &                 &                 &    &  &(0.016)&(0.363)  & \\
                                      
                                                                            $\theta_{2}$ &  0.012      &   0.024  &                &                &  -0.736\tc{*}  &    & & & \\
                                               &  (0.076)   & (0.078)     &                 &                 & (0.376)    &  && & \\

  \addlinespace 
  \textbf{Constant for the variance equation: $\omega$} &    0.000\tc{***}   &    -9.305\tc{***}  & 0.000\tc{***}   &0.000\tc{***} & -10.686\tc{***}  & &  0.001\tc{***}& -7.040\tc{***} & \\
                                                        &    (0.000)          &   (0.128)          & (0.000)    &  (0.000)&(0.467)  & &(0.000) & (0.202) & \\
                                              
                                                                                            $\Phi_{1}$ &   &    &    &         &          &             &    1.998\tc{***}     &  0.322\tc{***}    &    \\
                                                       & &  &   &         &          &             &    (0.253)      & (0.036)    &        \\ 
                                   
                                                                                            $\Phi_{16}$ &   &  0.006   &    &         &          &             &        &    &    \\
                                                       & & (0.062) &   &         &          &             &          &    &      \\
                                              
                                                                                            $\Phi_{22}$ &    &   0.016    &    &  &      0.151\tc{***}    &            &     &     &     \\
                                                         &     &    (0.046)  &   &  &    (0.048)    &     &           &   &     \\
                                                                                                                
                                                                                            $\Theta_{1}$ &&    &  &          &   0.591\tc{***}  &   &  0.582\tc{***}      &0.593\tc{***} & \\
                                                        &&   & &          &   (0.149)  &     &  (0.048)  &(0.058)  & \\
  \addlinespace 
  \textbf{Sanction}           &   &  -0.659\tc{***}    &   & &0.206\tc{**} & & &  1.382\tc{***} &  \\\
                              &   &  (0.215)   &   & & (0.175)& & &(0.116) & \\
      
            Currency Sanctions =   $11jul \_2011$ til $18 oct \_2011$ &  &0.183   & &     &        &         & & 1.519\tc{***} & \\
                                                     &   & (0.507)& &  &        &       & &(0.124)  & \\
     
        Black Monday = $01 aug \_2011$ til $15 aug \_2011$ & &    & & & 0.151  & &  &     -1.896\tc{***}&      \\
                                                     & &  &  & &(0.219)   & &     &  (0.157)   &     \\
     
        Debt Debate= $13 may \_2011$ til $01 aug \_2011$ & &    0.211& & &  -0.181 & &   &  &      \\
                                                     & &(0.203) & & &(0.273)  & &     &     &     \\
 \addlinespace 
  \textbf{L-L elast. (emp. shares)}& &  &  &   &        &        &        &        &        \\
    N        &              258&  258&       &        511&        511&        &         466 &         466 &       \\
   AIC         & -1681.149 & -1680.206  &       &     -3231.076  &        -3259.866 &       &        -1739.233 &       -1825.872 &       \\
    BIC        & -1670.490  & -1651.782   &        &      -3218.367 &      -3221.739  &        &      -1718.512 &       -1788.574 &        \\
  \addlinespace 
  \textbf{ Ljung-Box Q-Statistics}& & & &      &       &       &      &       &      \\
     $Q(40)$         &        30.922&       33.7&       &       30.922&        33.7&        &        30.922&        33.7&        \\
   $ Q(40)^2 $       & 21.3&34.46&      &       21.3&       34.46&      &       21.3&        34.46&      \\
\bottomrule
\end{tabular}

\footnotesize\smallskip
Source: Standard errors in parenthese $\tc{*}$ $\(p<.10\)$, $\tc{**}$ $\(p<.05\)$, $\tc{***}$ $\(p<.01\)$. The $\phi$ are AR coefficients, the $\theta$ are MA coefficients, the $\Phi$ are ARCH coefficients, and $\Theta$ the are GARCH coefficients. $\alpha$ is the constant for mean equation and $\omega$ is the constant for the variance equation. The Ljung-Box Q-Statistics for the $40$ lags of the standardized residuals $(Q(40))$ and the squared standardized residuals $(Q(40)^2)$ are presented in the bottom panel. 

\end{threeparttable}
%\end{sidewaystable}
\end{landscape}
\end{document}



在此处输入图片描述

答案1

  • 你需要某种可以跨越多页的长表
  • 其中我会选择longtblr套餐tabularray
  • 您定义了 10 列,其中 3 列为空。删除它们!
  • 对于数字我会使用'siunitx 包
  • 在您的序言中,一些包被加载两次(带有不同的选项!)。
  • 请在将来提供 MWE(最小工作示例)。在其中的序言中加载包并定义与您的问题相关的新宏/命令。我注释了所有不需要的包和命令定义
  • 在表格中我发现写作很有帮助,如果已经在编辑器中尝试模仿表格格式。

因此,您的表的 MWE 可以是:

\documentclass[12pt,notitlepage]{article}
\usepackage[a4paper,
            hmargin=2cm, vmargin=3cm]{geometry}
%\topmargin=-1.0cm \textheight=23.8cm \oddsidemargin=-0.3cm
%\evensidemargin=-0.0cm \textwidth=17.1cm
\usepackage{blindtext}

%------------------------------------
% PACKAGES
%-------------------------------------
\usepackage[english]{babel}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{textcomp}
\usepackage{newpxtext}
%\usepackage{amsmath, amssymb, amsthm}  % amsmath is loaded by mathtools
%\usepackage{mathtools}
%\setcounter{MaxMatrixCols}{10}

\usepackage{pdflscape}
%\usepackage{array, multirow}
%\usepackage{tabularx}
%\usepackage{tabulary}
%\usepackage{longtable}
%\usepackage{threeparttable}
\usepackage{tabularray}     %   NEW
\UseTblrLibrary{booktabs,   %   NEW, load package booktabs
                siunitx,    %   NEW, load siunitx package
                }
\sisetup{
    table-align-text-after = false, % <---
    table-align-text-before= false, % <---
    input-open-uncertainty =,
    input-close-uncertainty=,
         }

%                varwidth}   %   NEW, tabularray specific
%\usepackage[font={large,bf}]{caption}
%\usepackage{setspace}
%\usepackage{float}
%\usepackage{cuted}
%\usepackage{caption}   & surplus, loaded second time
%\usepackage{subcaption}
%\usepackage{rotating}
%\usepackage[titletoc,title]{appendix}
%\usepackage[round]{natbib}
%\bibpunct{(}{)}{;}{a}{,}{;}

%%%%%% asterisk in Table %%%%%%%%%%%%%%%%%%
\usepackage{xcolor}
\newcommand\tc[1]{\textcolor{blue}{#1}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% new:
%\usepackage{collcell}
%\makeatletter
%% 'g' for 'gobble':
%\newcolumntype{g}{>{\collectcell\@gobble}c<{\endcollectcell}}
%\makeatother

\begin{document}
    \begin{landscape}
%\small
%\centering
    \begin{longtblr}[
caption = {Main effects of sanctions on Global sectoral indices},
  label = {tab:table_1},
remark{Source} ={Standard errors in parentheses 
    \tc{*}: \(p<.10\),\quad \tc{**}: \(p<.05\),\quad \tc{***}: \(p<.01\). 
The $\phi$ are AR coefficients, the $\theta$ are MA coefficients, the $\Phi$ are ARCH coefficients, and $\Theta$ the are GARCH coefficients. $\alpha$ is the constant for mean equation and $\omega$ is the constant for the variance equation. The Ljung-Box Q-Statistics for the $40$ lags of the standardized residuals $(Q(40))$ and the squared standardized residuals $(Q(40)^2)$ are presented in the bottom panel.}
                ]{colsep=3pt,
                 colspec = {X[l] *{6}{Q[c, si={table-format=-4.3{***}}]}},
                 row{1} = {font=\bfseries, c, guard},
                 row{2,3} = {guard},
                 rowhead=3
                 }
    \toprule
    &   \SetCell[c=2]{c}    Episodes sanctions\#2011
        &   &   \SetCell[c=2]{c}    Episodes sanctions \#2019
                &   & \SetCell[c=2]{c}  Episodes sanctions \#2022
                        &                                                       \\
    &   \SetCell[c=2]{c}    PX vs. SHC
        &   &   \SetCell[c=2]{c}    SPX vs. SHC
                &   &   \SetCell[c=2]{c}    SPX vs. MOEX
                        &                                                       \\
% table body
    \cmidrule[r]{2-3} \cmidrule[lr]{4-5} \cmidrule[l]{6-7}
    & (1)   & (2)   & (1)   & (2)   & (1)   & (2)                               \\
    \midrule[\lightrulewidth]
ARMA-GARCH. {1991--1997}
    &           &           &           &           &           &               \\
  \addlinespace
\textbf{Constant for mean equation:} $\alpha$
    & 0.000     & 0.000     & -0.000    & -0.000    & -0.008\tc{***}    
                                                                & -0.001        \\
    & (0.001)   & (0.001)   & (0.001)   & (0.001)   & (0.002)   & (0.002)       \\
$\phi_{1}$   
    &           &           & -0.166\tc{***}    
                                        &  -0.147   &           &               \\
    &           &           & (0.051)   & (0.408)   &           &               \\
$\phi_{2}$ 
    &           &           & 0.009     & 0.772\tc{**}      &   &               \\
    &           &           & (0.033)   &  (0.352)  &           &               \\
$\theta_{1}$ 
    &           &           &           &           & 0.563\tc{***} 
                                                                & 0.336         \\
    &           &           &           &           & (0.016)   &(0.363)        \\
$\theta_{2}$ 
    &  0.012    &   0.024   &           & -0.736\tc{*}      &   &               \\
    &  (0.076   & (0.078)   &           & (0.376)   &           &               \\
    \addlinespace
\textbf{Constant for the variance equation:} $\omega$ 
    & 0.000\tc{***} 
                & -9.305\tc{***}  
                            & 0.000\tc{***}   
                                        & -10.686\tc{***}  
                                                    &  0.001\tc{***}    
                                                                & -7.040\tc{***}\\
    & (0.000)   & (0.128)   & (0.000)   & (0.467)   &(0.000)    & (0.202)       \\
$\Phi_{1}$ 
    &           &           &           &           & 1.998\tc{***}     
                                                                & 0.322\tc{***} \\
    &           &           &           &           & (0.253)   & (0.036)       \\
$\Phi_{16}$ 
    &           & 0.006     &           &           &           &               \\
    &           & (0.062)   &           &           &           &               \\
$\Phi_{22}$ 
    &           & 0.016     &           & 0.151\tc{***} &       &               \\
    &           & (0.046)   &           & (0.048)   &           &               \\
$\Theta_{1}$ 
    &           &           &           & 0.591\tc{***}  
                                                    & 0.582\tc{***}
                                                                & 0.593\tc{***} \\
    &           &           &           & (0.149)   & (0.048)   & (0.058)       \\
  \addlinespace
\textbf{Sanction}           
    &           & -0.659\tc{***}
                            &           & 0.206\tc{**}  &       & 1.382\tc{***} \\
    &           & (0.215)   &           & (0.175)   &           & (0.116)       \\
Currency Sanctions:  11 jul 2011 til 18 oct 2011
    &           & 0.183     &           &           &           & 1.519\tc{***} \\
    &           & (0.507)   &           &           &           & (0.124)       \\
Black Monday: 01 aug 2011 til 15 aug 2011
    &           &           &           & 0.151     &           & -1.896\tc{***}\\
    &           &           &           & (0.219)   &           &  (0.157)      \\
Debt Debate: 13 may 2011 til 01 aug 2011
    &       & 0.211         &           &  -0.181   &           &               \\
    &       & (0.203)       &           & (0.273)   &           &               \\
    \addlinespace
\textbf{L-L elast. (emp. shares)}
   &        &           &           &           &               &               \\
 N        
    & 258   & 258       & 511       & 511       & 466           & 466           \\
 AIC         
    & -1681.149 
            & -1680.206 & -3231.076 & -3259.866 & -1739.233     & -1825.872     \\
 BIC        
    & -1670.490
            & -1651.782 & -3218.367 & -3221.739 & -1718.512     & -1788.574     \\
    \addlinespace
\textbf{Ljung-Box Q-Statistics}
    &       &           &           &           &               &               \\
$Q(40)$
    & 30.922& 33.7      & 30.922    & 33.7      & 30.922        & 33.7          \\
$Q(40)^2$       
    & 21.3  &34.46      & 21.3      & 34.46     & 21.3          & 34.46         \\
    \bottomrule
\end{longtblr}
    \end{landscape}
\end{document}

\end{longtblr}
    \end{landscape}
\end{document}

在此处输入图片描述

附录: 您可能喜欢将数据行与标准误差和 PS vs. SHC 列分组(以便更好地阅读)。除此之外,您可能考虑重新设计列标题。我建议删除重复的文本“Episodes 制裁”和“PX vs. SHC”。

\documentclass[12pt,notitlepage]{article}
\usepackage[a4paper,
            hmargin=2cm, vmargin=3cm]{geometry}
%---------------------------------------------------------------%
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{textcomp}
\usepackage{newpxtext}

\usepackage{pdflscape}
\usepackage{xcolor}
\newcommand\tc[1]{\textcolor{blue}{#1}}
\usepackage{tabularray}     %   NEW
\UseTblrLibrary{booktabs,   %   NEW, load package booktabs
                siunitx,    %   NEW, load siunitx package
                }
\sisetup{
    table-align-text-before= false, 
    input-open-uncertainty =,
    input-close-uncertainty=,
         }


\begin{document}
    \begin{landscape}
%\small
\SetTblrStyle{caption}{font=\large\bfseries}
\SetTblrStyle{conthead}{font=\large\bfseries}
    \begin{longtblr}[
caption = {Main effects of sanctions on Global sectoral indices},
  label = {tab:table_1},
remark{Source} ={Standard errors in parentheses
    \tc{*}: \(p<.10\),\quad \tc{**}: \(p<.05\),\quad \tc{***}: \(p<.01\).
The $\phi$ are AR coefficients, the $\theta$ are MA coefficients, the $\Phi$ are ARCH coefficients, and $\Theta$ the are GARCH coefficients. $\alpha$ is the constant for mean equation and $\omega$ is the constant for the variance equation. The Ljung-Box Q-Statistics for the $40$ lags of the standardized residuals $(Q(40))$ and the squared standardized residuals $(Q(40)^2)$ are presented in the bottom panel.}
                ]{column{2-Y}= {colsep=-3pt},
                 column{3,5} = {rightsep=18pt},
                 colspec = {@{} X[l] *{6}{Q[c, si={table-format=-4.3{$^{***}$}}]} @{}},
                 row{1} = {font=\bfseries, c, guard},
                 row{2,3} = {guard},
                 row{4-Y} = {rowsep = 0pt},
                 row{even[5-Z]} = {belowsep=5pt},
                 rowhead=3
                 }
    \toprule
    &   \SetCell[c=6]{c}    {Episodes sanctions: PX vs. SHC}
        &   &   &   &   &                                                       \\
    &   \SetCell[c=2]{c}    \# 2011
        &   &   \SetCell[c=2]{c}    \# 2019
                &   &   \SetCell[c=2]{c}    \# 2022
                        &                                                       \\
% table body
    \cmidrule[r]{2-3} \cmidrule[lr]{4-5} \cmidrule[l]{6-7}
    & (1)   & (2)   & (1)   & (2)   & (1)   & (2)                               \\
    \midrule[\lightrulewidth]
ARMA-GARCH. {1991--1997}
    &           &           &           &           &           &               \\
\textbf{Constant for mean equation:} $\alpha$
    & 0.000     & 0.000     & -0.000    & -0.000    & -0.008\tc{***}
                                                                & -0.001        \\
    & (0.001)   & (0.001)   & (0.001)   & (0.001)   & (0.002)   & (0.002)       \\
$\phi_{1}$
    &           &           & -0.166\tc{***}
                                        &  -0.147   &           &               \\
    &           &           & (0.051)   & (0.408)   &           &               \\
$\phi_{2}$
    &           &           & 0.009     & 0.772\tc{**}      &   &               \\
    &           &           & (0.033)   &  (0.352)  &           &               \\
$\theta_{1}$
    &           &           &           &           & 0.563\tc{***}
                                                                & 0.336         \\
    &           &           &           &           & (0.016)   &(0.363)        \\
$\theta_{2}$
    &  0.012    &   0.024   &           & -0.736\tc{*}      &   &               \\
    &  (0.076   & (0.078)   &           & (0.376)   &           &               \\
\textbf{Constant for the variance equation:} $\omega$
    & 0.000\tc{***}
                & -9.305\tc{***}
                            & 0.000\tc{***}
                                        & -10.686\tc{***}
                                                    &  0.001\tc{***}
                                                                & -7.040\tc{***}\\
    & (0.000)   & (0.128)   & (0.000)   & (0.467)   &(0.000)    & (0.202)       \\
$\Phi_{1}$
    &           &           &           &           & 1.998\tc{***}
                                                                & 0.322\tc{***} \\
    &           &           &           &           & (0.253)   & (0.036)       \\
$\Phi_{16}$
    &           & 0.006     &           &           &           &               \\
    &           & (0.062)   &           &           &           &               \\
$\Phi_{22}$
    &           & 0.016     &           & 0.151\tc{***} &       &               \\
    &           & (0.046)   &           & (0.048)   &           &               \\
$\Theta_{1}$
    &           &           &           & 0.591\tc{***}
                                                    & 0.582\tc{***}
                                                                & 0.593\tc{***} \\
    &           &           &           & (0.149)   & (0.048)   & (0.058)       \\
\textbf{Sanction}
    &           & -0.659\tc{***}
                            &           & 0.206\tc{**}  &       & 1.382\tc{***} \\
    &           & (0.215)   &           & (0.175)   &           & (0.116)       \\
Currency Sanctions:  11 jul 2011 til 18 oct 2011
    &           & 0.183     &           &           &           & 1.519\tc{***} \\
    &           & (0.507)   &           &           &           & (0.124)       \\
Black Monday: 01 aug 2011 til 15 aug 2011
    &           &           &           & 0.151     &           & -1.896\tc{***}\\
    &           &           &           & (0.219)   &           &  (0.157)      \\
Debt Debate: 13 may 2011 til 01 aug 2011
    &       & 0.211         &           &  -0.181   &           &               \\
    &       & (0.203)       &           & (0.273)   &           &               \\
\textbf{L-L elast. (emp. shares)}
    &        &           &           &           &               &               \\
\SetRow{guard}
 N
    & 258   & 258       & 511       & 511       & 466           & 466           \\
AIC
    & -1681.149
            & -1680.206 & -3231.076 & -3259.866 & -1739.233     & -1825.872     \\
  \addlinespace
BIC
    & -1670.490
            & -1651.782 & -3218.367 & -3221.739 & -1718.512     & -1788.574     \\
\textbf{Ljung-Box Q-Statistics}
    &       &           &           &           &               &               \\
$Q(40)$
    & 30.922& 33.7      & 30.922    & 33.7      & 30.922        & 33.7          \\
$Q(40)^2$
    & 21.3  &34.46      & 21.3      & 34.46     & 21.3          & 34.46         \\
    \bottomrule
\end{longtblr}
    \end{landscape}
\end{document}

在此处输入图片描述

相关内容