我怎样才能使这张桌子适应横向?

我怎样才能使这张桌子适应横向?
\begin{landscape}
\begin{table}[htbp]
  \centering
  \caption{Add caption}
    \begin{tabular}{ccllcc}
    \hline
    \multicolumn{1}{l}{\textbf{Amount(INR Cr)}} & \multicolumn{1}{l}{\textbf{Round}} & \textbf{Stage} & \textbf{Investors} & \multicolumn{1}{l}{\textbf{Pre Money Valuation (INR Cr)}} & \multicolumn{1}{l}{\textbf{Post Money Valuation (INR Cr)}} \\
    \hline
    417   & 8     & Growth-PE & IIFL VC, Sequoia Capital India &       & 30496 \\
    1001.82 & 7     & Late  & Wellington Management, Faering Capital, TVS Capital, Others & 25971.15 & 26972.97 \\
    1492.2 & 6     & Growth-PE & IIFL VC, Faering Capital, TVS Capital, Sequoia Capital India, Others &       & 26078.5 \\
    135   & 5     & Growth-PE & A91 Partners, Faering Capital, TVS Capital & 14049.7 & 14184.7 \\
    654.58 & 4     & Growth-PE & A91 Partners, Faering Capital, TVS Capital, Others & 5471.74 & 6126.32 \\
    165   & 3     & Growth-PE & Fairfax Holdings &       &  \\
    315   & 2     & Growth-PE & Fairfax Holdings &       &  \\
    384.44 & 1     & Growth-PE & Fairfax Holdings &       &  \\
    \hline
    \end{tabular}%
  \label{tab:addlabel}%
\end{table}%
\end{landscape}

答案1

我会不是尝试以横向模式排版此表格,因为这样做只会治标不治本。问题是您不允许在第 4、5 和 6 列中换行。

为了解决这个问题,我建议您从 a 环境切换tabular到 atabularx环境,并允许在第 4 列的所有单元格以及第 5 列和第 6 列的标题中换行。我还将 (a) 将第 1、5 和 6 列中的数字与其显式或隐式小数标记对齐,以及 (b) 将单位图例 (INR Cr) 移动到单独的行。

在此处输入图片描述

\documentclass{article}
\usepackage{tabularx,ragged2e,siunitx}
\newcolumntype{L}{>{\RaggedRight}X}  % flush-left, not justified
\newcommand\mC[1]{\multicolumn{1}{L}{#1}}
\sisetup{group-four-digits=true} % show thousands separator for 4-digits numbers

\begin{document}

\begin{table}
\setlength\tabcolsep{3.5pt}    % default: 6pt
\setlength\extrarowheight{2pt} % for a less-cramped look

\caption{Add caption}
\label{tab:addlabel}

\begin{tabularx}{\textwidth}{@{} 
    S[table-format=4.2] c l L *{2}{S[table-format=5.2]} @{}}
    \hline
    {\bfseries Amount} & 
    \bfseries Round & 
    \bfseries Stage & 
    \bfseries Investors & 
    \mC{\bfseries Pre Money Valuation} & 
    \mC{\bfseries Post Money Valuation} \\
    {(INR Cr)} & & & & {(INR Cr)} & {(INR Cr)} \\ % units on separate line
    \hline
    417     & 8 & Growth-PE & IIFL VC, Sequoia Capital India &       & 30496 \\
    1001.82 & 7 & Late      & Wellington Management, Faering Capital, TVS Capital, Others          & 25971.15 & 26972.97 \\
    1492.2  & 6 & Growth-PE & IIFL VC, Faering Capital, TVS Capital, Sequoia Capital India, Others &          & 26078.5  \\
    135     & 5 & Growth-PE & A91 Partners, Faering Capital, TVS Capital         & 14049.7 & 14184.7 \\
    654.58  & 4 & Growth-PE & A91 Partners, Faering Capital, TVS Capital, Others & 5471.74 & 6126.32 \\
    165     & 3 & Growth-PE & Fairfax Holdings &       &  \\
    315     & 2 & Growth-PE & Fairfax Holdings &       &  \\
    384.44  & 1 & Growth-PE & Fairfax Holdings &       &  \\
    \hline
    \end{tabularx}
\end{table}

\end{document}

答案2

与 @Mico 答案 (+1) 类似,但带有tabularray包。对于表格规则使用booktabs包,对于页面布局使用geometry包:

\documentclass{article}
\usepackage{geometry}
\usepackage{tabularray}
\UseTblrLibrary{booktabs, siunitx} % load corresponding packages

\begin{document}
    \begin{table}
\caption{Add caption}
\label{tab:addlabel}
\sisetup{group-four-digits=true,
         
\begin{tblr}{colsep=4pt,
             colspec={@{} S[table-format=4.2] c l 
                          X[2.2, l]
                     *{2}{X[c, si={table-format=5.2}]} @{}},
            row{1} = {font=\small\bfseries},
            row{1,2} = {guard}
            }
    \toprule
Amount  & Round & Stage & Investors & Pre Money Valuation   & Post Money Valuation  \\
(INR Cr) &      &       &           & (INR Cr)              & (INR Cr)              \\ 
    \midrule
417     & 8     & Growth-PE & IIFL VC, Sequoia Capital India
                                    &                       & 30496                 \\
1001.82 & 7     & Late      & Wellington Management, Faering Capital, TVS Capital, Others
                                    & 25971.15              & 26972.97              \\
1492.2  & 6     & Growth-PE & IIFL VC, Faering Capital, TVS Capital, Sequoia Capital India, Others
                                    &                       & 26078.5               \\
135     & 5     & Growth-PE & A91 Partners, Faering Capital, TVS Capital         
                                    & 14049.7               & 14184.7               \\
654.58  & 4     & Growth-PE & A91 Partners, Faering Capital, TVS Capital, Others 
                                    & 5471.74               & 6126.32               \\
165     & 3     & Growth-PE & Fairfax Holdings              
                                    &                       &                       \\
315     & 2     & Growth-PE & Fairfax Holdings 
                                    &                       &                       \\
384.44  & 1     & Growth-PE & Fairfax Holdings      
                                    &                       &                       \\
    \bottomrule
\end{tblr}
    \end{table}
\end{document}

在此处输入图片描述

相关内容