我一直试图对齐我所有表格上方的文本,但无济于事。最初,我使用了,但这\begin{flushleft}
是一个糟糕的解决方案,因为它使文本左对齐并使其看起来像这样:
这不会将文本对齐以使其跨越到正确的文本边距。 我也尝试使用环境\begin{justification}
,但这也无济于事,因为它似乎只是将文本居中。 我该如何对齐文本,以便计算文本边距? 我将我的代码作为 MWE 发布如下:
\usepackage[table,xcdraw]{xcolor}
\usepackage{booktabs}
\usepackage{subcaption}
\usepackage[labelfont=bf]{caption}
\captionsetup{labelfont=bf}
\documentclass{article}
\begin{document}
\begin{table}[h]
\centering
\caption{Valuation errors by the combinatorial selection schemes for the S\&P sub-indices}
\label{Results.Robustness.FirmSize}
\begin{flushleft} This table reports the median and arithmetic mean of the absolute percentage errors generated by the two combinatorial peer selection schemes SBP\Plus SARD and GICS\Plus SARD, for constituents of the S\&P 500, 400 and 600 indices. The median and arithmetic mean of the pairwise valuation error differences are statistically tested through the Wilcoxon signed rank test and Student's t-test, respectively. Each combinatorial selection scheme has used the EV/EBITDA, EV/EBIT and P/E multiple to value a target firm. A positive pairwise median difference indicates that the SBP\Plus SARD generates a higher valuation accuracy, relative to GICS\Plus SARD, and vice versa. Statistical significance is denoted by *, **, *** indicating 10\%, 5\% and 1\% respectively. \\
\end{flushleft} \vspace{0.2cm}
\begin{tabular}{|lccc|}
\hline
\rowcolor[HTML]{003085}
{\color[HTML]{FFFFFF} \textbf{S\&P 500}} & {\color[HTML]{FFFFFF} \textbf{Median}} & {\color[HTML]{FFFFFF} \textbf{Mean}} & {\color[HTML]{FFFFFF} \textbf{IQ range}} \\
\textbf{EV/EBITDA} & & & \\
GICS+SARD & 25.1\% (2) & 31.5\% (2) & 34.2\% (2) \\
SBP+SARD & 20.7\% (1) & 27.9\% (1) & 27.4\% (1) \\
Pairwise difference & \textbf{4.2\%***} & \textbf{3.5\%***} & \\
\textbf{EV/EBIT} & & & \\
GICS+SARD & 23.7\% (2) & 29.6\% (2) & 31.4\% (2) \\
SBP+SARD & 20.5\% (1) & 27.5\% (1) & 28.2\% (1) \\
Pairwise difference & \textbf{2.5\%***} & \textbf{2.0\%***} & \\
\textbf{P/E} & & & \\
GICS+SARD & 30.5\% (2) & 42.2\% (2) & 45.6\% (2) \\
SBP+SARD & 27.7\% (1) & 39.2\% (1) & 41.2\% (1) \\
Pairwise difference & \textbf{3.3\%***} & \textbf{3.0\%***} & \\
\rowcolor[HTML]{003085}
{\color[HTML]{FFFFFF} \textbf{S\&P 400}} & {\color[HTML]{FFFFFF} \textbf{Median}} & {\color[HTML]{FFFFFF} \textbf{Mean}} & {\color[HTML]{FFFFFF} \textbf{IQ range}} \\
\textbf{EV/EBITDA} & & & \\
GICS+SARD & 27.7\% (2) & 42.4\% (2) & 36.6\% (2) \\
SBP+SARD & 24.8\% (1) & 33.1\% (1) & 34.3\% (1) \\
Pairwise difference & \textbf{2.9\%***} & \textbf{10.3\%***} & \\
\textbf{EV/EBIT} & & & \\
GICS+SARD & 30.8\% (2) & 44.5\% (2) & 39.6\% (2) \\
SBP+SARD & 25.3\% (1) & 34.2\% (1) & 33.2\% (1) \\
Pairwise difference & \textbf{5.9\%***} & \textbf{2.0\%***} & \\
\textbf{P/E} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{} & \multicolumn{1}{l|}{} \\
GICS+SARD & \multicolumn{1}{l}{40.0\% (2)} & \multicolumn{1}{l}{52.6\% (2)} & \multicolumn{1}{l|}{55.7\% (2)} \\
SBP+SARD & \multicolumn{1}{l}{34.1\% (1)} & \multicolumn{1}{l}{48.9\% (1)} & \multicolumn{1}{l|}{45.9\% (1)} \\
Pairwise difference & \textbf{6.2\%***} & \textbf{3.6\%***} & \\ \hline
\rowcolor[HTML]{003085}
{\color[HTML]{FFFFFF} \textbf{S\&P 600}} & {\color[HTML]{FFFFFF} \textbf{Median}} & {\color[HTML]{FFFFFF} \textbf{Mean}} & {\color[HTML]{FFFFFF} \textbf{IQ range}} \\ \hline
\textbf{EV/EBITDA} & & & \multicolumn{1}{l|}{} \\
GICS+SARD & 28.2\% (2) & 40.0\% (2) & 36.1\% (2) \\
SBP+SARD & 24.6\% (1) & 31.3\% (1) & 32.1\% (1) \\
Pairwise difference & \textbf{3.9\%***} & \textbf{8.7\%***} & \\
\textbf{EV/EBIT} & & & \\
GICS+SARD & 27.1\% (2) & 36.3\% (2) & 36.3\% (2) \\
SBP+SARD & 25.3\% (1) & 31.7\% (1) & 33.9\% (1) \\
Pairwise difference & \textbf{2.7\%***} & \textbf{4.6\%***} & \\
\textbf{P/E} & & & \\
GICS+SARD & 33.4\% (2) & 45.6\% (2) & 43.7\% (2) \\
SBP+SARD & 30.5\% (1) & 37.8\% (1) & 37.9\% (1) \\
Pairwise difference & \textbf{4.6\%***} & \textbf{7.8\%***} & \\ \hline
\end{tabular}
\end{table}
\end{document}
答案1
只需将文本放入其中即可中\parbox
和centering
命令。我借此机会对表格布局进行了一些改进:
\documentclass{article}
\usepackage[table,xcdraw]{xcolor}
\usepackage[showframe]{geometry}
\usepackage{relsize}
\begin{document}
\begin{table}[!h]
\centering
\setlength{\extrarowheight}{2pt}
\smaller
\caption{Valuation errors by the combinatorial selection schemes for the S\&P sub-indices}
\label{Results.Robustness.FirmSize}\medskip
\parbox{\textwidth}{This table reports the median and arithmetic mean of the absolute percentage errors generated by the two combinatorial peer selection schemes SBP+SARD and GICS+SARD, for constituents of the S\&P 500, 400 and 600 indices. The median and arithmetic mean of the pairwise valuation error differences are statistically tested through the Wilcoxon signed rank test and Student's t-test, respectively. Each combinatorial selection scheme has used the EV/EBITDA, EV/EBIT and P/E multiple to value a target firm. A positive pairwise median difference indicates that the SBP+SARD generates a higher valuation accuracy, relative to GICS+SARD, and vice versa. Statistical significance is denoted by *, **, *** indicating 10\%, 5\% and 1\% respectively.}
\vspace{0.2cm}
\begin{tabular}{|lccc|}
\hline
\rowcolor[HTML]{003085}
{\color[HTML]{FFFFFF} \textbf{S\&P 500}} & {\color[HTML]{FFFFFF} \textbf{Median}} & {\color[HTML]{FFFFFF} \textbf{Mean}} & {\color[HTML]{FFFFFF} \textbf{IQ range}} \\
\textbf{EV/EBITDA} & & & \\
GICS+SARD & 25.1\% (2) & 31.5\% (2) & 34.2\% (2) \\
SBP+SARD & 20.7\% (1) & 27.9\% (1) & 27.4\% (1) \\
Pairwise difference & \textbf{4.2\%***} & \textbf{3.5\%***} & \\
\textbf{EV/EBIT} & & & \\
GICS+SARD & 23.7\% (2) & 29.6\% (2) & 31.4\% (2) \\
SBP+SARD & 20.5\% (1) & 27.5\% (1) & 28.2\% (1) \\
Pairwise difference & \textbf{2.5\%***} & \textbf{2.0\%***} & \\
\textbf{P/E} & & & \\
GICS+SARD & 30.5\% (2) & 42.2\% (2) & 45.6\% (2) \\
SBP+SARD & 27.7\% (1) & 39.2\% (1) & 41.2\% (1) \\
Pairwise difference & \textbf{3.3\%***} & \textbf{3.0\%***} & \\[1ex]
\rowcolor[HTML]{003085}
{\color[HTML]{FFFFFF} \textbf{S\&P 400}} & {\color[HTML]{FFFFFF} \textbf{Median}} & {\color[HTML]{FFFFFF} \textbf{Mean}} & {\color[HTML]{FFFFFF} \textbf{IQ range}} \\
\textbf{EV/EBITDA} & & & \\
GICS+SARD & 27.7\% (2) & 42.4\% (2) & 36.6\% (2) \\
SBP+SARD & 24.8\% (1) & 33.1\% (1) & 34.3\% (1) \\
Pairwise difference & \textbf{2.9\%***} & \textbf{10.3\%***} & \\
\textbf{EV/EBIT} & & & \\
GICS+SARD & 30.8\% (2) & 44.5\% (2) & 39.6\% (2) \\
SBP+SARD & 25.3\% (1) & 34.2\% (1) & 33.2\% (1) \\
Pairwise difference & \textbf{5.9\%***} & \textbf{2.0\%***} & \\
\textbf{P/E} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{} & \multicolumn{1}{l|}{} \\
GICS+SARD & \multicolumn{1}{l}{40.0\% (2)} & \multicolumn{1}{l}{52.6\% (2)} & \multicolumn{1}{l|}{55.7\% (2)} \\
SBP+SARD & \multicolumn{1}{l}{34.1\% (1)} & \multicolumn{1}{l}{48.9\% (1)} & \multicolumn{1}{l|}{45.9\% (1)} \\
Pairwise difference & \textbf{6.2\%***} & \textbf{3.6\%***} & \\[1ex] \hline
\rowcolor[HTML]{003085}
{\color[HTML]{FFFFFF} \textbf{S\&P 600}} & {\color[HTML]{FFFFFF} \textbf{Median}} & {\color[HTML]{FFFFFF} \textbf{Mean}} & {\color[HTML]{FFFFFF} \textbf{IQ range}} \\ \hline
\textbf{EV/EBITDA} & & & \multicolumn{1}{l|}{} \\
GICS+SARD & 28.2\% (2) & 40.0\% (2) & 36.1\% (2) \\
SBP+SARD & 24.6\% (1) & 31.3\% (1) & 32.1\% (1) \\
Pairwise difference & \textbf{3.9\%***} & \textbf{8.7\%***} & \\
\textbf{EV/EBIT} & & & \\
GICS+SARD & 27.1\% (2) & 36.3\% (2) & 36.3\% (2) \\
SBP+SARD & 25.3\% (1) & 31.7\% (1) & 33.9\% (1) \\
Pairwise difference & \textbf{2.7\%***} & \textbf{4.6\%***} & \\
\textbf{P/E} & & & \\
GICS+SARD & 33.4\% (2) & 45.6\% (2) & 43.7\% (2) \\
SBP+SARD & 30.5\% (1) & 37.8\% (1) & 37.9\% (1) \\
Pairwise difference & \textbf{4.6\%***} & \textbf{7.8\%***} & \\ \hline
\end{tabular}
\end{table}
\end{document}