调整 Latex 表中单词之间的间距和文本对齐方式

调整 Latex 表中单词之间的间距和文本对齐方式

我想删除文本在第 2、4 和 5 列换行时的单词之间的空格。
然后我想将最后 3 列的文本对齐方式调整到右侧。
最后,如果我可以换行第 3 列的图块就太好了。

\begin{table}[H]
\centering
\begin{adjustbox}{max width=1\textwidth,center}
\begin{tabular}{@{}l p{0.18\linewidth} c p{0.15\linewidth} p{0.35\linewidth} c r r @{}}
\toprule
\multicolumn{1}{c}{Name} & \multicolumn{1}{c}{Data Set} &  Number of Assets & \multicolumn{1}{c}{Optimization} & \multicolumn{1}{c}{Risk Model} &  Signal & \multicolumn{1}{c}{Start} & \multicolumn{1}{c}{Backtest} \\ \midrule
Global 1 & Global equities, bonds, 55 FX,   and commodities & 55 & EPOS & Exponentially-weighted daily   volatilties (60-day center-of-mass) and 3-day overlapping correlations (150   day center-of-mass) & TSMOM & 01/01/1970 & 01/01/1985 \\
Global 2 & Global equities, bonds, 55 FX,   and commodities & 55 & EPOS & Risk model from Global 1, where   correlations are shrunk 5\% & TSMOM & 01/01/1970 & 01/01/1985 \\
Global 3 & Global equities, bonds, 55 FX,   and commodities & 55 & EPOS & Risk model from Global 1,   enhanced via random matrix theory & TSMOM & 01/01/1970 & 01/01/1985 \\
Equity 1 & 49 industry portfolios & 49 & EPOS & 60 months (equal-weighted), 5\%   shunk & XSMOM & 01/01/1927 & 01/01/1942 \\
Equity 2 & 49 industry portfolios & 49 & EPOS & 40 days (equal-weighted), 5\%   shunk & XSMOM & 01/01/1927 & 01/01/1942 \\
Equity 3 & 49 industry portfolios & 49 & EPOS & 120 days (equal-weighted), 5\%   shunk & XSMOM & 01/01/1927 & 01/01/1942 \\
Equity 4 & 49 industry portfolios & 49 & EPOS & 120 days (equal-weighted), 5\%   shunk & XSMOM*sigma & 01/01/1927 & 01/01/1942 \\
Equity 5 & 49 industry portfolios & 49 & EPOS & 120 days (equal-weighted), 5\%   shunk & XSMOM*sigma\textasciicircum{}2 & 01/01/1927 & 01/01/1942 \\
Equity 6 & 49 industry portfolios & 49 & EPO with anchor= 1/N & 60 months (equal-weighted), 5\%   shunk & XSMOM & 01/01/1927 & 01/01/1942 \\
Equity 7 & 49 industry portfolios & 49 & EPO with anchor= 1/sigma & 60 months (equal-weighted), 5\%   shunk & XSMOM & 01/01/1927 & 01/01/1942 \\
Equity 8 & Each industry split in 2   portfolios based on past 12 month return & 98 & EPOS & 60 months (equal-weighted), 5\%   shunk & XSMOM & 01/01/1927 & 01/01/1942 \\ \bottomrule
\end{tabular}
\end{adjustbox}
\caption{}
\label{tab:my-table}
\end{table}




在此处输入图片描述

基本上我想复制下一张表

在此处输入图片描述

答案1

  • 请始终提供 MWE(最小工作示例),一个完整的小文档,可以按原样进行编译(正如我下面所做的那样)。
  • 较新的比例表,导致表格中的字体大小不一致。
  • 为了减少表体中列上下文之间的空间,您需要使列标题更窄。
  • 对你的表格进行稍微的重新设计:
\documentclass{article}
\usepackage[margin=25mm]{geometry}
\usepackage{ragged2e}
\usepackage{booktabs, makecell, tabularx}
\newcolumntype{R}[1]{>{\RaggedRight\hsize=#1\hsize\hspace{0pt}}X}

\begin{document}
    \begin{table}[htb]
\caption{Data for time period from 01/01 in start year to 01/01 in back test year. Opt.: type of Optimization}
\label{tab:my-table}
    \end{table}
\setlength\tabcolsep{3pt}
\footnotesize
    \begin{tabularx}{\textwidth}{@{}l R{1} l R{0.7}  R{1.3} c r r @{}}
\toprule
Name  
    & Data Set
        & \makecell[l]{Num. of\\ Assets} 
            & Opt.
                & Risk Model
                    &  Signal 
                        & start 
                            & \makecell[l]{Back\\ test}  \\
    \midrule
Global 1 
    & Global equities, bonds, 55 FX,   and commodities 
        & 55 
            & EPOS 
                & Exponentially-weighted daily   volatilties (60-day center-of-mass) and 3-day overlapping correlations (150   day center-of-mass) 
                    & TSMOM 
                        & 1970  
                            & 1985 \\
Global 2 & Global equities, bonds, 55 FX,   and commodities & 55 & EPOS & Risk model from Global 1, where   correlations are shrunk 5\% & TSMOM & 1970 & 1985 \\
Global 3 & Global equities, bonds, 55 FX,   and commodities & 55 & EPOS & Risk model from Global 1,   enhanced via random matrix theory & TSMOM & 1970 & 1985 \\
Equity 1 & 49 industry portfolios & 49 & EPOS & 60 months (equal-weighted), 5\%   shunk & XSMOM & 1927 & 1942 \\
Equity 2 & 49 industry portfolios & 49 & EPOS & 40 days (equal-weighted), 5\%   shunk & XSMOM & 1927 & 1942 \\
Equity 3 & 49 industry portfolios & 49 & EPOS & 120 days (equal-weighted), 5\%   shunk & XSMOM & 1927 & 1942 \\
Equity 4 & 49 industry portfolios & 49 & EPOS & 120 days (equal-weighted), 5\%   shunk & XSMOM*sigma & 1927 & 1942 \\
Equity 5 & 49 industry portfolios & 49 & EPOS & 120 days (equal-weighted), 5\%   shunk & XSMOM*sigma\textasciicircum{}2 & 1927 & 1942 \\
Equity 6 & 49 industry portfolios & 49 & EPO with anchor= 1/N & 60 months (equal-weighted), 5\%   shunk & XSMOM & 1927 & 1942 \\
Equity 7 & 49 industry portfolios & 49 & EPO with anchor= 1/sigma & 60 months (equal-weighted), 5\%   shunk & XSMOM & 1927 & 1942 \\
Equity 8 & Each industry split in 2   portfolios based on past 12 month return & 98 & EPOS & 60 months (equal-weighted), 5\%   shunk & XSMOM & 1927 & 1942 \\ 
    \bottomrule
\end{tabularx}
\end{document} 

你将得到以下结果:

在此处输入图片描述

这个结果能令人满意吗?

相关内容