如何限制我的\多列单元格的长度?

我在LaTeX中有一个非常长的表格,它跨越了几页,并且(现在)对于页面来说也太宽了。

我正在使用longtable包,每个列宽都用p{width}命令指定。

问题是,大多数行包含多列调用,因此不遵守前导码p{width}命令,这会导致表的总宽度过大。

最小例子:

begin{longtable}{|p{1in}|p{0.75in}|p{0.5in}|p{0.5in}|>{p{1in}|p{1in}|}
caption{some cap} label{somelable}
hline
multicolumn{2}{|c|}{textbf{Text Header One}} & multicolumn{2}{|c|}{textbf{Text Header Two}} & multirow{2}{*}{textbf{Three}} & multirow{2}{*}{textbf{Four}} tabularnewline cline{1-4}
textbf{Five} & textbf{Six} & textbf{Seven} & textbf{Eight} &  & tabularnewline hline
Some Text String & Longer Text String Here & More Text Here & Text Example & Text & Text tabularnewline hline
Example Text String Two & Longer Text String Example Two & multicolumn{2}{|l|}{Multi-column Text String that doesn't fit column width} & Text & Text tabularnewline hline
Example Text String Two & Longer Text String Example Two & multicolumn{2}{|l|}{Multi-column Text String that doesn't fit column width} & Text & Text tabularnewline hline
Example Text String Two & Longer Text String Example Two & multicolumn{2}{|l|}{Multi-column Text String that doesn't fit column width} & Text & Text tabularnewline hline
Example Text String Two & Longer Text String Example Two & multicolumn{2}{|l|}{Multi-column Text String that doesn't fit column width} & Text & Text tabularnewline hline
Example Text String Two & Longer Text String Example Two & multicolumn{2}{|l|}{Multi-column Text String that doesn't fit column width} & Text & Text tabularnewline hline
Example Text String Two & Longer Text String Example Two & multicolumn{2}{|l|}{Multi-column Text String that doesn't fit column width} & Text & Text tabularnewline hline
Example Text String Two & Longer Text String Example Two & multicolumn{2}{|l|}{Multi-column Text String that doesn't fit column width} & Text & Text tabularnewline hline
Example Text String Two & Longer Text String Example Two & multicolumn{2}{|l|}{Multi-column Text String that doesn't fit column width} & Text & Text tabularnewline hline
Example Text String Two & Longer Text String Example Two & multicolumn{2}{|l|}{Multi-column Text String that doesn't fit column width} & Text & Text tabularnewline hline
Example Text String Two & Longer Text String Example Two & multicolumn{2}{|l|}{Multi-column Text String that doesn't fit column width} & Text & Text tabularnewline hlineExample Text String Two & Longer Text String Example Two & multicolumn{2}{|l|}{Multi-column Text String that doesn't fit column width} & Text & Text tabularnewline hline
Example Text String Two & Longer Text String Example Two & multicolumn{2}{|l|}{Multi-column Text String that doesn't fit column width} & Text & Text tabularnewline hline
Example Text String Two & Longer Text String Example Two & width of box & text & Text & Text  tabularnewline hline
end{longtable} 

我在序言中加载longtable,并多次运行pdflatex(如长文档中所述)。 它编译为0个警告和0个错误。

我怎样才能获得正常的“狭窄”细胞?


您是否尝试过使用|p{<sum of widths>}| 对于multicolumn格式化选项?

只是在这里猜测。


即使有前导码大小,您也必须将大小参数提供给多列。 下一个示例是表宽度大小的多列单元格:

begin{tabular}{p{0.3textwidth} p{0.7textwidth}}
multicolumn{2}{ p{textwidth}} {YOUR TEXT HERE}
end{tabular}

begin {longtable} {p {2.8cm} p {2.8cm}为我工作。

链接地址: http://www.djcxy.com/p/33367.html

上一篇: How can I restrict the size of my \multicolumn cells in a longtable?

下一篇: Visual Studio T4 generator output UTF