如何扩展规则以覆盖横向的整个表格

如何扩展规则以覆盖横向的整个表格

我正在尝试将一张非常宽的桌子放入我的乳胶桌上,为此我使用了\makecell以及将其转换为\landscape模式以使其适合,但似乎\rules\toprule\midrule\bottomrule)没有完全延伸。这是当前的乳胶输出和代码:

\documentclass[a4paper,fleqn]{cas-sc}

%\usepackage[numbers]{natbib}
%\usepackage[authoryear]{natbib}
\usepackage{amsmath}
\usepackage[english]{babel}
\usepackage[square,numbers]{natbib}
\bibliographystyle{vancouver}
\usepackage{tabularx,makecell, booktabs}
\usepackage{threeparttable}
\usepackage{lscape} 
\usepackage[utf8]{inputenc}
\usepackage{wrapfig}
\usepackage{graphicx}
\usepackage[export]{adjustbox}
\usepackage[T1]{fontenc}
\usepackage{cite}
\usepackage{breakcites}
\usepackage{textgreek}
\usepackage{enumitem}
\input{insbox}

\begin{document}
\begin{landscape}
\begin{table}
    \caption{Techno-Economic Comparison of High-Power Energy Storage \citep{wicki_clean_2017,lisbona_review_2011,clemente_redox_2020,kumar_progress_2017,amiryar_review_2017,polk_environmental_1986,blanchard_environmental_1989,breeze_chapter_2018,cossutta_comparative_2020,dhibar_9_2017,xu_room-temperature_2018}}
    \label{my-label}
\hspace*{-60mm}
\begin{threeparttable}
\begin{tabularx}{\textwidth}{@{}l*{20}{C}c @{}}
\toprule
Candidate ESS    & \makecell{Power Density \\ (W/kg)}
 & \makecell{Round-trip \\ Efficiency (\%)} & Cycle Life & \makecell{Inertia Cost \\for 1 kW (\$/s)} & Safety & Environmental Impact  & \makecell{Technology \\Readiness \\ Level (TRL)}\\ 
\midrule
Lithium-ion Battery   & 360 &  85 & 2000 & 0.13 & \makecell{Battery rupture due to thermal \\runaway from overcharging} & \makecell{Environmental degradation \\from battery material \\mining and end-of-life \\disposal} & \makecell{9 (Full Market \\Deployment)} \\ 
Sodium-Sulfur Battery & 1200 & 70 & 4500 & 0.25 & \makecell{Leaks of liquid sodium inside \\could lead to fire} & \makecell{Environmental degradation \\from end-of-life disposal} & \makecell{4 (for room-\\temperature sodium-\\sulfur batteries\tnote{a})}  \\ 
%\vspace{.5mm}
Flywheel       & 5000 & 95 & 20000 & 3.2 & \makecell{Flywheel material or \\containment system defects\\ can cause spin-outs, explosions} & \makecell{No particular Safety \\Concerns} & \makecell{9 (Full Market\\ Deployment)} \\ 

SMES      & 2000 & 95 & \makecell{Infinite\\(No degradation)} & 0.83 & \makecell{Exclusion zone might be \\necessary for certain \\demographics\tnote{b}} & \makecell{Magnetic field potentially \\harmful to certain wildlife\tnote{c}} & \makecell{3/4 (several micro-\\SMES in operation, \\but mostly\\ still in R\&D stage)} \\ 
Supercapacitor       & 4000 & 95  & 50000 & 20.69 & No particular safety concerns & \makecell{Potentially carbon-intensive \\production of carbon \\nanotubes\tnote{d}}& \makecell{7 (Initial commercial \\demonstrations for \\grid services)}\\ 
\bottomrule
\end{tabularx}
    \begin{tablenotes}
     \item[a] High-temperature sodium-sulfur batteries are fully commercialized, but the high temperature requirement and safety concerns prevent further practical grid applications
     \item[b] People with life support systems (like cardiac pace makers) due to magnetic field generated
     \item[c] Such as bees, migrating birds and butterflies
     \item[d] Depends if energy consumed for production is from renewable or non-renewable source.
    \end{tablenotes}
    \end{threeparttable}
\end{table}
\end{landscape}
\end{document}

这是屏幕截图 - 有什么方法可以解决这个问题吗? 输出

答案1

哦,差不多一年半了:

  • 如果使用tabularx表,则至少有一列必须是X(或从其派生)类型。
  • 定义的列在哪里C
  • 该表有 8 列,但 OP 声明了其中 22 列。为什么?
  • 由于表格非常宽,因此需要减小字体大小(例如减小到\small)和 `\tacolsep(例如减小到 4pt)

考虑到上述情况,带有 OP 表的 MWE (最小工作示例) 可以是:

\documentclass[a4paper,fleqn]{cas-sc}
\usepackage{booktabs, makecell, tabularx, threeparttable}
\newcolumntype{C}{>{\centering\arraybackslash}X}
\newcolumntype{L}{>{\raggedright\arraybackslash}X}
\usepackage{siunitx}

\usepackage{pdflscape}
\usepackage[square,numbers]{natbib}


\begin{document}
\begin{landscape}
    \begin{table}
\begin{threeparttable}
\caption{Techno-Economic Comparison of High-Power Energy Storage \citep{wicki_clean_2017,lisbona_review_2011,clemente_redox_2020,%
       kumar_progress_2017,amiryar_review_2017,polk_environmental_1986,%
       blanchard_environmental_1989,breeze_chapter_2018,%
       cossutta_comparative_2020,dhibar_9_2017,xu_room-temperature_2018}}
\label{my-label}

    \small\linespread{0.84}\selectfont
    \setlength\tabcolsep{4pt}
\begin{tabularx}{\linewidth}{@{}
                                 >{\hsize=0.70\hsize}X cc
                            *{2}{>{\hsize=0.55\hsize}C}
                            *{3}{>{\hsize=1.40\hsize}X}
                            @{}}
    \toprule
Candidate ESS
    & \makecell{Power\\ Density \\ (W/kg)}
        & \makecell{Round-trip \\ Efficiency\\ (\%)}
            & \makecell{Cycle\\ Life}
                & \makecell{Inertia\\ Cost for\\ \qty{1}{\kilo\watt} (\$/s)}
                    & \makecell{Safety}
                        & \makecell{Environmental\\ Impact}
                            & \makecell{Technology \\Readiness \\ Level (TRL)}\\
    \midrule
Lithium-ion Battery
    & 360   & 85    & 2000  & 0.13
                    & Battery rupture due to thermal runaway from overcharging
                        & Environmental degradation from battery material mining and end-of-life disposal
                            & 9 (Full Market Deployment)        \\
    \addlinespace
Sodium-Sulfur Battery
    & 1200  & 70    & 4500  & 0.25
                    & Leaks of liquid sodium inside could lead to fire
                        & Environmental degradation from end-of-life disposal
                            & 4 (for room temperature sodium sulfur batteries\tnote{a}                  \\
    \addlinespace
Flywheel
    & 5000  & 95    & 20000 & 3.2
                    & Flywheel material or containment system defects can cause spin-outs, explosions
                        & No particular Safety Concern
                            & 9 (Full Market Deployment)        \\
    \addlinespace
SMES
    & 2000  & 95    &   Infinite (No degradation)
                            & 0.83
                    & Exclusion zone might be necessary for certain demographics\tnote{b}
                        & Magnetic field potentially harmful to certain wildlife\tnote{c}
                            & 3/4 (several micro-SMES in operation, but mostly still in R\&D stage)                \\
    \addlinespace
Supercapacitor
    & 4000  & 95    & 50000 & 20.69
                    & No particular safety concerns
                        & Potentially carbon-intensive production of carbon nanotubes\tnote{d}
                            &   7 (Initial commercial demonstrations for grid services)                           \\
                \bottomrule
\end{tabularx}\footnotesize
    \begin{tablenotes}[flushleft]
\item[a] High-temperature sodium-sulfur batteries are fully commercialized, but the high temperature requirement and safety concerns prevent further practical grid applications
\item[b] People with life support systems (like cardiac pace makers) due to magnetic field generated
\item[c] Such as bees, migrating birds and butterflies
\item[d] Depends if energy consumed for production is from renewable or non-renewable source.
    \end{tablenotes}
\end{threeparttable}
    \end{table}
\end{landscape}
\end{document}

在此处输入图片描述

相关内容