
Ich hatte eine Tabelle schön formatiert, musste jedoch die Schriftart auf 11pt und 1,5 Zeilenabstand ändern. Die Tabelle geht jetzt über die Seite hinaus. Jede Hilfe, um sie auf die Seite zu bringen, wäre großartig!
\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}
Antwort1
Niemals \resizebox
auf Tabellen anwenden, sondern nur eine passende Schriftgröße wählen.
Dies könnte noch übersichtlicher gestaltet werden, aber um Ihnen den Einstieg zu erleichtern:
\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}
Antwort2
Ähnlich wie @David Carlisle in seiner Antwort (+1) vorgeschlagen hat.
Wenn Sie einen Tabellenkörper mit engen Abständen zulassen, können Sie die Tabelle mithilfe normalsize
der Schriftart trotzdem auf eine Seite bringen. O Mit einigen themenfremden Vorschlägen kann Ihre Tabelle wie folgt aussehen:
\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}
Im Vergleich zu Ihrem Tabellencode wurden folgende Änderungen vorgenommen:
- Der Abstand zwischen den Reihen wird verringert durch
\linespread{0.96}\selectfont
- für die Tabelle wird die Umgebung „tabular*“ verwendet
- Die Spaltentrennung wird per
\extracolsep
Makro berechnet - für die erste Spalte wird
l
der Typ verwendet, die anderen sindS
Spalten - als Gruppentrennzeichen werden anstelle von Kommas kleine Leerzeichen verwendet
(rote Linien zeigen Textränder)