\documentclass[twoside, a4paper, 11pt]{article}
\usepackage{ragged2e}
\usepackage{booktabs,tabularx}
\usepackage{amsfonts}
\usepackage{amsthm}
\usepackage{mathtools}
\usepackage{verbatim}
\usepackage{amsmath, amssymb}
\usepackage{natbib}
%\def\pgfsysdriver{pgfsys-dvipdfm.def}
\usepackage{tikz}
\usepackage{enumerate}
\usetikzlibrary{matrix, arrows}
\usepackage{graphicx}
\usepackage{subfig}
\usepackage{listings}
\usepackage{color}
%\usepackage{hyperref}
\usepackage{float}
\usepackage{multicol}
\usepackage{booktabs}
\usepackage{lscape}
\usepackage{cases}
\usepackage{multirow}
\usepackage{rotating}
\usepackage{setspace}
\usepackage{lscape}
\usepackage{longtable}
\usepackage{caption}
\usepackage[update,prepend]{epstopdf}
%\usepackage{mathpazo}
%\usepackage{eulervm}
%\usepackage{iwona}
\usepackage[pdftex,colorlinks,linkcolor=blue,citecolor=blue]{hyperref}
\usepackage[official]{eurosym}
\setlength{\textwidth}{6.5in}
\setlength{\oddsidemargin}{0in}
\setlength{\evensidemargin}{0in}
\setlength{\parindent}{0pt}
\setlength{\parskip}{1ex plus 0.5ex minus 0.2ex}
\linespread{1.5}
\usepackage[top=2.5cm, bottom=2.5cm, left=2cm, right=2cm]{geometry}
\raggedbottom
\everymath{\displaystyle}
\newcommand{\pder}[2][]{\frac{\partial#1}{\partial#2}}
\renewcommand\textfraction{.1}
\begin{document}
\begin{landscape}
% Table generated by Excel2LaTeX from sheet 'Sheet1'
\begin{table}[htbp]
\centering
\caption{Add caption}
\begin{tabular}{ccccccccccccc}
\toprule
Dependent variable: & $CoJPoD_{sov \ system|sov}$ & & $\Delta CoJPoD_{sov \ system|sov}$ & & $CoJPoD_{sov|sov \ system}$ & & $CoJPoD_{bank \ system|sov}$ & & $\Delta CoJPoD_{bank \ system|sov}$ & & $CoJPoD_{sov|bank \ system}$ & \\
\midrule
& & & & & & & & & & & & \\
& \textbf{(1)} & \textbf{(2)} & \textbf{(3)} & \textbf{(4)} & \textbf{(5)} & \textbf{(6)} & (7) & (8) & (9) & (10) & (11) & (12) \\
& & & & & & & & & & & & \\
Constant & -11.116*** & -10.212*** & -6.668*** & -5.740*** & 13.194*** & 13.903*** & -7.270*** & -7.551*** & -6.224*** & -6.290*** & 16.927*** & 17.078*** \\
& (-2.975) & (-3.600) & (-2.980) & (-3.000) & (3.634) & (3.570) & (-2.607) & (-2.931) & (-2.907) & (-3.312) & (4.759) & (3.880) \\
Market Ret (6 months rolling) (\%) & 0.001*** & & 0.001*** & & 0.000 & & 0.000 & & 0.000* & & -0.000* & \\
& (3.065) & & (3.696) & & (-0.016) & & (1.086) & & (1.652) & & (-1.862) & \\
Market Vol (6 months rolling) (\%) & 0.008 & & 0.009 & & 0.008 & & -0.008 & & -0.002 & & -0.001 & \\
& (0.696) & & (1.143) & & (0.464) & & (-1.049) & & (-0.301) & & (-0.083) & \\
Market Ret (1 month avg) (\%) & & 0.025*** & & 0.020*** & & -0.020** & & 0.011** & & 0.012*** & & -0.029** \\
& & (3.235) & & (3.606) & & (-2.118) & & (2.283) & & (3.247) & & (-2.530) \\
Market Vol (1 month avg) (\%) & & -0.020*** & & -0.017*** & & 0.001 & & -0.010*** & & -0.006*** & & 0.004 \\
& & (-4.329) & & (-5.025) & & (0.105) & & (-3.444) & & (-2.804) & & (0.449) \\
Log GDP & 0.913*** & 0.840*** & 0.550*** & 0.475*** & -1.180*** & -1.239*** & 0.602** & 0.626*** & 0.522*** & 0.529*** & -1.492*** & -1.505*** \\
& (2.922) & (3.529) & (2.960) & (3.008) & (-3.878) & (-3.778) & (2.570) & (2.893) & (2.913) & (3.324) & (-4.890) & (-3.976) \\
Debt/GDP (\%) & 0.004*** & 0.004*** & 0.002** & 0.002** & 0.004* & 0.004* & 0.003*** & 0.003*** & 0.002** & 0.002** & 0.003 & 0.003 \\
& (2.836) & (2.861) & (1.981) & (1.975) & (1.775) & (1.764) & (2.657) & (2.689) & (2.062) & (2.075) & (1.540) & (1.566) \\
Reserve/Debt (\%) & 0.069** & 0.071** & 0.043** & 0.045** & 0.075** & 0.073** & 0.051*** & 0.053*** & 0.036*** & 0.037*** & 0.057** & 0.055** \\
& (2.512) & (2.372) & (2.130) & (1.964) & (2.405) & (2.367) & (2.974) & (3.099) & (2.746) & (2.803) & (2.204) & (2.202) \\
Term Spread (\%) & 0.042*** & 0.042*** & 0.038*** & 0.037*** & 0.012 & 0.015** & 0.012*** & 0.010*** & 0.009*** & 0.008*** & -0.003 & -0.002 \\
& (6.331) & (6.990) & (7.131) & (7.323) & (1.330) & (1.985) & (4.036) & (4.962) & (3.790) & (5.111) & (-0.248) & (-0.186) \\
VSTOXX (\%) & 0.004*** & 0.004*** & 0.003*** & 0.003*** & 0.008*** & 0.008*** & 0.003*** & 0.003*** & 0.001*** & 0.001*** & 0.007*** & 0.007*** \\
& (4.920) & (4.380) & (4.450) & (3.916) & (7.650) & (8.089) & (6.285) & (6.200) & (3.514) & (3.497) & (5.211) & (6.388) \\
& & & & & & & & & & & & \\
Bank fixed effects & Yes & Yes & Yes & Yes & Yes & Yes & Yes & Yes & Yes & Yes & Yes & Yes \\
No. of observations & 620 & 620 & 620 & 620 & 620 & 620 & 620 & 620 & 620 & 620 & 620 & 620 \\
Adjusted R\^2 & 0.728 & 0.720 & 0.774 & 0.761 & 0.822 & 0.822 & 0.718 & 0.721 & 0.772 & 0.774 & 0.784 & 0.785 \\
\bottomrule
\end{tabular}%
\label{tab:addlabel}%
\end{table}%
\end{landscape}
\end{document}
有人知道我该如何将这个表格很好地放在横向 A4 页面上吗?对于当前代码,列 (7) 及以后的列无法放在页面上。\scalebox
但是我尝试过,这会使数字变得太小,几乎无法阅读。任何建议都将不胜感激。
编辑:
答案1
这样就合适了,我修复了标题以使用正确的字体(永远不要将多字母单词设置为数学斜体),但随后我注释掉了整个标题。列宽由标题宽度决定。显然你需要一些标题,但我没有相关知识来建议替代的标题布局。
\documentclass[a4paper]{article}
\usepackage{pdflscape,array,booktabs}
\begin{document}
\begin{landscape}
\setlength\tabcolsep{1pt}
\footnotesize
% Table generated by Excel2LaTeX from sheet 'Sheet1'
\begin{table}[htbp]
\centering
\vspace*{-1.5cm}
\caption{Add caption}
\hspace*{-5pt}\begin{tabular}{>{\raggedright}p{2.2cm}cccccccccccc}
\toprule
% Dependent variable: &
%\multicolumn{2}{c}{$CoJPoD_{\mathrm{{sov \ system|sov}}}$}&
%\multicolumn{2}{c}{$\Delta CoJPoD_{\mathrm{sov \ system|sov}}$}&
%\multicolumn{2}{c}{$CoJPoD_{\mathrm{sov|sov \ system}}$}&
%\multicolumn{2}{c}{$CoJPoD_{\mathrm{bank \ system|sov}}$}&
%\multicolumn{2}{c}{$\Delta CoJPoD_{\mathrm{bank \ system|sov}}$}&
%\multicolumn{2}{c}{$CoJPoD_{\mathrm{sov|bank \ system}}$}\\
% \midrule
& & & & & & & & & & & & \\
& \textbf{(1)} & \textbf{(2)} & \textbf{(3)} & \textbf{(4)} & \textbf{(5)} & \textbf{(6)} & (7) & (8) & (9) & (10) & (11) & (12) \\
& & & & & & & & & & & & \\
Constant & -11.116*** & -10.212*** & -6.668*** & -5.740*** & 13.194*** & 13.903*** & -7.270*** & -7.551*** & -6.224*** & -6.290*** & 16.927*** & 17.078*** \\
& (-2.975) & (-3.600) & (-2.980) & (-3.000) & (3.634) & (3.570) & (-2.607) & (-2.931) & (-2.907) & (-3.312) & (4.759) & (3.880) \\
Market Ret (6 months rolling) (\%) & 0.001*** & & 0.001*** & & 0.000 & & 0.000 & & 0.000* & & -0.000* & \\
& (3.065) & & (3.696) & & (-0.016) & & (1.086) & & (1.652) & & (-1.862) & \\
Market Vol (6 months rolling) (\%) & 0.008 & & 0.009 & & 0.008 & & -0.008 & & -0.002 & & -0.001 & \\
& (0.696) & & (1.143) & & (0.464) & & (-1.049) & & (-0.301) & & (-0.083) & \\
Market Ret (1 month avg) (\%) & & 0.025*** & & 0.020*** & & -0.020** & & 0.011** & & 0.012*** & & -0.029** \\
& & (3.235) & & (3.606) & & (-2.118) & & (2.283) & & (3.247) & & (-2.530) \\
Market Vol (1 month avg) (\%) & & -0.020*** & & -0.017*** & & 0.001 & & -0.010*** & & -0.006*** & & 0.004 \\
& & (-4.329) & & (-5.025) & & (0.105) & & (-3.444) & & (-2.804) & & (0.449) \\
Log GDP & 0.913*** & 0.840*** & 0.550*** & 0.475*** & -1.180*** & -1.239*** & 0.602** & 0.626*** & 0.522*** & 0.529*** & -1.492*** & -1.505*** \\
& (2.922) & (3.529) & (2.960) & (3.008) & (-3.878) & (-3.778) & (2.570) & (2.893) & (2.913) & (3.324) & (-4.890) & (-3.976) \\
Debt/GDP (\%) & 0.004*** & 0.004*** & 0.002** & 0.002** & 0.004* & 0.004* & 0.003*** & 0.003*** & 0.002** & 0.002** & 0.003 & 0.003 \\
& (2.836) & (2.861) & (1.981) & (1.975) & (1.775) & (1.764) & (2.657) & (2.689) & (2.062) & (2.075) & (1.540) & (1.566) \\
Reserve/Debt (\%) & 0.069** & 0.071** & 0.043** & 0.045** & 0.075** & 0.073** & 0.051*** & 0.053*** & 0.036*** & 0.037*** & 0.057** & 0.055** \\
& (2.512) & (2.372) & (2.130) & (1.964) & (2.405) & (2.367) & (2.974) & (3.099) & (2.746) & (2.803) & (2.204) & (2.202) \\
Term Spread (\%) & 0.042*** & 0.042*** & 0.038*** & 0.037*** & 0.012 & 0.015** & 0.012*** & 0.010*** & 0.009*** & 0.008*** & -0.003 & -0.002 \\
& (6.331) & (6.990) & (7.131) & (7.323) & (1.330) & (1.985) & (4.036) & (4.962) & (3.790) & (5.111) & (-0.248) & (-0.186) \\
VSTOXX (\%) & 0.004*** & 0.004*** & 0.003*** & 0.003*** & 0.008*** & 0.008*** & 0.003*** & 0.003*** & 0.001*** & 0.001*** & 0.007*** & 0.007*** \\
& (4.920) & (4.380) & (4.450) & (3.916) & (7.650) & (8.089) & (6.285) & (6.200) & (3.514) & (3.497) & (5.211) & (6.388) \\
& & & & & & & & & & & & \\
Bank fixed effects & Yes & Yes & Yes & Yes & Yes & Yes & Yes & Yes & Yes & Yes & Yes & Yes \\
No. of observations & 620 & 620 & 620 & 620 & 620 & 620 & 620 & 620 & 620 & 620 & 620 & 620 \\
Adjusted R\^2 & 0.728 & 0.720 & 0.774 & 0.761 & 0.822 & 0.822 & 0.718 & 0.721 & 0.772 & 0.774 & 0.784 & 0.785 \\
\bottomrule
\end{tabular}\hspace*{-5pt}%
\label{tab:addlabel}%
\end{table}%
\end{landscape}
\end{document}
答案2
以下是我尝试使表格适合文本块的过程。我所做的一些最重要的更改如下:
- 将字体大小更改为
\footnotesize
(9pt
在本例中) - 减少
\tabcolsep
(控制列间空白)从6pt
到3.5pt
- 缩短第一列的标签
- 将 ***、** 和 * 替换为上标星号(更节省空间)
其他重要变化:
- 使用
dcolumn
包和D
列类型将小数点上的数字对齐 - 使用
rotating
包和sidewaystable
环境而不是lscape
- 对于“CoJPoD”,使用文本斜体而不是数学斜体,以直立文本字体排版相关下标材料。
\documentclass[twoside, a4paper, 11pt]{article}
\usepackage{ragged2e}
\usepackage{booktabs,tabularx}
\usepackage{amsfonts}
\usepackage{amsthm}
\usepackage{mathtools}
\usepackage{verbatim}
\usepackage{amsmath, amssymb}
\usepackage{natbib}
%\def\pgfsysdriver{pgfsys-dvipdfm.def}
\usepackage{tikz}
\usepackage{enumerate}
\usetikzlibrary{matrix, arrows}
\usepackage{graphicx}
\usepackage{subfig}
\usepackage{listings}
\usepackage{color}
%\usepackage{hyperref}
\usepackage{float}
\usepackage{multicol}
\usepackage{booktabs}
\usepackage{lscape}
\usepackage{cases}
\usepackage{multirow}
\usepackage{rotating}
\usepackage{setspace}
\usepackage{longtable}
\usepackage{caption}
\usepackage[update,prepend]{epstopdf}
%\usepackage{mathpazo}
%\usepackage{eulervm}
%\usepackage{iwona}
\usepackage[pdftex,colorlinks,linkcolor=blue,citecolor=blue]{hyperref}
\usepackage[official]{eurosym}
\setlength{\textwidth}{6.5in}
\setlength{\oddsidemargin}{0in}
\setlength{\evensidemargin}{0in}
\setlength{\parindent}{0pt}
\setlength{\parskip}{1ex plus 0.5ex minus 0.2ex}
\linespread{1.5}
\usepackage[vmargin=2.5cm, hmargin=2cm]{geometry}
\raggedbottom
\everymath{\displaystyle}
\newcommand{\pder}[2][]{\frac{\partial#1}{\partial#2}}
% new code:
\usepackage{rotating}
\renewcommand\textfraction{.1}
\newcommand{\CoJPoD}{\textit{CoJPoD}}
\usepackage{dcolumn}
\newcommand{\mc}[1]{\multicolumn{1}{c}{#1}}
\newcommand{\astiii}{^{***}}
\newcommand{\astii}{^{**}}
\newcommand{\asti}{^{*}}
\renewcommand{\tabcolsep}{3.5pt}
\begin{document}
%\begin{landscape}
\begin{sidewaystable}
% Table generated by Excel2LaTeX from sheet 'Sheet1'
%\begin{table}[htbp]
\footnotesize
\caption{Add caption}
\begin{tabular}{@{}l *{12}{D{.}{.}{6}}@{}}
\toprule
Indep.\ variables & \multicolumn{12}{c@{}}{Dependent variables}\\
\cmidrule(l){2-13}
& \multicolumn{2}{c}{$\CoJPoD_{(\text{sov system}|\text{sov})}$} &
\multicolumn{2}{c}{$\Delta \CoJPoD_{(\text{sov system}|\text{sov})}$} &
\multicolumn{2}{c}{$\CoJPoD_{(\text{sov}|\text{sov system})}$} &
\multicolumn{2}{c}{$\CoJPoD_{(\text{bank system}|\text{sov})}$} &
\multicolumn{2}{c}{$\Delta \CoJPoD_{(\text{bank system}|\text{sov}}$} &
\multicolumn{2}{c}{$\CoJPoD_{(\text{sov}|\text{bank system})}$} \\
\midrule
\\
&\mc{\textbf{(1)}} &\mc{\textbf{(2)}} & \mc{\textbf{(3)}}
&\mc{\textbf{(4)}} &\mc{\textbf{(5)}} & \mc{\textbf{(6)}}
&\mc{\textbf{(7)}} &\mc{\textbf{(8)}} & \mc{\textbf{(9)}}
&\mc{\textbf{(10)}}&\mc{\textbf{(11)}}&\mc{\textbf{(12)}}\\
\\
Constant & -11.116\astiii & -10.212\astiii & -6.668\astiii & -5.740\astiii & 13.194\astiii & 13.903\astiii & -7.270\astiii & -7.551\astiii & -6.224\astiii & -6.290\astiii & 16.927\astiii & 17.078\astiii \\
& (-2.975) & (-3.600) & (-2.980) & (-3.000) & (3.634) & (3.570) & (-2.607) & (-2.931) & (-2.907) & (-3.312) & (4.759) & (3.880) \\
Market Ret & 0.001\astiii & & 0.001\astiii & & 0.000 & & 0.000 & & 0.000\asti & & -0.000\asti & \\
\ \ (6 mo rolling)& (3.065) & & (3.696) & & (-0.016) & & (1.086) & & (1.652) & & (-1.862) & \\
Market Vol & 0.008 & & 0.009 & & 0.008 & & -0.008 & & -0.002 & & -0.001 & \\
\ \ (6 mo rolling) & (0.696) & & (1.143) & & (0.464) & & (-1.049) & & (-0.301) & & (-0.083) & \\
Market Ret & & 0.025\astiii & & 0.020\astiii & & -0.020\astii & & 0.011\astii & & 0.012\astiii & & -0.029\astii \\
\ \ (1 mo avg) & & (3.235) & & (3.606) & & (-2.118) & & (2.283) & & (3.247) & & (-2.530) \\
Market Vol & & -0.020\astiii & & -0.017\astiii & & 0.001 & & -0.010\astiii & & -0.006\astiii & & 0.004 \\
\ \ (1 mo avg) & & (-4.329) & & (-5.025) & & (0.105) & & (-3.444) & & (-2.804) & & (0.449) \\
Log GDP & 0.913\astiii & 0.840\astiii & 0.550\astiii & 0.475\astiii & -1.180\astiii & -1.239\astiii & 0.602\astii & 0.626\astiii & 0.522\astiii & 0.529\astiii & -1.492\astiii & -1.505\astiii \\
& (2.922) & (3.529) & (2.960) & (3.008) & (-3.878) & (-3.778) & (2.570) & (2.893) & (2.913) & (3.324) & (-4.890) & (-3.976) \\
Debt/GDP & 0.004\astiii & 0.004\astiii & 0.002\astii & 0.002\astii & 0.004\asti & 0.004\asti & 0.003\astiii & 0.003\astiii & 0.002\astii & 0.002\astii & 0.003 & 0.003 \\
& (2.836) & (2.861) & (1.981) & (1.975) & (1.775) & (1.764) & (2.657) & (2.689) & (2.062) & (2.075) & (1.540) & (1.566) \\
Reserve/Debt & 0.069\astii & 0.071\astii & 0.043\astii & 0.045\astii & 0.075\astii & 0.073\astii & 0.051\astiii & 0.053\astiii & 0.036\astiii & 0.037\astiii & 0.057\astii & 0.055\astii \\
& (2.512) & (2.372) & (2.130) & (1.964) & (2.405) & (2.367) & (2.974) & (3.099) & (2.746) & (2.803) & (2.204) & (2.202) \\
Term Spread & 0.042\astiii & 0.042\astiii & 0.038\astiii & 0.037\astiii & 0.012 & 0.015\astii & 0.012\astiii & 0.010\astiii & 0.009\astiii & 0.008\astiii & -0.003 & -0.002 \\
& (6.331) & (6.990) & (7.131) & (7.323) & (1.330) & (1.985) & (4.036) & (4.962) & (3.790) & (5.111) & (-0.248) & (-0.186) \\
VSTOXX & 0.004\astiii & 0.004\astiii & 0.003\astiii & 0.003\astiii & 0.008\astiii & 0.008\astiii & 0.003\astiii & 0.003\astiii & 0.001\astiii & 0.001\astiii & 0.007\astiii & 0.007\astiii \\
& (4.920) & (4.380) & (4.450) & (3.916) & (7.650) & (8.089) & (6.285) & (6.200) & (3.514) & (3.497) & (5.211) & (6.388) \\
\\
Bank fixed eff. & \mc{Yes} & \mc{Yes} & \mc{Yes} & \mc{Yes} & \mc{Yes} & \mc{Yes} & \mc{Yes} & \mc{Yes} & \mc{Yes} & \mc{Yes} & \mc{Yes} & \mc{Yes} \\
No.\ of obs. & \mc{620} & \mc{620} & \mc{620} & \mc{620} & \mc{620} & \mc{620} & \mc{620} & \mc{620} & \mc{620} & \mc{620} & \mc{620} & \mc{620} \\
Adjusted $R^2$ & 0.728 & 0.720 & 0.774 & 0.761 & 0.822 & 0.822 & 0.718 & 0.721 & 0.772 & 0.774 & 0.784 & 0.785 \\
\bottomrule
\end{tabular}%
\smallskip
Remark: All independent variables except $\log\text{GDP}$ measured in \%.
\label{tab:addlabel}%
% \end{table}%
%
% \end{landscape}
\end{sidewaystable}
\end{document}