我正在尝试打破新行的布局,\begin{itemize}
以便更合适地查看longtable
。我找不到如何实现这一点。有什么帮助吗?
\begingroup
\setlength{\LTleft}{-20cm plus -1fill}
\setlength{\LTright}{\LTleft}
\begin{longtable}{|p{3cm}|p{4cm}|p{7cm}|}
\hline
1 & 2 & 3 \tabularnewline
\hline
\begin{itemize} \item[-] ABC.\item[-] DEF \end{itemize} & AAA & BBB. \tabularnewline
\hline
\multicolumn{3}{l}{} \\[-7pt]
\caption[]{Description.}
\end{longtable}
\endgroup
\vspace{0.5cm}
提前致谢。
答案1
\documentclass{article}
\usepackage{longtable}
\usepackage{ltablex}
\usepackage{enumitem}
\usepackage{caption}
\begin{document}
\begingroup
\begin{longtable}{|p{3cm}|p{4cm}|p{7cm}|}\hline
1 & 2 & 3 \tabularnewline\hline
\vspace{-\baselineskip}
\begin{itemize}[topsep=0pt] \item[-] ABC.\item[-] DEF \end{itemize} & AAA & BBB. \tabularnewline
\hline
\end{longtable}
\captionof{table}{Description.}
\endgroup
\begingroup\noindent
\begin{tabularx}{\linewidth}{|p{3cm}|p{4cm}|X|}\hline
1 & 2 & 3 \tabularnewline\hline
\vspace{-\baselineskip}
\begin{itemize}[topsep=0pt] \item[-] ABC.\item[-] DEF \end{itemize} & AAA & BBB. \tabularnewline
\hline
\end{tabularx}
\captionof{table}{Description.}
\endgroup
\end{document}
顺便说一句:在你的情况下,使用组合的包更有ltablex
意义tabularx
longtable