我有一个格式很好的表格,但是我必须将字体改为 11pt 和 1.5 倍行距。表格现在超出了页面。任何帮助让它适合页面的帮助都会很棒!
\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{graphics}
\usepackage[margin=25mm]{geometry}
\usepackage{caption}
\usepackage{booktabs, makecell}
\captionsetup{font=footnotesize}
\linespread{1.5}
\begin{document}
\begin{table}[H]
\caption {Country level summary statistics \\ This table demonstrates the observations, firm count, number of investment-grade and speculative-grade corporate credit ratings for each country across the four samples utilized in this study. Panel A and B report NonESG and ESG sample statistics for developed nations, whilst Panel C and D report the aforementioned for developing nations. Countries are reported as developed or developing as defined by the United Nations \citeyearpar{un2020}.}
\centering
\resizebox{\columnwidth}{!}
{\begin{tabular}{ccccccccc}
\toprule
{\thead{Country}} & {\thead{Observations}} & {\thead{Firms}} & {\thead{Investment-\\ grade}} & {\thead{Speculative-\\ grade}} & {\thead{Observations}} & {\thead{Firms}} & {\thead{Investment-\\ grade}} & {\thead{Speculative-\\ grade}} \\
\midrule\addlinespace
\multicolumn{5}{l}{\textit{Panel A: Developed nations - NonESG}} & \multicolumn{4}{l}{\textit{Panel B: Developed nations - ESG}} \\
\addlinespace
Austria & 311 & 6 & 252 & 59 & 195 & 5 & 184 & 11 \\
Australia & 1,855 & 57 & 1,470 & 385 & 1,697 & 49 & 1,362 & 335 \\
Belgium & 238 & 7 & 183 & 55 & 230 & 7 & 180 & 50 \\
Denmark & 224 & 9 & 191 & 33 & 156 & 7 & 146 & 10 \\
Finland & 368 & 7 & 239 & 129 & 303 & 6 & 227 & 76 \\
France & 2,520 & 54 & 2,008 & 512 & 2314 & 49 & 1,932 & 382 \\
Germany & 2346 & 62 & 1,464 & 882 & 1,818 & 50 & 1,248 & 570 \\
Greece & 206 & 7 & 49 & 157 & 150 & 5 & 43 & 107 \\
Ireland & 202 & 6 & 109 & 93 & 167 & 5 & 106 & 61 \\
Italy & 1,112 & 27 & 780 & 332 & 827 & 18 & 712 & 115 \\
Netherlands & 908 & 26 & 663 & 245 & 691 & 17 & 598 & 93 \\
New Zealand & 389 & 12 & 366 & 23 & 292 & 9 & 291 & 1 \\
Norway & 380 & 10 & 246 & 134 & 366 & 9 & 240 & 126 \\
Spain & 865 & 28 & 618 & 247 & 694 & 25 & 601 & 93 \\
Sweden & 971 & 26 & 837 & 134 & 911 & 24 & 814 & 97 \\
Switzerland & 829 & 24 & 686 & 143 & 713 & 23 & 630 & 83 \\
United Kingdom & 3,365 & 112 & 2,332 & 1033 & 3,066 & 101 & 2,210 & 856 \\
United States & 85,480 & 1,854 & 44,445 & 41,035 & 25,632 & 768 & 16,282 & 9,350 \\
\addlinespace
\multicolumn{5}{l}{\textit{Panel C: Developing nations - NonESG}} & \multicolumn{4}{l}{\textit{Panel D: Developing nations - ESG}} \\
\addlinespace
Argentina & 412 & 10 & 1 & 411 & 71 & 8 & 0 & 71 \\
Brazil & 2,049 & 53 & 670 & 1,379 & 1,042 & 34 & 443 & 599 \\
Chile & 811 & 22 & 566 & 245 & 433 & 14 & 342 & 91 \\
Colombia & 146 & 4 & 129 & 17 & 94 & 4 & 93 & 1 \\
Hong Kong & 597 & 15 & 526 & 71 & 554 & 13 & 510 & 44 \\
India & 487 & 20 & 248 & 239 & 357 & 13 & 213 & 144 \\
Indonesia & 946 & 37 & 38 & 908 & 248 & 9 & 38 & 210 \\
Israel & 132 & 5 & 107 & 25 & 97 & 2 & 97 & 0 \\
Kazakhstan & 120 & 5 & 17 & 103 & 32 & 1 & 12 & 20 \\
Malaysia & 388 & 12 & 348 & 40 & 252 & 8 & 244 & 8 \\
Mexico & 1,224 & 36 & 529 & 695 & 448 & 17 & 394 & 54 \\
Peru & 244 & 10 & 78 & 166 & 91 & 8 & 20 & 71 \\
Philippines & 137 & 5 & 35 & 102 & 60 & 2 & 34 & 26 \\
Russia & 1,066 & 38 & 409 & 657 & 732 & 24 & 383 & 349 \\
Singapore & 377 & 14 & 307 & 70 & 253 & 7 & 247 & 6 \\
Taiwan & 333 & 11 & 330 & 3 & 291 & 9 & 291 & 0 \\
Thailand & 491 & 14 & 378 & 113 & 262 & 9 & 212 & 50 \\
South Africa & 152 & 5 & 76 & 76 & 123 & 5 & 65 & 58 \\
South Korea & 691 & 24 & 657 & 34 & 678 & 23 & 647 & 31 \\
\bottomrule
\end{tabular}}
\end{table}
\end{document}
答案1
不要应用于\resizebox
表格,只需选择合适的字体大小。
这可以进一步整理,但为了帮助您入门:
\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{graphics}
\usepackage[margin=25mm]{geometry}
\usepackage{caption}
\usepackage{booktabs, makecell}
\captionsetup{font=footnotesize}
\linespread{1.5}
\def\citeyearpar{}
\begin{document}
\begin{table}
\caption {Country level summary statistics \\ This table demonstrates the observations, firm count, number of investment-grade and speculative-grade corporate credit ratings for each country across the four samples utilized in this study. Panel A and B report NonESG and ESG sample statistics for developed nations, whilst Panel C and D report the aforementioned for developing nations. Countries are reported as developed or developing as defined by the United Nations \citeyearpar{un2020}.}
\centering
\footnotesize
\renewcommand\arraystretch{.7}
\setlength\tabcolsep{2pt}
\begin{tabular}{@{}ccccccccc@{}}
\toprule
{\thead{Country}} & {\thead{Observations}} & {\thead{Firms}} & {\thead{Investment-\\ grade}} & {\thead{Speculative-\\ grade}} & {\thead{Observations}} & {\thead{Firms}} & {\thead{Investment-\\ grade}} & {\thead{Speculative-\\ grade}} \\
\midrule\addlinespace
\multicolumn{5}{l}{\textit{Panel A: Developed nations - NonESG}} & \multicolumn{4}{l}{\textit{Panel B: Developed nations - ESG}} \\
\addlinespace
Austria & 311 & 6 & 252 & 59 & 195 & 5 & 184 & 11 \\
Australia & 1,855 & 57 & 1,470 & 385 & 1,697 & 49 & 1,362 & 335 \\
Belgium & 238 & 7 & 183 & 55 & 230 & 7 & 180 & 50 \\
Denmark & 224 & 9 & 191 & 33 & 156 & 7 & 146 & 10 \\
Finland & 368 & 7 & 239 & 129 & 303 & 6 & 227 & 76 \\
France & 2,520 & 54 & 2,008 & 512 & 2314 & 49 & 1,932 & 382 \\
Germany & 2346 & 62 & 1,464 & 882 & 1,818 & 50 & 1,248 & 570 \\
Greece & 206 & 7 & 49 & 157 & 150 & 5 & 43 & 107 \\
Ireland & 202 & 6 & 109 & 93 & 167 & 5 & 106 & 61 \\
Italy & 1,112 & 27 & 780 & 332 & 827 & 18 & 712 & 115 \\
Netherlands & 908 & 26 & 663 & 245 & 691 & 17 & 598 & 93 \\
New Zealand & 389 & 12 & 366 & 23 & 292 & 9 & 291 & 1 \\
Norway & 380 & 10 & 246 & 134 & 366 & 9 & 240 & 126 \\
Spain & 865 & 28 & 618 & 247 & 694 & 25 & 601 & 93 \\
Sweden & 971 & 26 & 837 & 134 & 911 & 24 & 814 & 97 \\
Switzerland & 829 & 24 & 686 & 143 & 713 & 23 & 630 & 83 \\
United Kingdom & 3,365 & 112 & 2,332 & 1033 & 3,066 & 101 & 2,210 & 856 \\
United States & 85,480 & 1,854 & 44,445 & 41,035 & 25,632 & 768 & 16,282 & 9,350 \\
\addlinespace
\multicolumn{5}{l}{\textit{Panel C: Developing nations - NonESG}} & \multicolumn{4}{l}{\textit{Panel D: Developing nations - ESG}} \\
\addlinespace
Argentina & 412 & 10 & 1 & 411 & 71 & 8 & 0 & 71 \\
Brazil & 2,049 & 53 & 670 & 1,379 & 1,042 & 34 & 443 & 599 \\
Chile & 811 & 22 & 566 & 245 & 433 & 14 & 342 & 91 \\
Colombia & 146 & 4 & 129 & 17 & 94 & 4 & 93 & 1 \\
Hong Kong & 597 & 15 & 526 & 71 & 554 & 13 & 510 & 44 \\
India & 487 & 20 & 248 & 239 & 357 & 13 & 213 & 144 \\
Indonesia & 946 & 37 & 38 & 908 & 248 & 9 & 38 & 210 \\
Israel & 132 & 5 & 107 & 25 & 97 & 2 & 97 & 0 \\
Kazakhstan & 120 & 5 & 17 & 103 & 32 & 1 & 12 & 20 \\
Malaysia & 388 & 12 & 348 & 40 & 252 & 8 & 244 & 8 \\
Mexico & 1,224 & 36 & 529 & 695 & 448 & 17 & 394 & 54 \\
Peru & 244 & 10 & 78 & 166 & 91 & 8 & 20 & 71 \\
Philippines & 137 & 5 & 35 & 102 & 60 & 2 & 34 & 26 \\
Russia & 1,066 & 38 & 409 & 657 & 732 & 24 & 383 & 349 \\
Singapore & 377 & 14 & 307 & 70 & 253 & 7 & 247 & 6 \\
Taiwan & 333 & 11 & 330 & 3 & 291 & 9 & 291 & 0 \\`
Thailand & 491 & 14 & 378 & 113 & 262 & 9 & 212 & 50 \\
South Africa & 152 & 5 & 76 & 76 & 123 & 5 & 65 & 58 \\
South Korea & 691 & 24 & 657 & 34 & 678 & 23 & 647 & 31 \\
\bottomrule
\end{tabular}
\end{table}
\end{document}
答案2
与@David Carlisle 在他的回答中所建议的类似(+1)。
如果您允许表格主体紧密排列,那么您仍然可以使用normalsize
字体将表格放在一页上。O 根据一些题外的建议,您的表格可以如下所示:
\documentclass[11pt]{article}
\usepackage[margin=25mm]{geometry}
\usepackage{graphics}
\usepackage{caption}
\captionsetup{font=footnotesize}
\usepackage{siunitx} % new
\usepackage{xparse} % new
\NewExpandableDocumentCommand\mcl{O{1}m} % new
{\multicolumn{#1}{l}{#2}}
\usepackage{booktabs, makecell, threeparttable}
\renewcommand\theadgape{}
\linespread{1.5}
\def\citeyearpar{}
\begin{document}
\begin{table}[htp]
\caption[Country level summary statistics]{Country level summary statistics \\
This table demonstrates the observations, firm count, number of investment-grade and speculative-grade corporate credit ratings for each country across the four samples utilized in this study. Panel A and B report NonESG and ESG sample statistics for developed nations, whilst Panel C and D report the aforementioned for developing nations. Countries are reported as developed or developing as defined by the United Nations \citeyearpar{un2020}.}
\sisetup{table-format=5.0,
group-minimum-digits = 3,
group-separator={\,}
}
\linespread{0.96}\selectfont % <----
\setlength\tabcolsep{0pt} % <----
\begin{tabular*}{\linewidth}{@{\extracolsep{\fill}}l % <----
SS[table-format=4.0]SS % <----
SS[table-format=4.0]SS} % <----
\toprule
\thead{Country}
& {\thead{Observations}}
& {\thead{Firms}}
& {\thead{Investment\\ grade}}
& {\thead{Speculative\\ grade}}
& {\thead{Observations}}
& {\thead{Firms}}
& {\thead{Investment\\ grade}}
& {\thead{Speculative\\ grade}} \\
\midrule
\mcl[5]{\textit{Panel A: Developed nations - NonESG}}
& \mcl[4]{\textit{Panel B: Developed nations - ESG}} \\
\cmidrule{1-5} % <----
\cmidrule{6-9} % <----
Austria & 311 & 6 & 252 & 59 & 195 & 5 & 184 & 11 \\
Australia & 1 855 & 57 & 1 470 & 385 & 1 697 & 49 & 1 362 & 335 \\
Belgium & 238 & 7 & 183 & 55 & 230 & 7 & 180 & 50 \\
Denmark & 224 & 9 & 191 & 33 & 156 & 7 & 146 & 10 \\
Finland & 368 & 7 & 239 & 129 & 303 & 6 & 227 & 76 \\
France & 2 520 & 54 & 2 008 & 512 & 2314 & 49 & 1 932 & 382 \\
Germany & 2346 & 62 & 1 464 & 882 & 1 818 & 50 & 1 248 & 570 \\
Greece & 206 & 7 & 49 & 157 & 150 & 5 & 43 & 107 \\
Ireland & 202 & 6 & 109 & 93 & 167 & 5 & 106 & 61 \\
Italy & 1 112 & 27 & 780 & 332 & 827 & 18 & 712 & 115 \\
Netherlands & 908 & 26 & 663 & 245 & 691 & 17 & 598 & 93 \\
New Zealand & 389 & 12 & 366 & 23 & 292 & 9 & 291 & 1 \\
Norway & 380 & 10 & 246 & 134 & 366 & 9 & 240 & 126 \\
Spain & 865 & 28 & 618 & 247 & 694 & 25 & 601 & 93 \\
Sweden & 971 & 26 & 837 & 134 & 911 & 24 & 814 & 97 \\
Switzerland & 829 & 24 & 686 & 143 & 713 & 23 & 630 & 83 \\
United Kingdom & 3 365 & 112 & 2 332 & 1033 & 3 066 & 101 & 2 210 & 856 \\
United States & 85 480 & 1 854 & 44 445 & 41 035 & 25 632 & 768 & 16 282 & 9 350 \\
\addlinespace
\mcl[5]{\textit{Panel C: Developing nations - NonESG}}
& \mcl[4]{\textit{Panel D: Developing nations - ESG}} \\
\cmidrule{1-5} % <----
\cmidrule{6-9} % <----
Argentina & 412 & 10 & 1 & 411 & 71 & 8 & 0 & 71 \\
Brazil & 2 049 & 53 & 670 & 1 379 & 1 042 & 34 & 443 & 599 \\
Chile & 811 & 22 & 566 & 245 & 433 & 14 & 342 & 91 \\
Colombia & 146 & 4 & 129 & 17 & 94 & 4 & 93 & 1 \\
Hong Kong & 597 & 15 & 526 & 71 & 554 & 13 & 510 & 44 \\
India & 487 & 20 & 248 & 239 & 357 & 13 & 213 & 144 \\
Indonesia & 946 & 37 & 38 & 908 & 248 & 9 & 38 & 210 \\
Israel & 132 & 5 & 107 & 25 & 97 & 2 & 97 & 0 \\
Kazakhstan & 120 & 5 & 17 & 103 & 32 & 1 & 12 & 20 \\
Malaysia & 388 & 12 & 348 & 40 & 252 & 8 & 244 & 8 \\
Mexico & 1 224 & 36 & 529 & 695 & 448 & 17 & 394 & 54 \\
Peru & 244 & 10 & 78 & 166 & 91 & 8 & 20 & 71 \\
Philippines & 137 & 5 & 35 & 102 & 60 & 2 & 34 & 26 \\
Russia & 1 066 & 38 & 409 & 657 & 732 & 24 & 383 & 349 \\
Singapore & 377 & 14 & 307 & 70 & 253 & 7 & 247 & 6 \\
Taiwan & 333 & 11 & 330 & 3 & 291 & 9 & 291 & 0 \\ Thailand & 491 & 14 & 378 & 113 & 262 & 9 & 212 & 50 \\
South Africa & 152 & 5 & 76 & 76 & 123 & 5 & 65 & 58 \\
South Korea & 691 & 24 & 657 & 34 & 678 & 23 & 647 & 31 \\
\bottomrule
\end{tabular*}
\end{table}
\end{document}
与您的表代码相比,进行了以下更改:
- 行间空间减少了
\linespread{0.96}\selectfont
- 对于表使用 ˙tabular*` 环境
\extracolsep
列分隔通过宏计算- 第一列是使用的
l
类型,其他的是S
列 - 对于组分隔符,使用小空格代替逗号
(红线表示文字边框)