booktabs 表中的列中出现换行符

booktabs 表中的列中出现换行符

你好,我想将下表放到一个横向页面上:

在此处输入图片描述

因此,我希望第 2、3、4、5、6 列仅在标题行中有换行符。我还希望能够使用脚注,并且需要能够在表格上方指定长标题,该标题不会显示在图表列表中,如下所示:

在此处输入图片描述

我看了一下 ctable 包,但无法使其工作...但我认为它适合我的需要?

我的代码目前看起来如下:

\documentclass[12pt, a4paper] {article}
\usepackage{booktabs}
\usepackage{rotating}
\usepackage[margin=2cm,left=3.5cm,top=2.5cm,includefoot]{geometry}

\begin{document}

\begin{sidewaystable}
\begin{tabular}{lcclrrc}
\toprule
Hedge Fund & No. of 13D Filings & No. of Filers & Manager & AUM as of 30.09.2014 & AUM as of 30.06.2014 & \% Change \\
\midrule
Atlantic Inv. Mgt. Inc & 3 & 1 & Alexander J. Roepers & \$1.514.456.000 & \$1.535.391.000 & -1,36\% \\
Blackstone Group & 5 & 4 & Stephen A. Schwarzman & \$34.165.237.000 & \$31.741.749.000 & 7,64\% \\
Blue Harbour Group L.P. & 15 & 2 & Clifton S. Robbins & \$2.549.524.000 & \$2.580.477.000 & -1,20\% \\
Breeden Capital Mgt. LLC & 5 & 1 & Richard Breeden & -* & -* & - \\
Childrens Inv. Fund Mgt. & 1 & 1 & Chris Hohn & \$2.323.503.000 & \$2.259.084.000 & 2,85\% \\
D. E. Shaw \& Co., Inc. & 6 & 3 & David E. Shaw & \$77.216.353.000 & \$73.439.624.000 & 5,14\% \\
Elliott Associates L.P. & 15 & 1 & Paul Singer & \$8.793.926.000 & \$7.158.106.000 & 22,85\% \\
Franklin Mutual Advisers LLC & 2 & 1 & Peter  A. Langerman & \$219.251.723.000 & \$227.011.454.000 & -3,42\% \\
Gamco Investors Inc & 230 & 1 & Mario J. Gabelli & \$18.586.942.000 & \$19.117.308.000 & -2,77\% \\
Glenhill Advisors LLC & 1 & 1 & Glenn J. Krevlin & \$1.351.865.000 & \$1.230.959.000 & 9,82\% \\
Icahn Carl C & 33 & 1 & Carl Icahn & \$33.633.558.000 & \$32.531.715.000 & 3,39\% \\
Jana Partners LLC & 13 & 1 & Barry Rosenstein & \$19.311.964.000 & \$16.157.861.000 & 19,52\% \\
Oaktree Capital Mgt. LP & 3 & 1 & Howard Marks & \$6.035.543.000 & \$5.740.583.000 & 5,14\% \\
Palo Alto Investors LLC & 2 & 1 & William Edwards & \$1.338.499.000 & \$1.342.913.000 & -0,33\% \\
Pershing Square Cap. Mgt. L.P. & 11 & 2 & Bill Ackman & \$13.425.636.000 & \$12.597.023.000 & 6,58\% \\
Relational Investors LLC & 17 & 1 & Ralph V. Whitworth & \$4.062.561.000 & \$6.574.544.000  & -38,21\% \\
SAC Capital Advisors LP & 9 & 2 & Steven Cohen & \$19.262.123.000 & \$17.217.707.000 & 11,87\% \\
Sandell Asset Mgt Corp. & 8 & 1 & Tom Sandell & \$938.196.000 & \$542.470.000 & 72,95\% \\
SPO Advisory Corp & 4 & 1 & John Scully & \$7.700.554.000 & \$7.567.268.000 & 1,76\% \\
Steel Partners Holdings LP & 13 & 2 & Warren Lichtenstein & \$523.841.000 & \$511.312.000  & 2,45\% \\
Third Point LLC & 12 & 1 & Daniel S. Loeb & \$8.713.793.000 & \$8.133.192.000 & 7,14\% \\
Trian Fund Management LP & 1 & 6 & Nelson Peltz & \$7.607.803.000 & \$6.795.927.000 & 11,95\% \\
Whitebox Advisors LLC & 2 & 1 & Andy Redleaf & \$2.578.661.000 & \$2.537.231.000 & 1,63\% \\
Wintergreen Advisers LLC & 1 & 1 & David Winters & \$771.521.000 & \$778.575.000 & -0,91\% \\
\bottomrule
*stopped reporting AUM in Q2/13 \\
** 31.12.13 to 31.03.2014  \\
\end{tabular}
\end{sidewaystable}

\end{document}

谢谢!

答案1

我建议您按如下方式进行:

  • No. of通过创建称为和的额外类别,在表格标题中提供更多结构AUM (thousands of $),以删除第 2、3、5 和 6 列标题中的一些冗余。

  • 删掉第 5 列和第 6 列中的前导$符号和尾随.000字符串,并将该信息放在标题中(另请参阅第一个要点)。

  • 将第 5 列和第 6 列中的千位分隔符替换.为其他符号;该.符号通常被解释为小数标记。

  • 使用siunitx和/或dcolumn包将第 5 至第 7 列的数值对齐到各自的小数点标记上。

  • 将脚注字符串放在\multicolumn{3}{l}{...}包装器内以减少第一列的宽度。

经过这些更改后,表格将可以轻松放入 A4 大小的页面中。

在此处输入图片描述

\documentclass[12pt, a4paper]{article}
\usepackage{booktabs,rotating,dcolumn,siunitx,caption}
\usepackage[margin=2cm,left=3.5cm,top=2.5cm,includefoot]{geometry}
\begin{document}

\begin{sidewaystable}
\caption*{Selected hedge fund characteristics}
\sisetup{table-format=9.0}
\centering
\begin{tabular}{ l cc l S S D{,}{,}{3.4} }
\toprule
Hedge Fund & \multicolumn{2}{c}{No.\ of} &
Manager & \multicolumn{2}{c}{AUM (thousands of \$)} & 
\multicolumn{1}{c}{\% Change}\\
\cmidrule(lr){2-3} \cmidrule(lr){5-6}
& 13D Filings & Filers &  & {30.9.2014} & {30.6.2014} & \\
\midrule
Atlantic Inv Mgt Inc & 3 & 1 & Alexander J Roepers & 1514456 & 1535391 & -1,36\% \\
Blackstone Group & 5 & 4 & Stephen A Schwarzman & 34165237 & 31741749 & 7,64\% \\
Blue Harbour Group LP & 15 & 2 & Clifton S Robbins & 2549524 & 2580477 & -1,20\% \\
Breeden Capital Mgt LLC & 5 & 1 & Richard Breeden & {$-$*} & {$-$*} & \multicolumn{1}{c}{$-$} \\
Childrens Inv Fund Mgt & 1 & 1 & Chris Hohn & 2323503 & 2259084 & 2,85\% \\
D E Shaw \& Co, Inc & 6 & 3 & David E Shaw & 77216353 & 73439624 & 5,14\% \\
Elliott Associates LP & 15 & 1 & Paul Singer & 8793926 & 7158106 & 22,85\% \\
Franklin Mutual Advisers LLC & 2 & 1 & Peter  A Langerman & 219251723 & 227011454 & -3,42\% \\
Gamco Investors Inc & 230 & 1 & Mario J Gabelli & 18586942 & 19117308 & -2,77\% \\
Glenhill Advisors LLC & 1 & 1 & Glenn J Krevlin & 1351865 & 1230959 & 9,82\% \\
Icahn Carl C & 33 & 1 & Carl Icahn & 33633558 & 32531715 & 3,39\% \\
Jana Partners LLC & 13 & 1 & Barry Rosenstein & 19311964 & 16157861 & 19,52\% \\
Oaktree Capital Mgt LP & 3 & 1 & Howard Marks & 6035543 & 5740583 & 5,14\% \\
Palo Alto Investors LLC & 2 & 1 & William Edwards & 1338499 & 1342913 & -0,33\% \\
Pershing Square Cap Mgt LP & 11 & 2 & Bill Ackman & 13425636 & 12597023 & 6,58\% \\
Relational Investors LLC & 17 & 1 & Ralph V Whitworth & 4062561 & 6574544  & -38,21\% \\
SAC Capital Advisors LP & 9 & 2 & Steven Cohen & 19262123 & 17217707 & 11,87\% \\
Sandell Asset Mgt Corp & 8 & 1 & Tom Sandell & 938196 & 542470 & 72,95\% \\
SPO Advisory Corp & 4 & 1 & John Scully & 7700554 & 7567268 & 1,76\% \\
Steel Partners Holdings LP & 13 & 2 & Warren Lichtenstein & 523841 & 511312  & 2,45\% \\
Third Point LLC & 12 & 1 & Daniel S Loeb & 8713793 & 8133192 & 7,14\% \\
Trian Fund Management LP & 1 & 6 & Nelson Peltz & 7607803 & 6795927 & 11,95\% \\
Whitebox Advisors LLC & 2 & 1 & Andy Redleaf & 2578661 & 2537231 & 1,63\% \\
Wintergreen Advisers LLC & 1 & 1 & David Winters & 771521 & 778575 & -0,91\% \\
\bottomrule
\addlinespace
\multicolumn{3}{l}{* stopped reporting AUM in Q2/13} \\
\multicolumn{3}{l}{** 31.12.2013 to 31.03.2014} \\
\end{tabular}
\end{sidewaystable}

\end{document} 

答案2

对于表格本身,我所做的只是手动拆分标题。但随后我在表格上方添加了堆栈以用于扩展标题。它对于 lettersize 页面来说仍然太大,但您的配置(字体大小、纸张大小等)可能可以适应。

\documentclass[12pt, a4paper] {article}
\usepackage{booktabs}
\usepackage{rotating}
\usepackage[margin=2cm,left=3.5cm,top=2.5cm,includefoot]{geometry}
\usepackage{stackengine}

\begin{document}

\begin{sidewaystable}
\caption{Table Description}
\stackunder{\parbox{\linewidth}{
Four score and seven years ago, our forefathers brought forth on this 
continent a new nation, conceived in liberty and dedicated to the 
proposition that all men are created equal.}
}{
\begin{tabular}{lcclrrc}
\toprule
Hedge Fund & No. & No. of  & Manager & AUM as of  & AUM as of  & \%  \\
&13D&of&&30.09.2014&30.06.2014&Change\\
&Filings&Filers&&&&\\
\midrule
Atlantic Inv. Mgt. Inc & 3 & 1 & Alexander J. Roepers & \$1.514.456.000 & \$1.535.391.000 & -1,36\% \\
Blackstone Group & 5 & 4 & Stephen A. Schwarzman & \$34.165.237.000 & \$31.741.749.000 & 7,64\% \\
Blue Harbour Group L.P. & 15 & 2 & Clifton S. Robbins & \$2.549.524.000 & \$2.580.477.000 & -1,20\% \\
Breeden Capital Mgt. LLC & 5 & 1 & Richard Breeden & -* & -* & - \\
Childrens Inv. Fund Mgt. & 1 & 1 & Chris Hohn & \$2.323.503.000 & \$2.259.084.000 & 2,85\% \\
D. E. Shaw \& Co., Inc. & 6 & 3 & David E. Shaw & \$77.216.353.000 & \$73.439.624.000 & 5,14\% \\
Elliott Associates L.P. & 15 & 1 & Paul Singer & \$8.793.926.000 & \$7.158.106.000 & 22,85\% \\
Franklin Mutual Advisers LLC & 2 & 1 & Peter  A. Langerman & \$219.251.723.000 & \$227.011.454.000 & -3,42\% \\
Gamco Investors Inc & 230 & 1 & Mario J. Gabelli & \$18.586.942.000 & \$19.117.308.000 & -2,77\% \\
Glenhill Advisors LLC & 1 & 1 & Glenn J. Krevlin & \$1.351.865.000 & \$1.230.959.000 & 9,82\% \\
Icahn Carl C & 33 & 1 & Carl Icahn & \$33.633.558.000 & \$32.531.715.000 & 3,39\% \\
Jana Partners LLC & 13 & 1 & Barry Rosenstein & \$19.311.964.000 & \$16.157.861.000 & 19,52\% \\
Oaktree Capital Mgt. LP & 3 & 1 & Howard Marks & \$6.035.543.000 & \$5.740.583.000 & 5,14\% \\
Palo Alto Investors LLC & 2 & 1 & William Edwards & \$1.338.499.000 & \$1.342.913.000 & -0,33\% \\
Pershing Square Cap. Mgt. L.P. & 11 & 2 & Bill Ackman & \$13.425.636.000 & \$12.597.023.000 & 6,58\% \\
Relational Investors LLC & 17 & 1 & Ralph V. Whitworth & \$4.062.561.000 & \$6.574.544.000  & -38,21\% \\
SAC Capital Advisors LP & 9 & 2 & Steven Cohen & \$19.262.123.000 & \$17.217.707.000 & 11,87\% \\
Sandell Asset Mgt Corp. & 8 & 1 & Tom Sandell & \$938.196.000 & \$542.470.000 & 72,95\% \\
SPO Advisory Corp & 4 & 1 & John Scully & \$7.700.554.000 & \$7.567.268.000 & 1,76\% \\
Steel Partners Holdings LP & 13 & 2 & Warren Lichtenstein & \$523.841.000 & \$511.312.000  & 2,45\% \\
Third Point LLC & 12 & 1 & Daniel S. Loeb & \$8.713.793.000 & \$8.133.192.000 & 7,14\% \\
Trian Fund Management LP & 1 & 6 & Nelson Peltz & \$7.607.803.000 & \$6.795.927.000 & 11,95\% \\
Whitebox Advisors LLC & 2 & 1 & Andy Redleaf & \$2.578.661.000 & \$2.537.231.000 & 1,63\% \\
Wintergreen Advisers LLC & 1 & 1 & David Winters & \$771.521.000 & \$778.575.000 & -0,91\% \\
\bottomrule
*stopped reporting AUM in Q2/13 \\
** 31.12.13 to 31.03.2014  \\
\end{tabular}
}
\end{sidewaystable}

\end{document}

在此处输入图片描述

答案3

您可以使用该makecell包来实现这一点。此外,我还使用该包对数字和表格注释siunitx进行适当的格式化和对齐:threeparttable

    \documentclass[12pt, a4paper] {article}
    \usepackage{booktabs}
    \usepackage{rotating}
    \usepackage{makecell, threeparttable}
    \usepackage{siunitx}
    \sisetup{table-figures-integer=12,table-figures-decimal = 0}
    \usepackage[margin=2cm,left=3.5cm,top=2.5cm,includefoot]{geometry}

    \begin{document}

\begin{sidewaystable}
  \begin{threeparttable}
    \begin{tabular}{lS[table-format =3.0]clrrS[table-format=-2.2]}
      \toprule
      Hedge Fund & {\thead{ No. of & & & & & \\13D Filings}} & \thead{No. of \\Filers} & Manager & {\thead{AUM as of\\ 30.09.2014 (\$)}} &{ \thead{AUM as of \\ 30.06.2014 (\$)}} & {\% Change} \\
      \midrule
      Atlantic Inv. Mgt. Inc & 3 & 1 & Alexander J. Roepers & \num{1514456000} & \num{1535391000} & -1,36 \\
      Blackstone Group & 5 & 4 & Stephen A. Schwarzman & \num{34165237000} & \num{31741749000} & 7,64 \\
      Blue Harbour Group L.P. & 15 & 2 & Clifton S. Robbins & \num{2549524000} & \num{2580477000} & -1,20 \\
      Breeden Capital Mgt. LLC & 5 & 1 & Richard Breeden & \makecell{---\tnote{*}} & \makecell{ ---\tnote{**}} & {---} \\
      Childrens Inv. Fund Mgt. & 1 & 1 & Chris Hohn & \num{2323503000} & \num{2259084000} & 2,85 \\
      D. E. Shaw \& Co., Inc. & 6 & 3 & David E. Shaw & \num{77216353000} & \num{73439624000} & 5,14 \\
      Elliott Associates L.P. & 15 & 1 & Paul Singer & \num{8793926000} & \num{7158106000} & 22,85 \\
      Franklin Mutual Advisers LLC & 2 & 1 & Peter A. Langerman & \num{219251723000} & \num{227011454000} & -3,42 \\
      Gamco Investors Inc & 230 & 1 & Mario J. Gabelli & \num{18586942000} & \num{19117308000} & -2,77 \\
      Glenhill Advisors LLC & 1 & 1 & Glenn J. Krevlin & \num{1351865000} & \num{1230959000} & 9,82 \\
      Icahn Carl C & 33 & 1 & Carl Icahn & \num{33633558000} & \num{32531715000} & 3,39 \\
      Jana Partners LLC & 13 & 1 & Barry Rosenstein & \num{19311964000} & \num{16157861000} & 19,52 \\
      Oaktree Capital Mgt. LP & 3 & 1 & Howard Marks & \num{6035543000} & \num{5740583000} & 5,14 \\
      Palo Alto Investors LLC & 2 & 1 & William Edwards & \num{1338499000} & \num{1342913000} & -0,33 \\
      Pershing Square Cap. Mgt. L.P. & 11 & 2 & Bill Ackman & \num{13425636000} & \num{12597023000} & 6,58 \\
      Relational Investors LLC & 17 & 1 & Ralph V. Whitworth & \num{4062561000} & \num{6574544000} & -38,21 \\
      SAC Capital Advisors LP & 9 & 2 & Steven Cohen & \num{19262123000} & \num{17217707000} & 11,87 \\
      Sandell Asset Mgt Corp. & 8 & 1 & Tom Sandell & \num{938196000} & \num{542470000} & 72,95 \\
      SPO Advisory Corp & 4 & 1 & John Scully & \num{7700554000} & \num{7567268000} & 1,76 \\
      Steel Partners Holdings LP & 13 & 2 & Warren Lichtenstein & \num{523841000} & \num{511312000} & 2,45 \\
      Third Point LLC & 12 & 1 & Daniel S. Loeb & \num{8713793000} & \num{8133192000} & 7,14 \\
      Trian Fund Management LP & 1 & 6 & Nelson Peltz & \num{7607803000} & \num{6795927000} & 11,95 \\
      Whitebox Advisors LLC & 2 & 1 & Andy Redleaf & \num{2578661000} & \num{2537231000} & 1,63 \\
      Wintergreen Advisers LLC & 1 & 1 & David Winters & \num{771521000} &
      \num{778575000} & -0,91 \\
      \bottomrule
    \end{tabular}
    \begin{tablenotes}\footnotesize
      \item[*]stopped reporting AUM in Q2/13
      \item[**] 31.12.13 to 31.03.2014
    \end{tablenotes}
  \end{threeparttable}
\end{sidewaystable}

\end{document} 

在此处输入图片描述

相关内容