我有一张长表,它跨越了好几页。由于某些我不知道的原因,由于我的表中有逐项列出的东西,它无法将它们分成几页。而且项目之间的间距仍然比我想要的要宽。这是我得到的结果:
\begin{center}
\begin{longtable}{ p{7.5cm} p{4.5cm} p{2cm} }
\renewcommand{\arraystretch}{1.3}
\caption{Here is the caption}
\label{Table:table_label}\\
\hline \hline
\textbf{{\small Title1}} & \textbf{{\small Title2}} & \textbf{{\small Title3}} \\
\hline \hline
\endfirsthead
\multicolumn{3}{c}%
{\tablename\ \thetable\ -- \textit{Continued from previous page}} \\
\hline \hline
\textbf{{\small Title1}} & \textbf{{\small Title2}} & \textbf{{\small Title3}} \\
\hline \hline
\endhead
\hline \multicolumn{3}{r}{\textit{Continued on next page}} \\
\endfoot
\hline \hline
\endlastfoot
{\small item1}
\begin{itemize}
\renewcommand{\labelitemi}{\diamond}
\item {\footnotesize subitem1.1}
\item {\footnotesize subitem1.2}
\item {\footnotesize subitem1.3}
\item {\footnotesize subitem1.4}
\begin{itemize}
\renewcommand{\labelitemi}{$\ast$}
\item {\footnotesize subsubitem1.4.1}
\end{itemize}
\end{itemize} & {\small Data1} & \textbf{{\small No1}} \\
\hline
{\small item2} & {\small Data2} & \textbf{{\small No2}} \\
\hline
{\small item3}
\begin{itemize}
\renewcommand{\labelitemi}{$\diamond$}
\item {\footnotesize subitem3.1}
\item {\footnotesize subitem3.2}
\item {\footnotesize subitem3.3}
\item {\footnotesize subitem3.4}
\item {\footnotesize subitem3.5}
\item {\footnotesize subitem3.6}
\end{itemize} & {\small Data3} & \textbf{{\small No3}} \\
\end{longtable}
\end{center}
答案1
十有八九,最好将这种内容设置为列表而不是表格,这样可以提供更大的灵活性,并允许在项目内分页,基本的开始可能是:
\documentclass{article}
\usepackage{longtable}
\renewcommand{\labelitemi}{$\diamond$}
\newcommand\foo[3]{\item[{%
\parbox[t]{\linewidth}{%
\hrule
\vspace{2pt}%
\makebox[.5\linewidth][c]{#1}%
\makebox[.3\linewidth][c]{#2}%
\makebox[.2\linewidth][c]{#3}%
\endgraf
\vspace{2pt}%
\hrule}}]\par\mbox{}}
\begin{document}
\begin{description}
\foo{item1}{Data1}{No1}
\begin{itemize}
\item subitem1.1
\item subitem1.2
\item subitem1.3
\item subitem1.4
\begin{itemize}
\item subsubitem1.4.1
\end{itemize}
\end{itemize}
\foo{item2}{Data2}{No2}
\begin{itemize}
\item subitem3.1
\item subitem3.2
\item subitem3.3
\item subitem3.4
\item subitem3.5
\item subitem3.6
\end{itemize}
\end{description}
\end{document}