是否可以定义表格列,以便排版系统在第 3 列溢出时自动拆分内容?此外,在这种情况下,是否可以定义表格,使第 1 列和第 2 列中的项目重复?
在下面的 MWE 中,我手动将单元格内容拆分为 2 个单元格,但理想情况下,它也应该适用于 1 个单元格。
平均能量损失
\documentclass[11pt,a4paper]{report}
\usepackage[margin=0.5cm]{geometry}
\usepackage{array,multirow,longtable, lipsum}
\begin{document}
Text First Line
\vspace{26cm}
\noindent
\begin{longtable}{|m{3cm}|m{3.5cm}|p{12cm}|}
\multicolumn{3}{c}{\Large \centering \textbf{Heading}} \\
\hline
\textbf{Item 1} & \textbf{Item 2} & \multicolumn{1}{c|}{\textbf{Item 3 (Long)}} \\
\hline
\endfirsthead
\multicolumn{3}{c}{\Large \centering \textbf{Heading (continued)}} \\
\hline
\textbf{Item 1} & \textbf{Item 2} & \multicolumn{1}{c|}{\textbf{Item 3 (Long)}} \\
\endhead
A & B & This is the content in the first cell. This remains the content in the first cell. It may seem utterly implausible, but this content is still within the \\ \hline
A (continued) & B (continued) & confines of the first cell. \\ \hline
C & D & This is the second cell \\ \hline
\end{longtable}
\end{document}
理想情况下,可以获得相同的行为,因此您可以编写
<table declaration>
A & B & This is the content in the first cell. This remains the content in the first cell. It may seem utterly implausible, but this content is still within the confines of the first cell \\ \hline
并且仍然具有与附图相同的输出。