横向模式下的大表格无法缩放到页面

横向模式下的大表格无法缩放到页面

我尝试将下表(来自https://www.rand.org/content/dam/rand/pubs/research_reports/RR2200/RR2299/RAND_RR2299.pdf)以横向模式放入一整页。但结果是表格太小,难以阅读,至少在 overleaf 中如此:

在此处输入图片描述

我曾经使用过在线表格生成器https://www.tablesgenerator.com/latex_tables/load,它迄今为止给我带来了很大的帮助,但是对于这个特定的任务却没有什么效果。

\documentclass{article}
    \usepackage[utf8]{inputenc}
     \usepackage{booktabs}
     \usepackage{graphicx}
     \usepackage{lscape}

    \title{dff}
    \author{Testorossa}
    \date{November 2018}

    \begin{document}

    \maketitle

    \section{Introduction}

    % Please add the following required packages to your document preamble:
    % \usepackage{booktabs}
    % \usepackage{lscape}
    \begin{landscape}
    \begin{table}[]
    \caption{My caption}
    \label{my-label}
    \begin{tabular}{@{}lllll@{}}
    \toprule
    \begin{tabular}[c]{@{}l@{}}Incident\\   (Country, Date)\end{tabular} & Description & Peril & Exposure & Sector \\ \midrule
    \multicolumn{1}{l|}{\begin{tabular}[c]{@{}l@{}}Stuxnet worm \\  (Iran 2010)\end{tabular}} & Cyber weapon causing physical destruction of centrifuges used in the Iranian nuclear program & Degradation and destruction of physical systems & Capital assets & Public \\
    \multicolumn{1}{l|}{\begin{tabular}[c]{@{}l@{}}DDoS attacks on U.S.\\ banks (USA, 2012)\end{tabular}} & Denial of service attacks on more than 46 major U.S.  financial institutions & Disruption of business & Net income through loss revenue & Banking \\
    \multicolumn{1}{l|}{Saudi Aramco (Saudi Arabia, 2012 and 2016)} & Destruction of 35,000 Saudi Aramco computers in 2012; a similar attack occured lately in late 2016 & Destruction of data and systems & \begin{tabular}[c]{@{}l@{}}Capital asset destruction   \\  Net income loss from disruption\end{tabular} & Oil, gas and chemicals \\
    \multicolumn{1}{l|}{Yahoo data breaches (USA, 2013 and 2014)} & Exfiltration of more than 500 million user records, including login information & Exfiltration of customer data & Net income through liability and lost revenue & Technology \\
    \multicolumn{1}{l|}{Sony Pictures (USA, 2014)} & Exfiltration and leak of sensitive information and business disruption & Exfiltration of company data & Intellectual property, Net income & Media \\
    \multicolumn{1}{l|}{GitHub (USA, 2015)} & Large and persistent denial of serviceattack on GitHub & Denial of service & Net income & Technology \\
    \multicolumn{1}{l|}{TV5Monde (France, 2015)} & 18-hour outage of French TV network TV5Monde & Disruption of business & Net income & Media \\
    \multicolumn{1}{l|}{Office of PersonnelManagement (USA, 2015)} & Exfiltration of more than 21.5 million highly sensitive PII records. & Exfiltration of customer data & This has no clear mapping to costs in our framework & Public \\
    \multicolumn{1}{l|}{\begin{tabular}[c]{@{}l@{}}Germany parliament\\ (Germany, 2015)\end{tabular}} & Exfiltration of 2,420 secret files from a German parliament database and WikiLeaks release & Exfiltration of organization data &  & Public \\
    \multicolumn{1}{l|}{\begin{tabular}[c]{@{}l@{}}Ukraine power grid\\ (Ukraine, 2016)\end{tabular}} & Attack disrupting service of Ukrainian energy distributors, cutting power to 225,000 customers & Business disruption and denial of  service & Direct cost in net income of utilities and systemic cost in net income of users & Utilities \\
    \multicolumn{1}{l|}{Democratic National Committee(USA, 2016)} & Exfiltration of campaign documents and presidential election interference & Exfiltration of organization data & This has no clear mapping to costs in our framework & Public \\
    \multicolumn{1}{l|}{Bangladesh Central Bank(Bangladesh, 2016)} & Attack leading to an \$81 million heist from the Bangladesh Central Bank & Corruption of data and systems & Loss of \$81 million in assets & Public \\
    \multicolumn{1}{l|}{Mossack Fonseca (Panama, 2016)} & Significant data exfiltration leading to 11.5 million leaked documents representing hundreds of thousands of offshore entities & Exfiltration of customer data & Direct costs include loss of IP and net income; systemic costs include loss in client net income & Business andprofessional services \\
    \multicolumn{1}{l|}{Dyn (USA, 2016)} & Denial of service attack on domain name service provider Dyn, leading to disruptions for a significant number of customer websites & Denial of service & Direct costs to Dyn’s net income and systemic costs to net income of customers & Technology \\
    \multicolumn{1}{l|}{\begin{tabular}[c]{@{}l@{}}notPetya\\ (global, 2017)\end{tabular}} & Ransomware attack beginning in Ukraine leading to major disruptions in shipping, advertising, and pharmaceuticals worldwide & Business disruption and destruction of data and systems & Net income losses borne through business interruptions & All \\
    \multicolumn{1}{l|}{WannaCry (global, 2017)} & Ransomware attack leading to major disruptions at hospitals, universities, and business worldwide & Business disruption and destruction of data and systems & Net income losses borne through business interruptions & All \\
    Equifax (USA, 2017) & Loss of 143 million sensitive U.S. PII records & Exfiltration of customer data & Net income loss to Equifax; full PII costs not captured in model & Business and professional services \\ \bottomrule
    \end{tabular}
    \end{table}
    \end{landscape}
    \end{document}

如果无法纠正表格,即使其足够大以便于阅读,那么有哪些常见的解决方法可以仍然显示该信息?

非常感谢。

答案1

您的表格太大,无法放在一页纸中,同时又易于阅读(字体必须比小得多tiny)。因此,一个选择是:

  • 将单元格中的长文本拆分成多行
  • 使用longtable或将表格拆分为两页ltablex

通过使用,ltablex您可以相对简单地设计列宽,然而这也可以是一种longtable使用p{<width>}列类型的方法。

编辑:添加\listoftables并更正了带有表格的第一页后的标题定义。

\documentclass{article}
\usepackage{geometry}
 \usepackage{booktabs, ltablex, makecell}
 \newcolumntype{L}{>{\raggedright\arraybackslash}X}
 \usepackage{graphicx}
 \usepackage{pdflscape}

\begin{document}
\listoftables
\begin{landscape}
    \small
\begin{tabularx}{\linewidth}{@{}  
                                L
             >{\hsize=1.5\hsize}L
             >{\hsize=0.8\hsize}L
             >{\hsize=1.2\hsize}L 
             >{\hsize=0.5\hsize}L
                             @{}}
    \caption{My caption}
    \label{my-label}\\
    \toprule
Incident  (Country, Date)
    &   Description 
        &   Peril 
            &   Exposure 
                &   Sector   \\ 
    \midrule
\endfirsthead
    \caption*{Table~\thetable: My caption (cont.)}\\  % <--- changed, now will not appear in \listoftables
    \toprule
Incident  (Country, Date)
    &   Description
        &   Peril
            &   Exposure
                &   Sector   \\
    \midrule
 \endhead
    \midrule[\heavyrulewidth]
\multicolumn{5}{r}{\textit{Continue on the next page}}
\endfoot
\endlastfoot
Stuxnet worm (Iran 2010)
    &   Cyber weapon causing physical destruction of centrifuges used in the Iranian nuclear program
        &   Degradation and destruction of physical systems 
            &   Capital assets 
                &   Public      \\
    \addlinespace            
DDoS attacks on U.S.  banks (USA, 2012) 
    &   Denial of service attacks on more than 46 major U.S.  financial institutions
        &   Disruption of business 
            &   Net income through loss revenue 
                &   Banking     \\
    \addlinespace
Saudi Aramco (Saudi Arabia, 2012 and 2016) 
    &   Destruction of 35,000 Saudi Aramco computers in 2012; a similar attack occurred lately in late 2016
        &   Destruction of data and systems
            &   Capital asset destruction  Net income loss from disruption
                &   Oil, gas and chemicals \\
    \addlinespace
Yahoo data breaches (USA, 2013 and 2014) 
    &   Exfiltration of more than 500 million user records, including login information
        &   Exfiltration of customer data
            &   Net income through liability and lost revenue
                & Technology    \\
    \addlinespace
Sony Pictures (USA, 2014) 
    &   Exfiltration and leak of sensitive information and business disruption
        &   Exfiltration of company data & Intellectual property, Net income
            & Media             \\
    \addlinespace
GitHub  (USA, 2015) 
    &   Large and persistent denial of serviceattack on GitHub
        &   Denial of service
            &   Net income
                &   Technology  \\
    \addlinespace
TV5Monde  (France, 2015) 
    &   18-hour outage of French TV network TV5Monde
        &   Disruption of business
            &   Net income
                & Media         \\
    \addlinespace
Office of Personnel Management (USA, 2015)
    &   Exfiltration of more than 21.5 million highly sensitive PII records.
        &   Exfiltration of customer data
            &   This has no clear mapping to costs in our framework
                &   Public      \\
    \addlinespace
Germany parliament (Germany, 2015) 
    &   Exfiltration of 2,420 secret files from a German parliament database and WikiLeaks release
        & Exfiltration of organization data
            &   & Public        \\
    \addlinespace
Ukraine power grid  (Ukraine, 2016) 
    &   Attack disrupting service of Ukrainian energy distributors, cutting power to 225,000 customers
        &   Business disruption and denial of  service
            &   Direct cost in net income of utilities and systemic cost in net income of users
                &    Utilities  \\
    \addlinespace
Democratic National Committee (USA, 2016) 
    &   Exfiltration of campaign documents and presidential election interference
        &    Exfiltration of organization data
            &   This has no clear mapping to costs in our framework
                &   Public      \\
    \addlinespace
Bangladesh Central Bank (Bangladesh, 2016) 
    &   Attack leading to an \$81 million heist from the Bangladesh Central Bank
        &   Corruption of data and systems
            &   Loss of \$81 million in assets
                &   Public      \\
    \addlinespace
Mossack Fonseca (Panama, 2016) 
    &   Significant data exfiltration leading to 11.5 million leaked documents representing hundreds of thousands of offshore entities
        &   Exfiltration of customer data
            &   Direct costs include loss of IP and net income; systemic costs include loss in client net income
                &   Business andprofessional services   \\
    \addlinespace
Dyn (USA, 2016)
    &   Denial of service attack on domain name service provider Dyn, leading to disruptions for a significant number of customer websites
        &   Denial of service
            &   Direct costs to Dyn’s net income and systemic costs to net income of customers
                &   Technology  \\
    \addlinespace
notPetya (global, 2017) 
    &   Ransomware attack beginning in Ukraine leading to major disruptions in shipping, advertising, and pharmaceutical worldwide
        &   Business disruption and destruction of data and systems
            &   Net income losses borne through business interruptions
                &   All         \\
    \addlinespace
WannaCry (global, 2017) 
    &   Ransomware attack leading to major disruptions at hospitals, universities, and business worldwide
        &   Business disruption and destruction of data and systems
            &   Net income losses borne through business interruptions
                &   All         \\
    \addlinespace
Equifax (USA, 2017) 
    &   Loss of 143 million sensitive U.S. PII records
        &   Exfiltration of customer data
            &   Net income loss to Equifax; full PII costs not captured in model
                &   Business and professional services  \\
    \bottomrule
\end{tabularx}
\end{landscape}
\end{document}

在此处输入图片描述

在此处输入图片描述

相关内容