Pergunta

Eu tenho um realmente longa mesa em LaTeX que se estende por várias páginas e é (como é agora) também muito grande para a página.

Eu estou usando o pacote longtable com cada largura da coluna especificada com o comando p{width}.

O problema é que a maioria das linhas contêm uma chamada várias colunas, e, portanto, não estão a aderir ao comando p{width} preâmbulo, que faz com que a largura total da tabela a ser muito grande.

exemplo mínimo:

\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} 

Eu estou carregando longtable na minha preâmbulo, e correndo pdflatex várias vezes (como descrito na documentação longtable). Ele compila com avisos 0 e 0 erros.

Como posso obter normal "estreitar" células?

Foi útil?

Solução

Você já tentou usar |p{<sum of widths>}| para a opção de formatação a \multicolumn?

Apenas supondo aqui.

Outras dicas

Você tem que dar um parâmetro de tamanho para multicolumns mesmo que não haja um tamanho preâmbulo. O próximo exemplo é uma célula de várias colunas do tamanho da largura da tabela:

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

\ begin {longtable} {p {2,8 centímetros} p {2,8 centímetros} trabalhou para mim ..

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top