长表六页

长表六页

我在 Word 中有一个长达“六页”的表格。我将工作转移到 Latex 中,但表格显示效果不佳,没有显示所有行和列。

在此处输入图片描述

\begin{longtable}[H]
    \centering
    \caption{List of published articles selected for the systematic review}
    \label{tab:my-table}
    \begin{tabular}{|c|c|c|c|c|l|c|}
    \hline
    \rowcolor[HTML]{EFEFEF}
    \textbf{ID} &
    \textbf{Reference} &
    \textbf{Year} &
    \textbf{Country} &
    \textbf{Study Period} &
    \multicolumn{1}{c|}{\cellcolor[HTML]{EFEFEF}\textbf{Model / Methods}} &
    \textbf{Techniques Category} \\ \hline
1 &
  \cite{hales2002potential} &
  2002 &
  Global &
  \begin{tabular}[c]{@{}c@{}}1975\\ -\\ 1996\end{tabular} &
  \begin{tabular}[c]{@{}l@{}}- Logistic Regression\\ - Spatial 

答案1

您的表格太宽了,我非常怀疑它能否在保持合理字体大小和边距的情况下适合一页。因此,我建议将表格旋转为横向。以下内容可以作为起点:

在此处输入图片描述

\documentclass{article}
\usepackage[table]{xcolor}
\usepackage{xltabular}

\usepackage{pdflscape}
\usepackage{enumitem}
\newlist{tabitem}{itemize}{1}
\setlist[tabitem]{label=--, noitemsep,leftmargin=*,topsep=0pt,partopsep=0pt, nosep, before=\begin{minipage}[t]{\hsize}, after=\end{minipage}}

\begin{document}


\begin{landscape}
\begin{xltabular}{\linewidth}{|r|c|c|>{\centering\arraybackslash}p{1.5cm}|c|X|X|}
    \caption{List of published articles selected for the systematic review}
    \label{tab:my-table}\\
    \hline
    \rowcolor[HTML]{EFEFEF}
    \textbf{ID} &
    \textbf{Ref.} &
    \textbf{Year} &
    \textbf{Country} &
    \textbf{Study Period} &
    \textbf{Model / Methods} &
    \textbf{Techniques Category} \\ \hline
    \endfirsthead
    \caption{List of published articles selected for the systematic review - continued from previous page}\\
    \hline
    \rowcolor[HTML]{EFEFEF}
    \textbf{ID} &
    \textbf{Ref.} &
    \textbf{Year} &
    \textbf{Country} &
    \textbf{Study Period} &
    \textbf{Model / Methods} &
    \textbf{Techniques Category} \\ \hline
    \endhead
1 &
  \cite{hales2002potential} &
  2002 &
  Global &
 1975 -- 1996 &
 \begin{tabitem}
   \item Logistic Regression
   \item Spatial
 \end{tabitem} &
 some text in the last column 
\end{xltabular}
\end{landscape}  
\end{document}

相关内容