Latex 多列命令换行文本不填充整个单元格

问题描述

我使用 \multicolumn{2}{p{2cm}|} 来允许换行文本。两个拆分单元格上方的单个单元格中的标题将环绕到第一个拆分单元格的边界。

这是我的全部代码

\begin{flushleft}
{\noindent\centering\begin{tabular}{|p{2cm}|p{2cm}|p{2cm}|p{2cm}|p{2cm}|p{6cm}|}
\hline
{\textbf{Marker}} & \multicolumn{2}{p{2cm}|}{\textbf{Age of first confirmed expression (kya)}} & \multicolumn{2}{p{2cm}|}{\textbf{Similar supporting evidence from other sites}} & Notable differences in character of evidence\\
\cline{2-5}
&S&N&S&N&\\
\hline
Ochre use and processing&\underline{101}&115&Yes&Yes&Tk1 and Tk2 have more components of the toolkits (e.g. grindstones,hammerstones) preserved\\
\hline
Engravings&\underline{99}&72 - 60&Yes&Unclear&Blombos engravings much better attested and longer lasting Tradition; Marillac arguably notational\\
\hline
Body ornamentation&82*&\underline{130}&Yes&Yes&Use wear patterns very similar. Krapina find more isolated/less reliable\\
\hline
Painted or drawn art &\underline{73}&67&Unclear in specified timeframe&Unclear&Neither are figurative; S is abstract,N is semi-representational.\\
\hline
Burial &100 - \underline{130}&120&Yes&Yes&Similar evidence\\
\hline
Burial with grave goods &\underline{100 - 130}&50&Yes&Yes&Similar (apart from age)\\
\hline
\end{tabular}\\}
\vspace{0.5cm}
\end{flushleft}

这是它正在生成的表。您可以看到“首次确认表达年龄(kya)”是错误文本换行的示例。

Table

解决方法

你需要做的:

\multicolumn{2}{p{4cm}|}{\textbf{Age of first confirmed expression (kya)}}

所以你的多列是 4 厘米宽,因为它跨越 2 列,每列 2 厘米宽。