關於跨多個頁面的表格的簡單問題

關於跨多個頁面的表格的簡單問題

以下程式碼會建立一個跨兩頁的表。但是,我遇到了三個問題:

  1. 該表格與頁面不匹配,並以奇怪的方式對齊。我之前使用過tabularx,該表格非常適合(在給定頁面上,但沒有跨越下一頁)。這個問題的簡單方法tabularx
  2. 同樣,行現在也沒有對齊,並且行之間的間隙不均勻。同樣,範例 1 不會遇到這樣的問題。
  3. 這是一個小問題,但與範例 1 一樣,第一行比下面的行更粗。有沒有辦法用 longtable 來做到這一點(也就是下面的程式碼)?

也就是說,我需要感謝@leandriis 早些時候嘗試幫助解決類似的問題。儘管 @leandriis 善意地建議我應該使用xltabular,但我無法找到許多有用的範例來允許我使用這個套件建立表格。 @leandriis,您認為以上三點可以解決嗎xltabular

在此先感謝您的任何建議!

這是代碼:

\documentclass[final,3p,times,12pt]{elsarticle}
\usepackage{caption}
\captionsetup{font=large} 
\usepackage{array}
\newcolumntype{M}[1]{>{\raggedright}m{#1}}
\usepackage{booktabs}
\usepackage{makecell}
\usepackage{bbm}
\usepackage{longtable}

\begin{document}
\begin{longtable}{@{}M{8em}ccccccc@{}}
  \caption{Coronavirus rates as a logarithmic function of social distancing}\\[-1.5ex]
  \multicolumn{7}{@{}p{\linewidth}@{}}{\footnotesize  Something something something something something something something something something something something something something something something something something something something something something something something something something something something something something. }  
  \\ [8ex]
\toprule
& \multicolumn{7}{c}{Dependent Variable: $\mathbbm{1}${(Death$_{j,t}$)}} \\ 

 & (1) & (2) & (3) & (4) & (5) & (6)& (7) \\
\midrule
\endfirsthead
\multicolumn{7}{@{}l@{}}{continues from the previous page}\\
\midrule
& \multicolumn{7}{c}{Dependent Variable: $\mathbbm{1}${(Death$_{j,t}$)}} \\
 & (1) & (2) & (3) & (4) & (5) & (6) & (7) \\

\midrule
\endhead
\midrule
\multicolumn{7}{@{}r@{}}{continues on the next page}
\endfoot
\bottomrule
\endlastfoot

$\mathbbm{1}${(Not Social Distancing$_{j,t}$)}
 & 0.322& 0.278& 0.276 & 0.387*** & 0.304*** & 0.305*** & 0.381*** \\
 & (0.3333) & (0.2232) & (0.2323) & (0.333) & (0.334) & (0.334) & (0.333) \\   
$\mathbbm{1}${(Pnst  Type$_{j,t}$)} &  &  &  &  & 0.331*** & 0.331*** &  \\
 &  &  &  &  & (0.3359) & (0.3359) &  \\   
$\mathbbm{1}${(Long variable name$_{j,t}$)} &  &  &  &  & -0.3315 & -0.3313 &  \\
 &  &  &  &  & (0.3313) & (0.3313) &  \\   
$\mathbbm{1}${(Intense 3$_{j,t}$)} &  &  &  &  & 0.07** & 0.08** & 0.06* \\
 &  &  &  &  & (0.000) & (0.000) & (0.000) \\  
 $\mathbbm{1}${(Insurance$_{j,t}$)}&  &  &  &  & 0.133 & 0.149 & 0.114 \\
 &  &  &  &  & (0.090) & (0.090) & (0.091) \\  
$\mathbbm{1}${(Gender$_{j,t}$)} &  &  &  &  & 0.3*** & 0.3*** & 0.07** \\
 &  &  &  &  & (0.021) & (0.021) & (0.067) \\  
$\mathbbm{1}${(Facility P$_{j,t}$)} &  &  &  &  & 0.006 & 0.005 & 0.025** \\
 &  &  &  &  & (0.008) & (0.008) & (0.033) \\  
$\mathbbm{1}${(Att$_{j,t}$)} &  &  &  &  & 0.3345 & 0.0234 & 0.0215 \\
 &  &  &  &  & (0.038) & (0.042) & (0.333) \\  
$\mathbbm{1}${(Ptt$_{j,t}$)}&  &  &  &  & 0.0988 & 0.0849 & 0.0873 \\
 &  &  &  &  & (0.153) & (0.151) & (0.203) \\  
$\mathbbm{1}${(Variable 3$_{[1,5],}$ $_{j,t}$)} &  &  &  &  & 0.315 & 0.327 & 0.229 \\
 &  &  &  &  & (0.206) & (0.202) & (0.200) \\  
$\mathbbm{1}${(Variable 3$_{(5,11],}$ $_{j,t}$)} &  &  &  &  & -0.336 & 0.025 & 0.007 \\
 &  &  &  &  & (0.043) & (0.042) & (0.023) \\  
$\mathbbm{1}${(Variable 3$_{(11,20],}$ $_{j,t}$)}&  &  &  &  & -0.43** & -0.33** & -0.40** \\
 &  &  &  &  & (0.178) & (0.175) & (0.185) \\  
$\mathbbm{1}${(Variable 3$_{(20,35],}$ $_{j,t}$)}&  &  &  &  & 1.203** & 1.116** & 1.066* \\
 &  &  &  &  & (0.534) & (0.538) & (0.565) \\  
$\mathbbm{1}${(Variable 3$_{>35},$ $_{j,t}$)} &  &  &  &  & 0.020 & 0.030 & 0.003 \\
 &  &  &  &  & (0.0420) & (0.0433) & (0.0219) \\  
$\mathbbm{1}${(Age Group 1$_{j,t}$)}  &  &  &  &  & 0.291*** & 0.218** & 0.213** \\
 &  &  &  &  & (0.119) & (0.116) & (0.0846) \\  
$\mathbbm{1}${(Age Group 2$_{j,t}$)} &  &  &  &  & 0.3392 & 0.0823 & 0.0702 \\
 &  &  &  &  & (0.337) & (0.337) & (0.117) \\  
$\mathbbm{1}${(Age Group 3$_{j,t}$)} &  &  &  &  & 0.0250 & 0.0207 & 0.3379 \\
 &  &  &  &  & (0.021) & (0.021) & (0.023) \\  
$\mathbbm{1}${(Age Group 4$_{j,t}$)} &  &  &  &  & 0.0621 & -0.334 & -0.3355 \\
 &  &  &  &  & (0.120) & (0.339) & (0.121) \\  
$\mathbbm{1}${(Age Group 5$_{j,t}$)} &  &  &  &  & 0.137 & 0.355** & 0.123 \\
 &  &  &  &  & (0.160) & (0.157) & (0.166) \\  

 \hline 

\midrule
\textbf{Fixed Effects} \\     
Time &X&X&X&X&X&X&X \\    
Country &&X&X&&X&X & \\    
Time$\times$Country &&&X&&&X & \\    
Location &&&&X&&&X \\    
\midrule
Observations & 16,175 & 16,175 & 16,158 & 16,059 & 15,041 & 15,041 & 14,941 \\  
 R-squared & 0.095 & 0.144 & 0.193 & 0.353 & 0.171 & 0.205 & 0.357 \\ \hline


\end{longtable}

\end{document}

在此輸入影像描述

修改: 根據@Bernard的建議,我修改了程式碼:

\documentclass{article}
\usepackage{caption}
\captionsetup{font=large} 
\usepackage{array}
\newcolumntype{M}[1]{>{\raggedright}m{#1}}
\usepackage{booktabs}
\usepackage{makecell}
\usepackage{bbm}
\usepackage{xltabular}
\usepackage{pdflscape}


\begin{document}
\begin{landscape}
\vspace*{-3cm}
\begin{xltabular}[l]{0.55\linewidth}{@{}X*8{c}@{}}
  \caption{Coronavirus rates as a logarithmic function of social distancing}\\[-1.5ex]
  \multicolumn{7}{@{}p{\linewidth}@{}}{\footnotesize  Something something something something something something something something something something something something something something something something something something something something something something something something something something something something something. }  \\ [8ex]
\toprule
& \multicolumn{8}{c}{Dependent Variable: $\mathbbm{1}${(Death$_{j,t}$)}} \\ 

 & (1) & (2) & (3) & (4) & (5) & (6)& (7) \\
\midrule
\endfirsthead
\multicolumn{8}{@{}l@{}}{continues from the previous page}\\
\midrule
& \multicolumn{8}{c}{Dependent Variable: $\mathbbm{1}${(Death$_{j,t}$)}} \\
 & (1) & (2) & (3) & (4) & (5) & (6) & (7) \\

\midrule
\endhead
\midrule
\multicolumn{8}{@{}r@{}}{continues on the next page}
\endfoot
\bottomrule
\endlastfoot

$\mathbbm{1}${(Not Social Distancing$_{j,t}$)}
 & 0.322& 0.278& 0.276 & 0.387*** & 0.304*** & 0.305*** & 0.381*** \\ 
 & (0.3333) & (0.2232) & (0.2323) & (0.333) & (0.334) & (0.334) & (0.333) \\   
$\mathbbm{1}${(Pnst  Type$_{j,t}$)} &  &  &  &  & 0.331*** & 0.331*** &  \\
 &  &  &  &  & (0.3359) & (0.3359) &  \\   
$\mathbbm{1}${(Long variable name$_{j,t}$)} &  &  &  &  & -0.3315 & -0.3313 &  \\
 &  &  &  &  & (0.3313) & (0.3313) &  \\   
$\mathbbm{1}${(Intense 3$_{j,t}$)} &  &  &  &  & 0.07** & 0.08** & 0.06* \\
 &  &  &  &  & (0.000) & (0.000) & (0.000) \\  
 $\mathbbm{1}${(Insurance$_{j,t}$)}&  &  &  &  & 0.133 & 0.149 & 0.114 \\
 &  &  &  &  & (0.090) & (0.090) & (0.091) \\  
$\mathbbm{1}${(Gender$_{j,t}$)} &  &  &  &  & 0.3*** & 0.3*** & 0.07** \\
 &  &  &  &  & (0.021) & (0.021) & (0.067) \\  
$\mathbbm{1}${(Facility P$_{j,t}$)} &  &  &  &  & 0.006 & 0.005 & 0.025** \\
 &  &  &  &  & (0.008) & (0.008) & (0.033) \\  
$\mathbbm{1}${(Att$_{j,t}$)} &  &  &  &  & 0.3345 & 0.0234 & 0.0215 \\
 &  &  &  &  & (0.038) & (0.042) & (0.333) \\  
$\mathbbm{1}${(Ptt$_{j,t}$)}&  &  &  &  & 0.0988 & 0.0849 & 0.0873 \\
 &  &  &  &  & (0.153) & (0.151) & (0.203) \\  
$\mathbbm{1}${(Variable 3$_{[1,5],}$ $_{j,t}$)} &  &  &  &  & 0.315 & 0.327 & 0.229 \\
 &  &  &  &  & (0.206) & (0.202) & (0.200) \\  
$\mathbbm{1}${(Variable 3$_{(5,11],}$ $_{j,t}$)} &  &  &  &  & -0.336 & 0.025 & 0.007 \\
 &  &  &  &  & (0.043) & (0.042) & (0.023) \\  
$\mathbbm{1}${(Variable 3$_{(11,20],}$ $_{j,t}$)}&  &  &  &  & -0.43** & -0.33** & -0.40** \\
 &  &  &  &  & (0.178) & (0.175) & (0.185) \\  
$\mathbbm{1}${(Variable 3$_{(20,35],}$ $_{j,t}$)}&  &  &  &  & 1.203** & 1.116** & 1.066* \\
 &  &  &  &  & (0.534) & (0.538) & (0.565) \\  
$\mathbbm{1}${(Variable 3$_{>35},$ $_{j,t}$)} &  &  &  &  & 0.020 & 0.030 & 0.003 \\
 &  &  &  &  & (0.0420) & (0.0433) & (0.0219) \\  
$\mathbbm{1}${(Age Group 1$_{j,t}$)}  &  &  &  &  & 0.291*** & 0.218** & 0.213** \\
 &  &  &  &  & (0.119) & (0.116) & (0.0846) \\  
$\mathbbm{1}${(Age Group 2$_{j,t}$)} &  &  &  &  & 0.3392 & 0.0823 & 0.0702 \\
 &  &  &  &  & (0.337) & (0.337) & (0.117) \\  
$\mathbbm{1}${(Age Group 3$_{j,t}$)} &  &  &  &  & 0.0250 & 0.0207 & 0.3379 \\
 &  &  &  &  & (0.021) & (0.021) & (0.023) \\  
$\mathbbm{1}${(Age Group 4$_{j,t}$)} &  &  &  &  & 0.0621 & -0.334 & -0.3355 \\
 &  &  &  &  & (0.120) & (0.339) & (0.121) \\  
$\mathbbm{1}${(Age Group 5$_{j,t}$)} &  &  &  &  & 0.137 & 0.355** & 0.123 \\
 &  &  &  &  & (0.160) & (0.157) & (0.166) \\  

 \hline 

\midrule
\textbf{Fixed Effects} \\     
Time &X&X&X&X&X&X&X \\    
Country &&X&X&&X&X & \\    
Time$\times$Country &&&X&&&X & \\    
Location &&&&X&&&X \\    
\midrule
Observations & 16,175 & 16,175 & 16,158 & 16,059 & 15,041 & 15,041 & 14,941 \\  
 R-squared & 0.095 & 0.144 & 0.193 & 0.353 & 0.171 & 0.205 & 0.357 \\ \hline


\end{xltabular}

\end{landscape}

\end{document}

除了每列的列長度不同(即第 5、6、7 列之間的間隙較大)之外,此程式碼運作良好。

答案1

  • 非常。非常實際的表...
  • 我將使用S第 2 - 8 列
  • \tabcolsepLaTeX的 left 計算
  • 用於表格longtable與設定一起使用\setlength\LTleft{0pt}\setlength\LTright{0pt}
  • 將表格的字體大小減小為\small
\documentclass[final,3p,times,12pt]{elsarticle}
\usepackage{caption}
\captionsetup{font=small}
\usepackage{array}
\newcolumntype{M}[1]{>{\raggedright}m{#1}}
\usepackage{booktabs}
\usepackage{makecell}
\usepackage{bbm}
\usepackage{longtable}
\usepackage{siunitx}

\begin{document}
\begingroup
\small
\sisetup{table-format=1.4,
         table-space-text-pre=(,
         table-space-text-post=***,
         table-align-text-post=false,
         input-symbols=()
         }
\setlength\LTleft{0pt}
\setlength\LTright{0pt}
\setlength\tabcolsep{0pt}
    \begin{longtable}{@{\extracolsep{\fill}}    M{8em}
                                           *{7}{S}}
\caption[Coronavirus rates as a logarithmic function of social distancing]
        {Coronavirus rates as a logarithmic function of social distancing\\[1ex]
        \footnotesize  
        Something something something something something something something something something something something something something something something something something something something something something something something something something something something something something. }
\label{tab:čongtable-covit-19}  \\
    \toprule
\multicolumn{1}{c}{}
    & \multicolumn{7}{c}{Dependent Variable: $\mathbbm{1}${(Death$_{j,t}$)}} \\
    \cmidrule{2-8}
\multicolumn{1}{c}{}
    & {(1)} & {(2)} & {(3)} & {(4)} & {(5)} & {(6)} & {(7)} \\
    \midrule
\endfirsthead
    \caption[]{Coronavirus rates as a logarithmic function of social distancing (cont.)} \\
    \midrule
\multicolumn{1}{c}{}
    & \multicolumn{7}{c}{Dependent Variable: $\mathbbm{1}${(Death$_{j,t}$)}} \\
    \cmidrule{2-8}
\multicolumn{1}{c}{}
    & {(1)} & {(2)} & {(3)} & {(4)} & {(5)} & {(6)} & {(7)} \\
    \midrule
\endhead
    \midrule
\multicolumn{7}{@{}r@{}}{\footnotesize\textit{continues on the next page}}
\endfoot
    \bottomrule
\endlastfoot

$\mathbbm{1}$ (Not Social Distancing$_{j,t}$)
    & 0.322     & 0.278     & 0.276     & 0.387***  & 0.304***  & 0.305***  & 0.381***  \\
    & (0.3333)  & (0.2232)  & (0.2323)  & (0.333)   & (0.334)   & (0.334)   & (0.333)   \\
$\mathbbm{1}$ (Pnst  Type$_{j,t}$)    
    &           &           &           &           & 0.331***  & 0.331***  &           \\
    &           &           &           &           & (0.3359)  & (0.3359)  &           \\
$\mathbbm{1}$ (Long variable name$_{j,t}$)    
    &           &           &           &           & -0.3315   & -0.3313   &           \\
    &           &           &           &           & (0.3313)  & (0.3313)  &           \\
$\mathbbm{1}$ (Intense 3$_{j,t}$)     
    &           &           &           &           & 0.07**    & 0.08**    & 0.06*     \\
    &           &           &           &           & (0.000)   & (0.000)   & (0.000)   \\
$\mathbbm{1}$ (Insurance$_{j,t}$) 
    &           &           &           &           & 0.133     & 0.149     & 0.114     \\
    &           &           &           &           & (0.090)   & (0.090)   & (0.091)   \\
$\mathbbm{1}$ (Gender$_{j,t}$) 
    &           &           &           &           & 0.3***    & 0.3***    & 0.07**    \\
    &           &           &           &           & (0.021)   & (0.021)   & (0.067)   \\
$\mathbbm{1}$ (Facility P$_{j,t}$)  
    &           &           &           &           & 0.006     & 0.005     & 0.025**   \\
    &           &           &           &           & (0.008)   & (0.008)   & (0.033)   \\
$\mathbbm{1}$ (Att$_{j,t}$)  
    &           &           &           &           & 0.3345    & 0.0234    & 0.0215    \\
    &           &           &           &           & (0.038)   & (0.042)   & (0.333)   \\
$\mathbbm{1}$ (Ptt$_{j,t}$) 
    &           &           &           &           & 0.0988    & 0.0849    & 0.0873    \\
    &           &           &           &           & (0.153)   & (0.151)   & (0.203)   \\
$\mathbbm{1}$ (Variable 3$_{[1,5],}$ $_{j,t}$)  
    &           &           &           &           & 0.315     & 0.327     & 0.229     \\
    &           &           &           &           & (0.206)   & (0.202)   & (0.200)   \\
$\mathbbm{1}$ (Variable 3$_{(5,11],}$ $_{j,t}$) 
    &           &           &           &           & -0.336    & 0.025     & 0.007     \\
    &           &           &           &           & (0.043)   & (0.042)   & (0.023)   \\
$\mathbbm{1}$ (Variable 3$_{(11,20],}$ $_{j,t}$) 
    &           &           &           &           & -0.43**   & -0.33**   & -0.40**   \\
    &           &           &           &           & (0.178)   & (0.175)   & (0.185)   \\
$\mathbbm{1}$ (Variable 3$_{(20,35],}$ $_{j,t}$) 
    &           &           &           &           & 1.203**   & 1.116**   & 1.066*    \\
    &           &           &           &           & (0.534)   & (0.538)   & (0.565)   \\
$\mathbbm{1}$ (Variable 3$_{>35},$ $_{j,t}$) 
    &           &           &           &           & 0.020     & 0.030     & 0.003     \\
    &           &           &           &           & (0.0420)  & (0.0433)  & (0.0219)  \\
$\mathbbm{1}$ (Age Group 1$_{j,t}$)   
    &           &           &           &           & 0.291***  & 0.218**   & 0.213**   \\
    &           &           &           &           & (0.119)   & (0.116)   & (0.0846)  \\
$\mathbbm{1}$ (Age Group 2$_{j,t}$) 
    &           &           &           &           & 0.3392    & 0.0823    & 0.0702    \\
    &           &           &           &           & (0.337)   & (0.337)   & (0.117)   \\
$\mathbbm{1}$ (Age Group 3$_{j,t}$) 
    &           &           &           &           & 0.0250    & 0.0207    & 0.3379    \\
    &           &           &           &           & (0.021)   & (0.021)   & (0.023)   \\
$\mathbbm{1}$ (Age Group 4$_{j,t}$)  
    &           &           &           &           & 0.0621    & -0.334    & -0.3355   \\
    &           &           &           &           & (0.120)   & (0.339)   & (0.121)   \\
$\mathbbm{1}$ (Age Group 5$_{j,t}$)  
    &           &           &           &           & 0.137     & 0.355**   & 0.123     \\
    &           &           &           &           & (0.160)   & (0.157)   & (0.166)   \\
    \midrule
\textbf{Fixed Effects} \\
Time    
    & {X}       & {X}       & {X}       & {X}       & {X}       & {X}       & {X}       \\
Country 
    &           & {X}       & {X}       &           & {X}       & {X}       & {X}       \\
Time$\times$Country 
    &           &           & {X}       &           &           & {X}       &           \\
Location
    &           &           &           & {X}       &           &           & {X}       \\
\midrule
Observations    
    & {16,175}  & {16,175}  & {16,158}  & {16,059}  & {15,041}  & {15,041}  & {14,941}  \\
R-squared       
    & 0.095     & 0.144     & 0.193     & 0.353     & 0.171     & 0.205     & 0.357     \\
    \end{longtable}
\endgroup
\end{document}

在此輸入影像描述

附錄 目前尚不清楚$\mathbbm{1}$第一列內容中先前儲存格的含義。我會將它們一起刪除單元格內容周圍的括號。這樣就可以為桌子獲得更多的空間。另外,我會在表格第一部分的每個第二行之間引入小的垂直空間。在表的第二部分中,請考慮您在下面的評論中提出的問題:

\documentclass[final,3p,times,12pt]{elsarticle}
\usepackage{caption}
\captionsetup{font=small}
\usepackage{booktabs, longtable}
\newcommand\mcc[1]{\multicolumn{1}{c}{#1}}
\usepackage{bbm}
\usepackage{siunitx}

\begin{document}
\begingroup
\footnotesize
\sisetup{table-format=1.4,
         table-space-text-pre=(,
         table-space-text-post=***,
         table-align-text-post=false,
         input-symbols=(),
         table-alignment=right
         }
\setlength\LTleft{0pt}
\setlength\LTright{0pt}
\setlength\tabcolsep{0pt}
    \begin{longtable}{@{\extracolsep{\fill}} l
                                           *{7}{S}}
\caption[Coronavirus rates as a logarithmic function of social distancing]
        {Coronavirus rates as a logarithmic function of social distancing\\[1ex]
        \footnotesize  
        Something something something something something something something something something something something something something something something something something something something something something something something something something something something something something. }
\label{tab:čongtable-covit-19}  \\
    \toprule
\multicolumn{1}{c}{}
    & \multicolumn{7}{c}{Dependent Variable: $\mathbbm{1}${(Death$_{j,t}$)}} \\
    \cmidrule{2-8}
\multicolumn{1}{c}{}
    & \mcc{(1)} & \mcc{(2)} & \mcc{(3)} & \mcc{(4)} & \mcc{(5)} & \mcc{(6)} & \mcc{(7)} \\
    \midrule
\endfirsthead
    \caption[]{Coronavirus rates as a logarithmic function of social distancing (cont.)} \\
    \midrule
\multicolumn{1}{c}{}
    & \multicolumn{7}{c}{Dependent Variable: $\mathbbm{1}${(Death$_{j,t}$)}} \\
    \cmidrule{2-8}
\multicolumn{1}{c}{}
    & \mcc{(1)} & \mcc{(2)} & \mcc{(3)} & \mcc{(4)} & \mcc{(5)} & \mcc{(6)} & \mcc{(7)} \\
    \midrule
\endhead
    \midrule
\multicolumn{8}{@{}r@{}}{\footnotesize\textit{continues on the next page}}
\endfoot
    \bottomrule
\endlastfoot

Not Social Distancing$_{j,t}$
    & 0.322     & 0.278     & 0.276     & 0.387***  & 0.304***  & 0.305***  & 0.381***  \\
    & (0.3333)  & (0.2232)  & (0.2323)  & (0.333)   & (0.334)   & (0.334)   & (0.333)   \\
    \addlinespace
Pnst  Type$_{j,t}$    
    &           &           &           &           & 0.331***  & 0.331***  &           \\
    &           &           &           &           & (0.3359)  & (0.3359)  &           \\
    \addlinespace
Long variable name$_{j,t}$    
    &           &           &           &           & -0.3315   & -0.3313   &           \\
    &           &           &           &           & (0.3313)  & (0.3313)  &           \\
    \addlinespace
Intense 3$_{j,t}$     
    &           &           &           &           & 0.07**    & 0.08**    & 0.06*     \\
    &           &           &           &           & (0.000)   & (0.000)   & (0.000)   \\
    \addlinespace
Insurance$_{j,t}$ 
    &           &           &           &           & 0.133     & 0.149     & 0.114     \\
    &           &           &           &           & (0.090)   & (0.090)   & (0.091)   \\
    \addlinespace
Gender$_{j,t}$ 
    &           &           &           &           & 0.3***    & 0.3***    & 0.07**    \\
    &           &           &           &           & (0.021)   & (0.021)   & (0.067)   \\
    \addlinespace
Facility P$_{j,t}$  
    &           &           &           &           & 0.006     & 0.005     & 0.025**   \\
    &           &           &           &           & (0.008)   & (0.008)   & (0.033)   \\
    \addlinespace
Att$_{j,t}$  
    &           &           &           &           & 0.3345    & 0.0234    & 0.0215    \\
    &           &           &           &           & (0.038)   & (0.042)   & (0.333)   \\
    \addlinespace
Ptt$_{j,t}$ 
    &           &           &           &           & 0.0988    & 0.0849    & 0.0873    \\
    &           &           &           &           & (0.153)   & (0.151)   & (0.203)   \\
    \addlinespace
Variable 3$_{[1,5]\;j,t}$  
    &           &           &           &           & 0.315     & 0.327     & 0.229     \\
    &           &           &           &           & (0.206)   & (0.202)   & (0.200)   \\
    \addlinespace
Variable 3$_{(5,11],\;j,t)}$ 
    &           &           &           &           & -0.336    & 0.025     & 0.007     \\
    &           &           &           &           & (0.043)   & (0.042)   & (0.023)   \\
    \addlinespace
Variable 3$_{(11,20],\;j,t)}$
    &           &           &           &           & -0.43**   & -0.33**   & -0.40**   \\
    &           &           &           &           & (0.178)   & (0.175)   & (0.185)   \\
    \addlinespace
Variable 3$_{(20,35],\;j,t)}$
    &           &           &           &           & 1.203**   & 1.116**   & 1.066*    \\
    &           &           &           &           & (0.534)   & (0.538)   & (0.565)   \\
    \addlinespace
Variable 3$_{>35,\;j,t}$
    &           &           &           &           & 0.020     & 0.030     & 0.003     \\
    &           &           &           &           & (0.0420)  & (0.0433)  & (0.0219)  \\
    \addlinespace
Age Group 1$_{j,t}$   
    &           &           &           &           & 0.291***  & 0.218**   & 0.213**   \\
    &           &           &           &           & (0.119)   & (0.116)   & (0.0846)  \\
    \addlinespace
Age Group 2$_{j,t}$ 
    &           &           &           &           & 0.3392    & 0.0823    & 0.0702    \\
    &           &           &           &           & (0.337)   & (0.337)   & (0.117)   \\
    \addlinespace
Age Group 3$_{j,t}$ 
    &           &           &           &           & 0.0250    & 0.0207    & 0.3379    \\
    &           &           &           &           & (0.021)   & (0.021)   & (0.023)   \\
    \addlinespace
Age Group 4$_{j,t}$  
    &           &           &           &           & 0.0621    & -0.334    & -0.3355   \\
    &           &           &           &           & (0.120)   & (0.339)   & (0.121)   \\
    \addlinespace
Age Group 5$_{j,t}$  
    &           &           &           &           & 0.137     & 0.355**   & 0.123     \\
    &           &           &           &           & (0.160)   & (0.157)   & (0.166)   \\
    \midrule
\textbf{Fixed Effects} \\
Time    
    & {X}       & {X}       & {X}       & {X}       & {X}       & {X}       & {X}       \\
Country 
    &           & {X}       & {X}       &           & {X}       & {X}       & {X}       \\
Time$\times$Country 
    &           &           & {X}       &           &           & {X}       &           \\
Location
    &           &           &           & {X}       &           &           & {X}       \\
\midrule
Observations    
    & {16,175}  & {16,175}  & {16,158}  & {16,059}  & {15,041}  & {15,041}  & {14,941}  \\
R-squared       
    & {0.095}     & {0.144} & {0.193}   & {0.353}   & {0.171}   & {0.205}   & {0.357}   \\
    \end{longtable}
\endgroup
\end{document}

在此輸入影像描述

編輯:

  • S列在包中定義siunitx。它們用於在小數點處對齊數字。
  • 在設定中定義了Ssolams 的功能,如下所示:
    • 數字的大小與tabular-format=<num. of inteders>.>num of decimal digits.
    • 數字前有額外的空格table-space-text-pre=(
    • 數字後面帶有 的附加空格table-space-text-pre=***
    • 將括號和*後面的數字與對齊table-align-text-post=false
    • 輸入符號,考慮數字形成(), ),用於表格中)input-symbols=()
    • 對於列中的右對齊文字S服務table-alignment=right(根據我的測試,我將省略此選項並使用預設設置,即center。在這種情況下,您可以刪除\mcc命令的定義及其在表標題中的使用,如第一個中所做的那樣例子)。
  • 要將儲存格的內容放在第一列中,只需將M列替換為l,但這樣您需要減小列大小,該表格可以適合文字寬度。

相關內容