对齐文本的一半在第二行截断

对齐文本的一半在第二行截断

我有一个关于修复表格格式问题的问题。目前,我喜欢它的组织方式,但问题是有些单词被连字符连接,因此只有一半的单词出现在下面的第二行中。

我怎样才能使第二列的文本不被截断,以便它可以作为整个单词出现在第二行?

我当前的代码如下:

\documentclass[12pt]{article}
\usepackage[english]{babel}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage[margin=1.25in,top=1in,bottom=1in]{geometry}
\makeatletter
\usepackage{tabularx}
\usepackage{booktabs}
\usepackage{multirow}
\usepackage{ragged2e}
\newcolumntype{L}{ >{\RaggedRight}X }
\usepackage{siunitx}
\usepackage{makecell}
\renewcommand\theadfont{\normalfont\bfseries}
\setlength\parindent{0pt}
\newcolumntype{Y}{ >{\Centering}X}
\usepackage[justification=centering]{caption}
\setlength\parindent{0pt}
\newcolumntype{L}{>{\RaggedRight\arraybackslash}X}
\newcolumntype{C}{>{\Centering\arraybackslash}X}
\renewcommand\theadfont{\normalfont\bfseries}
\newcommand\mc[1]{\multicolumn{2}{c}{#1}}
\setlength\parindent{0pt}
\usepackage[round,sort]{natbib}
\usepackage{indentfirst}
\usepackage{amsmath}
\usepackage{siunitx}
\usepackage{setspace}
\setlength{\parindent}{0.5cm}
\usepackage{csquotes}
\usepackage{hyperref}
\usepackage{moreverb}
\usepackage{babel}
\linespread{2}
\usepackage[toc,page]{appendix}

\begin{document}
\begin{table}[p]
\caption{Summary Statistics}
\begin{tabularx}{\textwidth}{@{} l L *{5}{S[table-format=-1.2]} @{}}
    \toprule   
\thead[lc]{Category }& \thead{Strategies}& {\thead{Annualized \\ Mean}} & {\thead{Volatility}} & {\thead{Skew}} & {\thead{kurtosis}} & {\thead{Sharpe \\ Ratio}} \\
    \midrule   
    \multirow{1}{*}{ Momentum } & TSMOM(8,12) & 62.93 & 16.59 & -0.08 & 12.62 & 1.04  \\ \addlinespace       
\multirow{5}{*}{ Size } & Top Decile & 12.70 & 9.26 & 1.44 & 15.80 & 0.29 \\     
& 9\textsuperscript{th} Decile & 0.11 & 8.49 & 0.49 & 12.73 & 0.26\\     
& Bottom Decile & 8.96 & 5.07 & -0.57 & -9.38 & 0.32 \\     
& 2\textsuperscript{nd} Decile & 10.13 & 5.19 & -0.44 & 10.87 & 0.33\\
& Top minus Bottom & 3.75 & 6.54 & 2.45 & 18.54 & 0.02\\ \addlinespace

\multirow{7}{*}{ Value } & Top Decile & 11.76 & 8.73 & 0.19 & 14.62 & 0.28\\     
& Bottom Decile & 8.38 & 5.76 & -0.59 & 8.74 & 0.25 \\     
& Top Minus Lowest & 3.38 & 5.94 & 0.68 & 11.03 & 0.00 \\     
& Top 30\textsuperscript{th} Percentile & 11.79 & 8.73 & 0.19 & 14.62 & 0.27 \\     
& Mid 40\textsuperscript{th} Percentile & 10.04 & 5.64 & 0.03 & 13.76 & 0.34 \\     
& Bottom 30\textsuperscript{th} Percentile & 9.04 & 5.43 & -0.73 & 8.80 & 0.30 \\     
& Highest Minus Lowest & 2.72 & 5.60 & 0.82 & 12.79 & -0.03 \\   \addlinespace

\multirow{3}{*}{ Market} & Composite Index & 5.74 & 5.47 & -0.54 & 10.10 & 0.12 \\
& Equal Weighted Index & 11.93 & 7.01 & 0.24 & 11.64 & 0.35 \\ 
& Value Weighted Index & 9.34 & 5.39 & -0.57 & 9.90 & 0.32 \\ \addlinespace

\multirow{1}{*}{Institutional} & Hedge Fund Index & 8.99 & 1.94 & -1.22 & 8.07 & 1.00\\

\bottomrule 
\end{tabularx} 
\end{table}
\begin{table}[p]
\caption{Reality Check P-values Under Mean Performance Criterion Benchmarked Against CRSP Market Index}
\label{table: table2}
\noindent 
\newcolumntype{Y}{ >{\Centering}X} 
\begin{tabularx}{\textwidth}{@{} lYY S[table-format=1.4] @{}}  

\toprule 

\thead[lc]{Category }& \thead{Passive Total Return} & {\thead{Value Weighted\\ Return Index}} & {\thead{Equal Weighted\\ Return Index}} \\

\midrule  

Momentum & 0.00 & 0.00 & 0.00 \\ \addlinespace

Size & 0.00 & 0.13 & 0.72 \\ \addlinespace  

Value & 0.00 & 0.37 & 1.00 \\ \addlinespace  

\bottomrule  

\end{tabularx}
\end{table}

\end{document}

如下图所示:

在此处输入图片描述 可以看出,有些行(例如倒数第二行和倒数第二行)被截断了,我觉得看起来不太美观。有人能给些建议吗?我将不胜感激。

谢谢

答案1

我能想到的最简单的解决方法就是更换

\begin{tabularx}{\textwidth}{@{} l L *{5}{S[table-format=3.3]} @{}}

\begin{tabularx}{\textwidth}{@{} l L *{5}{S[table-format=-1.2]} @{}}

这将减小第 3 列至第 7 列的宽度,为第 2 列留下更多空间(其宽度是残差,因为它是\textwidth减去其他 6 列的宽度计算的)。

相关内容