1

I am trying to adjust the size of a table in landscape view so that (1) one can read the content and (2) no space is left on the pages. Currently it looks like this:

\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}

Any suggestions on how to increase the size, either on the same page, or over multiple pages? Both options are fine for me, readability has priority.

3
  • 1
    scaling tables is never recommended, it produces inconsistent fonts and rule widths, better to use a named size such as \small . \resizebox can never work for multi-page content as it makes a box, boxes never split over pages. Aug 14, 2021 at 16:31
  • 1
    Welcome to TeX. SE! Column headers are to long. Try to make them shorter, or see, if their rotation is an possible option
    – Zarko
    Aug 14, 2021 at 16:31
  • See tex.stackexchange.com/questions/497178/…, it may gives an example for solution of your problem.
    – Zarko
    Aug 14, 2021 at 17:21

2 Answers 2

1

As I already mentioned in comments, one way to solve your problem is rotate column headers:

\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}

enter image description here

0

Here is a solution with {NiceTabular} of nicematrix (≥ 6.22 of 2023-08-14). You need several compilations.

\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}

You need several compilations (because nicematrix uses PGF/Tikz nodes under the hood).

Output of the above code

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .