如何在一张表中放入大表格?

如何在一张表中放入大表格?

我有一张非常大的桌子,一张纸放不下。我的想法是,要么横向摆放(但仍然会放在另一张纸上),要么垂直摆放(最佳解决方案)。

你知道该怎么做吗?

    \documentclass{article}
    \usepackage{longtable}

    \begin{document}


    \begin{longtable}[l]{lccccccccc}
        \caption{VAR Estimation Results}
        \label{my-label}\\
        \toprule
        \multicolumn{1}{l}{\textbf{Dependent Variables}} & \multicolumn{1}{c}{\textbf{$rtb_t$}} & \multicolumn{1}{c}{\textbf{$xIG_t$}} & \multicolumn{1}{c}{\textbf{ $xHY_t$}} &\multicolumn{1}{c}{\textbf{$xEM_t$}} & \multicolumn{1}{c}{\textbf{$xConv_t$}} & \multicolumn{1}{c}{\textbf{$y_t$}}  & \multicolumn{1}{c}{\textbf{$DefRate_t$}} & \multicolumn{1}{c}{\textbf{$spr_t$}}& \multicolumn{1}{c}{\textbf{$R^2$}}\\
        \endfirsthead
        %
        \endhead
        %
        \toprule
        ~~$rtb_{t+1}$ & 0.9038  & 0.0872  & -0.0239  & -0.0279 &   0.0004 &  -0.2039  & -0.0172  &   0.1384 &\\
         & (2.1620)  &  (2.5739) & (-0.7706)  & (-0.9658)  &  (0.0330)  & (-1.1606)  & (-1.1140) &  (3.2121) &\\
        ~~$xIG_{t+1}$ & 0.1275  &  0.3683  & -0.0481  & -0.2046  &  0.0453  &  0.8365  &  0.0629  &  0.1911&\\
        & (0.7783) &  (2.2406)  & (-0.5394)  & (-1.9506)  &  (1.0510)  &  (1.4690)  &  (1.5138)  &  (1.0819) &\\
        ~~$xHY_{t+1}$  & 0.3392  & 0.4406  & -0.0890  &  0.1170  &  0.1419 &  -0.1556 &  -0.0070   & 0.3028& \\
        & (1.3632)  &  (1.3334)  & (-0.6600)  &  (0.6035)  &  (1.6819) &  (-0.1464) & (-0.0900)  &  (0.9893)& \\
        ~~$xEM_{t+1}$  & 0.4025  &  0.7190 &  -0.0523  & -0.3276  &  0.1349  & 1.9086 &  0.0128 &   0.2404&\\
        & (1.5669)  &  (1.9427)  & (-0.6229)  & (-1.6961) &   (1.7558)  &  (1.7899)   & (0.2595)   & (0.9980) &\\
        ~~$xConv_{t+1}$  & 0.7229 &  0.3615  & -0.0278  &  0.0637  &  0.1026  &  0.6163 &  -0.0360 &  -0.0710& \\
        & (2.3238)   &  (1.0195) & (-0.1533)  &  (0.2868)  &  (0.8016) &   (0.3322)  & (-0.3836)  & (-0.2200)& \\
        ~~$y_{t+1}$ & -0.0087  & -0.0215 &   0.0006  &  0.0140  & -0.0049  &  0.8962  &  0.0018 &  -0.0089 &\\
        & (-1.0722) &  (-1.9254)  &  (0.2111)  &  (2.3309)  & (-2.0655)  & (9.1198)  &  (0.8533) &  (-1.1866)&\\
        ~~$DefRate_{t+1}$ & 0.0662 &  -0.0655  &-0.0094 &   0.0486 &  -0.0153   & 0.5947  &  0.9504  &  0.2086& \\ 
        & (2.7102)  & (-2.1225) & (-0.6587)  &  (2.4579)  & (-1.7263)  &  (4.7462) &  (8.2119)  &  (6.4868)& \\ 
        ~~$spr_{t+1}$ & -0.0196  &  0.0289  & -0.0636 &  -0.0349  & -0.0061  &  0.0552  & -0.0073  &  1.0028&\\     
        & (-2.0809)   &  (1.5845)  &  (-7.7777)   & (-2.0494) &  (-1.1787)  &  (0.9975) &  (-1.2758)  & (5.4443)& \\ 
        \toprule  
        \multicolumn{1}{c}{Cross-Correlation Of Residuals} \\ 
        & \multicolumn{1}{c}{\textbf{$rtb_t$}} & \multicolumn{1}{c}{\textbf{$xIG_t$}} & \multicolumn{1}{c}{\textbf{ $xHY_t$}} &\multicolumn{1}{c}{\textbf{ $xEM_t$}} & \multicolumn{1}{c}{\textbf{$(xConv_t$}} & \multicolumn{1}{c}{\textbf{$y_t$}} & \multicolumn{1}{c}{\textbf{$DefRate_t$}} & \multicolumn{1}{c}{\textbf{$spr_t$}}   \\
        ~~$rtb_{t+1}$ & - & 0.1140 &  0.0502 &  0.0207  &   0.1135  &   0.2269  &   0.1019  &   0.0339 \\
        ~~$xIG_{t+1}$ & - & - & 0.5636  &   0.7684  &   0.3342  &  -0.0310 &   -0.0992  &  -0.0556  \\
        ~~$xHY_{t+1}$  & - & - & - & 0.7265  &   0.7244  &  -0.0856  &  -0.1109   &  0.1040 \\
        ~~$xEM_{t+1}$ & - & - & - & - &   0.5508  &  -0.2182  &  -0.1723  &  -0.0318 \\
        ~~$xConv_{t+1}$ & - & - & - & - & - & 0.0071 &   -0.0735 &   -0.0327\\
        ~~$y_{t+1}$ & - & - & - & - & - & - & 0.1840  &  0.0032 \\ 
        ~~$DefRate_{t+1}$ & - & - & - & - & - &  - & - &-0.0796 \\ 
        ~~$spr_{t+1}$ & - & - & - & - & - & -  & - & - \\ 
        \bottomrule             

    \end{longtable}

    \end{landscape}

    \end{document}

答案1

我建议采用纵向布局,其中的S列用于将数字对齐到小数点上。实际上,在目前的状态下,您 longtable真的不需要。

    \documentclass{article}
\usepackage{amsmath}
\DeclareMathOperator{\rtb}{rtb}
\DeclareMathOperator{\spr}{spr}
\DeclareMathOperator{\IG}{IG}
\DeclareMathOperator{\HY}{HY}
\DeclareMathOperator{\EM}{EM}
\DeclareMathOperator{\Conv}{Conv}
\DeclareMathOperator{\DefRate}{DefRate}
\usepackage{longtable}
\usepackage{booktabs, makecell}
\renewcommand{\theadfont}{\bfseries\boldmath}
\usepackage{siunitx}
\usepackage{lscape}
\usepackage[showframe]{geometry}

    \begin{document}

\setlength{\tabcolsep}{2pt}
\sisetup{table-format=-1.4, table-number-alignment=center, table-space-text-pre={(}, table-align-text-pre=false, table-space-text-post={)}}
\small
    \begin{longtable}[l]{@{}l@{}*9{S}}
        \caption{VAR Estimation Results}
        \label{my-label}\\
        \toprule
        \multicolumn{10}{l}{\bfseries Dependent Variables}\\
        & {\thead{$\rtb_t$}} & {\thead{$x\IG_t$}} & {\thead{$x\HY_t$}} & {\thead{$x\EM_t$}} &{\thead{$x\Conv_t$}} & {\thead{$y_t$}} & {\thead{$\DefRate_t$}} & {\thead{$\spr_t$}}&{\thead{$R^2$}}\\
        \endfirsthead
        %
        \endhead
        %
        \toprule
        ~~$\rtb_{t+1}$ & 0.9038 & 0.0872 & -0.0239 & -0.0279 & 0.0004 & -0.2039 & -0.0172 & 0.1384 &\\
  & {(}2.1620{)} & {(}2.5739{)} & {(}-0.7706{)} & {(}-0.9658{)} & {(}0.0330{)} & {(}-1.1606{)} & {(}-1.1140{)} & {(}3.2121{)} & \\
\addlinespace
        ~~$x\IG_{t+1}$ & 0.1275 & 0.3683 & -0.0481 & -0.2046 & 0.0453 & 0.8365 & 0.0629 & 0.1911&\\
    & {(}0.7783{)} & {(}2.2406{)} & {(}-0.5394{)} & {(}-1.9506{)} & {(}1.0510{)} & {(}1.4690{)} & {(}1.5138{)} & {(}1.0819{)} & \\
\addlinespace
        ~~$x\HY_{t+1}$ & 0.3392 & 0.4406 & -0.0890 & 0.1170 & 0.1419 & -0.1556 & -0.0070 & 0.3028& \\
    & {(}1.3632{)} & {(}1.3334{)} & {(}-0.6600{)} & {(}0.6035{)} & {(}1.6819{)} & {(}-0.1464{)} & {(}-0.0900{)} & {(}0.9893{)}& \\
\addlinespace
        ~~$x\EM_{t+1}$ & 0.4025 & 0.7190 & -0.0523 & -0.3276 & 0.1349 & 1.9086 & 0.0128 & 0.2404&\\
   & {(}1.5669{)} & {(}1.9427{)} & {(}-0.6229{)} & {(}-1.6961{)} & {(}1.7558{)} & {(}1.7899{)} & {(}0.2595{)} & {(}0.9980{)} & \\
\addlinespace
        ~~$x\Conv_{t+1}$ & 0.7229 & 0.3615 & -0.0278 & 0.0637 & 0.1026 & 0.6163 & -0.0360 & -0.0710& \\
   & {(}2.3238{)} & {(}1.0195{)} & {(}-0.1533{)} & {(}0.2868{)} & {(}0.8016{)} & {(}0.3322{)} & {(}-0.3836{)} & {(}-0.2200{)}& \\
\addlinespace
        ~~$y_{t+1}$ & -0.0087 & -0.0215 & 0.0006 & 0.0140 & -0.0049 & 0.8962 & 0.0018 & -0.0089 &\\
  & {(}-1.0722{)} & {(}-1.9254{)} & {(}0.2111{)} & {(}2.3309{)} & {(}-2.0655{)} & {(}9.1198{)} & {(}0.8533{)} & {(}-1.1866{)}& \\
\addlinespace
        ~~$\DefRate_{t+1}$ & 0.0662 & -0.0655 &-0.0094 & 0.0486 & -0.0153 & 0.5947 & 0.9504 & 0.2086& \\
   & {(}2.7102{)} & {(}-2.1225{)} & {(}-0.6587{)} & {(}2.4579{)} & {(}-1.7263{)} & {(}4.7462{)} & {(}8.2119{)} & {(}6.4868{)}& \\
\addlinespace
        ~~$\spr_{t+1}$ & -0.0196 & 0.0289 & -0.0636 & -0.0349 & -0.0061 & 0.0552 & -0.0073 & 1.0028&\\
  & {(}-2.0809{)} & {(}1.5845{)} & {(}-7.7777{)} & {(}-2.0494{)} & {(}-1.1787{)} & {(}0.9975{)} & {(}-1.2758{)} & {(}5.4443{)}& \\
  \midrule[\heavyrulewidth]
 \multicolumn{10}{l}{\bfseries Cross-Correlation of Residuals} \\
& {\thead{$\rtb_t$}} &{\thead{$x\IG_t$}} & {\thead{$x\HY_t$}} & {\thead{$x\EM_t$}} &{\thead{$x\Conv_t$}} & {\thead{$y_t$}} & {\thead{$\DefRate_t$}} & {\thead{$\spr_t$}} \\
 ~~$\rtb_{t+1}$ & {$-$} & 0.1140 & 0.0502 & 0.0207 & 0.1135 & 0.2269 & 0.1019 & 0.0339 \\
 ~~$x\IG_{t+1}$ & {$-$} & {$-$} & 0.5636 & 0.7684 & 0.3342 & -0.0310 & -0.0992 & -0.0556 \\
 ~~$x\HY_{t+1}$ & {$-$} & {$-$} & {$-$} & 0.7265 & 0.7244 & -0.0856 & -0.1109 & 0.1040 \\
 ~~$x\EM_{t+1}$ & {$-$} & {$-$} & {$-$} & {$-$} & 0.5508 & -0.2182 & -0.1723 & -0.0318 \\
 ~~$x\Conv_{t+1}$ & {$-$} & {$-$} & {$-$} & {$-$} & {$-$} & 0.0071 & -0.0735 & -0.0327\\
 ~~$y_{t+1}$ & {$-$} & {$-$} & {$-$} & {$-$} & {$-$} & {$-$} & 0.1840 & 0.0032 \\
 ~~$\DefRate_{t+1}$ & {$-$} & {$-$} & {$-$} & {$-$} & {$-$} & {$-$} & {$-$} &-0.0796 \\
 ~~$\spr_{t+1}$ & {$-$} & {$-$} & {$-$} & {$-$} & {$-$} & {$-$} & {$-$} & {$-$} \\
        \bottomrule
    \end{longtable}

    \end{document}

在此处输入图片描述

以下是横向、正式字体大小和默认的版本\tabcolsep

在此处输入图片描述

答案2

答案类似于@Bernard 的,但不诉诸大胆的(没有必要用这种视觉等价的大喊你的读者。)并且,由于分页既不可取也没有必要,我已经longtabletable和替换了tabular

在此处输入图片描述

\documentclass{article}
%\usepackage[margin=2.5cm,a4paper]{geometry}  % load if necessary
\usepackage[skip=0.3333\baselineskip]{caption}
\usepackage{amsmath,booktabs,pdflscape,dcolumn}
\newcolumntype{d}[1]{D..{#1}}
\newcommand\mc[1]{\multicolumn{1}{c}{#1}} % handy shortcut macro
\newcommand\vn[1]{\mathrm{#1}} % "variable name"

\begin{document}
\begin{landscape}

\begin{table}
\caption{VAR Estimation Results}
\label{my-label}
\centering
\begin{tabular}{@{} l *{8}{d{2.5}} c @{}}
\toprule
Dependent Variables & 
\mc{$\vn{rtb}_t$}   & \mc{$\vn{xIG}_t$}& \mc{$\vn{xHY}_t$} & \mc{$\vn{xEM}_t$} & 
\mc{$\vn{xConv}_t$} & \mc{$y_t$}   & \mc{$\vn{DefRate}_t$} & \mc{$\vn{spr}_t$} & $R^2$ \\
\midrule
$\vn{rtb}_{t+1}$ & 0.9038  & 0.0872  & -0.0239  & -0.0279 &   0.0004 &  -0.2039  & -0.0172  &   0.1384 &\\
 & (2.1620)  &  (2.5739) & (-0.7706)  & (-0.9658)  &  (0.0330)  & (-1.1606)  & (-1.1140) &  (3.2121) &\\
$\vn{xIG}_{t+1}$ & 0.1275  &  0.3683  & -0.0481  & -0.2046  &  0.0453  &  0.8365  &  0.0629  &  0.1911&\\
& (0.7783) &  (2.2406)  & (-0.5394)  & (-1.9506)  &  (1.0510)  &  (1.4690)  &  (1.5138)  &  (1.0819) &\\
$\vn{xHY}_{t+1}$  & 0.3392  & 0.4406  & -0.0890  &  0.1170  &  0.1419 &  -0.1556 &  -0.0070   & 0.3028& \\
& (1.3632)  &  (1.3334)  & (-0.6600)  &  (0.6035)  &  (1.6819) &  (-0.1464) & (-0.0900)  &  (0.9893)& \\
$\vn{xEM}_{t+1}$  & 0.4025  &  0.7190 &  -0.0523  & -0.3276  &  0.1349  & 1.9086 &  0.0128 &   0.2404&\\
& (1.5669)  &  (1.9427)  & (-0.6229)  & (-1.6961) &   (1.7558)  &  (1.7899)   & (0.2595)   & (0.9980) &\\
$\vn{xConv}_{t+1}$  & 0.7229 &  0.3615  & -0.0278  &  0.0637  &  0.1026  &  0.6163 &  -0.0360 &  -0.0710& \\
& (2.3238)   &  (1.0195) & (-0.1533)  &  (0.2868)  &  (0.8016) &   (0.3322)  & (-0.3836)  & (-0.2200)& \\
$y_{t+1}$ & -0.0087  & -0.0215 &   0.0006  &  0.0140  & -0.0049  &  0.8962  &  0.0018 &  -0.0089 &\\
& (-1.0722) &  (-1.9254)  &  (0.2111)  &  (2.3309)  & (-2.0655)  & (9.1198)  &  (0.8533) &  (-1.1866)&\\
$\vn{DefRate}_{t+1}$ & 0.0662 &  -0.0655  &-0.0094 &   0.0486 &  -0.0153   & 0.5947  &  0.9504  &  0.2086& \\ 
& (2.7102)  & (-2.1225) & (-0.6587)  &  (2.4579)  & (-1.7263)  &  (4.7462) &  (8.2119)  &  (6.4868)& \\ 
$\vn{spr}_{t+1}$ & -0.0196  &  0.0289  & -0.0636 &  -0.0349  & -0.0061  &  0.0552  & -0.0073  &  1.0028&\\ 
& (-2.0809)   &  (1.5845)  &  (-7.7777)   & (-2.0494) &  (-1.1787)  &  (0.9975) &  (-1.2758)  & (5.4443)& \\ 
\addlinespace
\midrule  
\addlinespace
\multicolumn{5}{@{}l}{Cross-Correlations of Residuals} \\ 
& \mc{$\vn{rtb}_t$}   & \mc{$\vn{xIG}_t$} & \mc{$\vn{xHY}_t$}     & \mc{$\vn{xEM}_t$} 
& \mc{$\vn{xConv}_t$} & \mc{$y_t$}        & \mc{$\vn{DefRate}_t$} & \mc{$\vn{spr}_t$} &   \\
$\vn{rtb}_{t+1}$ & \mc{\text{--}}& 0.1140 &  0.0502 &  0.0207  &   0.1135  &   0.2269  &   0.1019  &   0.0339 \\
$\vn{xIG}_{t+1}$ & \mc{\text{--}}& \mc{\text{--}}& 0.5636  &   0.7684  &   0.3342  &  -0.0310 &   -0.0992  &  -0.0556  \\
$\vn{xHY}_{t+1}$  & \mc{\text{--}}& \mc{\text{--}}& \mc{\text{--}}& 0.7265  &   0.7244  &  -0.0856  &  -0.1109   &  0.1040 \\
$\vn{xEM}_{t+1}$ & \mc{\text{--}}& \mc{\text{--}}& \mc{\text{--}}& \mc{\text{--}}&   0.5508  &  -0.2182  &  -0.1723  &  -0.0318 \\
$\vn{xConv}_{t+1}$ & \mc{\text{--}}& \mc{\text{--}}& \mc{\text{--}}& \mc{\text{--}}& \mc{\text{--}}& 0.0071 &   -0.0735 &   -0.0327\\
$y_{t+1}$ & \mc{\text{--}}& \mc{\text{--}}& \mc{\text{--}}& \mc{\text{--}}& \mc{\text{--}}& \mc{\text{--}}& 0.1840  &  0.0032 \\ 
$\vn{DefRate}_{t+1}$ & \mc{\text{--}}& \mc{\text{--}}& \mc{\text{--}}& \mc{\text{--}}& \mc{\text{--}}&  \mc{\text{--}}& \mc{\text{--}}&-0.0796 \\ 
$\vn{spr}_{t+1}$ & \mc{\text{--}}& \mc{\text{--}}& \mc{\text{--}}& \mc{\text{--}}& \mc{\text{--}}& \mc{\text{--}} & \mc{\text{--}}& \mc{\text{--}}\\ 
\bottomrule 

\end{tabular}
\end{table}
\end{landscape}
\end{document}

相关内容