在横向视图中缩放大表

在横向视图中缩放大表

我正在尝试调整横向视图中的表格大小,以便 (1) 可以阅读内容,并且 (2) 页面上不会留下任何空间。目前它看起来像这样:

\documentclass[12pt,a4paper,twoside]{scrreprt} 
\usepackage[a4paper,width=150mm,top=25mm,bottom=25mm,bindingoffset=6mm]{geometry}
\usepackage{graphicx}
\usepackage{booktabs}
\usepackage[table,xcdraw]{xcolor}
\usepackage{lscape}

\begin{document}

\begin{sidewaystable}[]
\resizebox{\textwidth}{!}{%
\begin{tabular}{@{}|l|c|c|c|c|c|c|c|c|c|c|@{}}
\toprule
\rowcolor[HTML]{C0C0C0} 
\multicolumn{1}{|c|}{\cellcolor[HTML]{C0C0C0}{\color[HTML]{000000} \textbf{Technology Category}}} &
  \textbf{\begin{tabular}[c]{@{}c@{}}Average Number of Claims\\ (Median)\end{tabular}} &
  \textbf{\begin{tabular}[c]{@{}c@{}}Q1 Share of Granted Patents\\ in \%\end{tabular}} &
  \textbf{\begin{tabular}[c]{@{}c@{}}Q2 Average Technological Scope\\ (Median)\end{tabular}} &
  {\color[HTML]{000000} \textbf{\begin{tabular}[c]{@{}c@{}}Q3 Average International Scope\\ (Median)\end{tabular}}} &
  \textbf{\begin{tabular}[c]{@{}c@{}}Q4 Average Forward Citation (Pfc)\\ (Median)\end{tabular}} &
  \textbf{\begin{tabular}[c]{@{}c@{}}Patent Activity (PATC)\\ (Absolute Counts)\end{tabular}} &
  {\color[HTML]{000000} \textbf{\begin{tabular}[c]{@{}c@{}}Technology Share (Pts)\\ in \%\end{tabular}}} &
  \textbf{\begin{tabular}[c]{@{}c@{}}Average Patent Quality (PQTC)\\ (Sum of Q1-Q4)\end{tabular}} &
  \textbf{Patent Strength (PSTC)} &
  \textbf{\begin{tabular}[c]{@{}c@{}}Technology Share (PTSTC)\\ based on Patent Strength in \%\end{tabular}} \\ \midrule
\rowcolor[HTML]{E6DEDE} 
\multicolumn{11}{|l|}{\cellcolor[HTML]{E6DEDE}\textbf{TP1 Fossil Substitution}}                        \\ \midrule
Fermentation/Utilization of microorganisms & 18 & 77 & 3  & 14 & 0 & 4.369  & 10 & 17.8 & 77.7637 & 6  \\ \midrule
Bioethanol/Bio-based chemicals             & 19 & 72 & 3  & 12 & 0 & 7.963  & 18 & 15.7 & 125.178 & 10 \\ \midrule
\rowcolor[HTML]{E6DEDE} 
\multicolumn{11}{|l|}{\cellcolor[HTML]{E6DEDE}\textbf{TP2 Agriculture}}                                \\ \midrule
Water management                           & 7  & 35 & 3  & 1  & 5 & 2.483  & 6  & 9.4  & 23.216  & 2  \\ \midrule
Precision farming/agricultural systems     & 10 & 44 & 53 & 2  & 2 & 14.688 & 34 & 57.4 & 843.679 & 66 \\ \midrule
\rowcolor[HTML]{E6DEDE} 
\multicolumn{11}{|l|}{\cellcolor[HTML]{E6DEDE}\textbf{TP3 Biomass Use/Processing}}                     \\ \midrule
Waste reuse/processing                     & 9  & 47 & 3  & 2  & 2 & 1.722  & 4  & 7.5  & 12.863  & 1  \\ \midrule
Biomass processing                         & 18 & 68 & 3  & 9  & 0 & 1.459  & 3  & 12.7 & 18.500  & 1  \\ \midrule
\rowcolor[HTML]{E6DEDE} 
\multicolumn{11}{|l|}{\cellcolor[HTML]{E6DEDE}\textbf{TP4 High Value}}                                 \\ \midrule
Chemistry advance/green chemistry          & 18 & 60 & 2  & 8  & 1 & 2.973  & 7  & 11.6 & 34.487  & 3  \\ \midrule
Enzyme technologies                        & 20 & 71 & 3  & 13 & 0 & 8.089  & 18 & 16.7 & 135.167 & 11 \\ \bottomrule
\end{tabular}%
}
\caption{Summary Patent Indicators}
\label{tab: Summary Patent Indicators}
\end{sidewaystable}

\end{document}

关于如何增加尺寸,无论是在同一页还是在多个页面上,有什么建议吗?对我来说,两种选择都很好,可读性优先。

答案1

正如我在评论中提到的,解决问题的一种方法是旋转列标题:

\documentclass[12pt,a4paper,twoside]{scrreprt}
\usepackage[a4paper,width=150mm,top=25mm,bottom=25mm,bindingoffset=6mm]{geometry}
\usepackage{makecell, tabularx}
\renewcommand\theadfont{\footnotesize\bfseries}
\renewcommand\theadgape{}
\newcolumntype{C}{>{\centering\arraybackslash}X}
\usepackage[table,xcdraw]{xcolor}
\usepackage{rotating}

\begin{document}

\begin{sidewaystable}[htbp]
    \small
    \renewcommand\arraystretch{1.2}
    \setlength\tabcolsep{0pt}
    \settowidth\rotheadsize{\bfseries Patent Strength in \%}
\begin{tabularx}{\linewidth}{l *{10}{C} }
    \Xhline{1.2pt}
    \rowcolor[HTML]{C0C0C0}
\multicolumn{1}{c}{\rotatebox[origin=c]{90}{\textbf{Technology Category}}} &
  \rothead{Average Number of Claims (Median)} &
  \rothead{Q1 Share of Granted Patents in \%} &
  \rothead{Q2 Average Technological Scope (Median)} &
  \rothead{Q3 Average International Scope (Median)} &
  \rothead{Q4 Average Forward Citation (Pfc) (Median)} &
  \rothead{Patent Activity (PATC) (Absolute Counts)} &
  \rothead{Technology Share (Pts) in \%} &
  \rothead{Average Patent Quality (PQTC) (Sum of Q1-Q4)} &
  \rothead{Patent Strength (PSTC)} &
  \rothead{Technology Share (PTSTC) based on Patent Strength in \%} \\ 
    \Xhline{0.8pt}
\rowcolor[HTML]{E6DEDE}
\multicolumn{11}{l}{\textbf{TP1 Fossil Substitution}}               \\
Fermentation/Utilization of microorganisms 
    & 18 & 77 & 3  & 14 & 0 & 4.369  & 10 & 17.8 & 77.7637 & 6      \\
Bioethanol/Bio-based chemicals             
    & 19 & 72 & 3  & 12 & 0 & 7.963  & 18 & 15.7 & 125.178 & 10     \\
\rowcolor[HTML]{E6DEDE}
\multicolumn{11}{l}{\textbf{TP2 Agriculture}}                       \\ 
Water management                           
    & 7  & 35 & 3  & 1  & 5 & 2.483  & 6  & 9.4  & 23.216  & 2      \\  
Precision farming/agricultural systems    
    & 10 & 44 & 53 & 2  & 2 & 14.688 & 34 & 57.4 & 843.679 & 66     \\  
\rowcolor[HTML]{E6DEDE}
\multicolumn{11}{l}{\textbf{TP3 Biomass Use/Processing}}            \\
Waste reuse/processing                     
    & 9  & 47 & 3  & 2  & 2 & 1.722  & 4  & 7.5  & 12.863  & 1      \\  
Biomass processing                         
    & 18 & 68 & 3  & 9  & 0 & 1.459  & 3  & 12.7 & 18.500  & 1      \\ 
\rowcolor[HTML]{E6DEDE}
\multicolumn{11}{l}{\textbf{TP4 High Value}}                        \\
Chemistry advance/green chemistry          
    & 18 & 60 & 2  & 8  & 1 & 2.973  & 7  & 11.6 & 34.487  & 3      \\ 
Enzyme technologies                        
    & 20 & 71 & 3  & 13 & 0 & 8.089  & 18 & 16.7 & 135.167 & 11     \\
    \Xhline{1.2pt}
\end{tabularx} 

\caption{Summary Patent Indicators}
\label{tab: Summary Patent Indicators}
\end{sidewaystable}

\end{document}

在此处输入图片描述

答案2

这是一个解决方案{NiceTabular}nicematrix≥ 6.22,2023-08-14)。您需要进行多次编译。

\documentclass[12pt,a4paper,twoside]{scrreprt}
\usepackage[a4paper,width=150mm,top=25mm,bottom=25mm,bindingoffset=6mm]{geometry}
\usepackage{nicematrix}
\usepackage{booktabs}
\usepackage{rotating}

\begin{document}

\begin{sidewaystable}[htbp]

\NewDocumentCommand{\SubTitle}{m}{\Block[l,fill=[HTML]{E6DEDE}]{1-*}{\textbf{#1}}}

\small
\renewcommand{\arraystretch}{1.2}
\setlength{\tabcolsep}{0pt}

\begin{NiceTabular}{l*{10}{X[c]}}[color-inside]
  \rowcolor[HTML]{C0C0C0}
  \textbf{Technology Category} &
  \RowStyle[cell-space-top-limit=3pt]{\rotate}
  \Block{}{Average Number\\ of Claims (Median)} &
  \Block{}{Q1 Share of Granted\\ Patents in \%} &
  \Block{}{Q2 Average\\ Technological Scope\\ (Median)} &
  \Block{}{Q3 Average\\ International Scope\\ (Median)} &
  \Block{}{Q4 Average\\ Forward Citation (Pfc)\\ (Median)} &
  \Block{}{Patent Activity\\ (PATC)\\ (Absolute Counts)} &
  \Block{}{Technology Share (Pts)\\ in \%} &
  \Block{}{Average Patent Quality\\ (PQTC) (Sum of Q1-Q4)} &
  \Block{}{Patent Strength (PSTC)} &
  \Block{}{Technology Share\\ (PTSTC) based on\\ Patent Strength in \%} \\ 
  \midrule
  \SubTitle{TP1 Fossil Substitution} \\
      Fermentation/Utilization of microorganisms 
          & 18 & 77 & 3  & 14 & 0 & 4.369  & 10 & 17.8 & 77.7637 & 6      \\
      Bioethanol/Bio-based chemicals             
          & 19 & 72 & 3  & 12 & 0 & 7.963  & 18 & 15.7 & 125.178 & 10     \\
  \SubTitle{TP2 Agriculture}                       \\ 
      Water management                           
          & 7  & 35 & 3  & 1  & 5 & 2.483  & 6  & 9.4  & 23.216  & 2      \\  
      Precision farming/agricultural systems    
          & 10 & 44 & 53 & 2  & 2 & 14.688 & 34 & 57.4 & 843.679 & 66     \\  
  \SubTitle{TP3 Biomass Use/Processing}            \\
      Waste reuse/processing                     
          & 9  & 47 & 3  & 2  & 2 & 1.722  & 4  & 7.5  & 12.863  & 1      \\  
      Biomass processing                         
          & 18 & 68 & 3  & 9  & 0 & 1.459  & 3  & 12.7 & 18.500  & 1      \\ 
  \SubTitle{TP4 High Value}                        \\
      Chemistry advance/green chemistry          
          & 18 & 60 & 2  & 8  & 1 & 2.973  & 7  & 11.6 & 34.487  & 3      \\ 
      Enzyme technologies                        
          & 20 & 71 & 3  & 13 & 0 & 8.089  & 18 & 16.7 & 135.167 & 11     \\
  \bottomrule
\end{NiceTabular} 

\caption{Summary Patent Indicators}
\label{tab: Summary Patent Indicators}
\end{sidewaystable}

\end{document}

您需要多次编译(因为nicematrix在后台使用 PGF/Tikz 节点)。

上述代码的输出

相关内容