Tengo una tabla muy larga en LaTeX que se extiende por varias páginas y es (como lo es ahora) también demasiado amplia para la página.¿Cómo puedo restringir el tamaño de mis celdas de varias columnas en una tabla larga?
Estoy usando el paquete longtable con cada ancho de columna especificado con el comando p{width}
.
El problema es que la mayoría de las filas contienen una llamada de varias columnas y, por lo tanto, no se adhieren al comando preamble p{width}
, lo que hace que el ancho total de la tabla sea demasiado grande.
ejemplo 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}
Estoy cargando Longtable en mi preámbulo, y funcionando pdflatex varias veces (como se indica en la documentación Longtable). Se compila con 0 advertencias y 0 errores.
¿Cómo puedo obtener células normales "estrechas"?
Funcionó como un amuleto. ¡Gracias por la pronta respuesta! – Mica
ejemplo para noobs? – IRus
@IRus El segundo argumento para '\ multicolumn' es un especificador de formato que toma el mismo significado que en el segundo argumento para un entorno' tabular'. Consulte http://stackoverflow.com/questions/440228/how-can-i-combine-cells-in-a-row-in-a-latex-table para obtener un resumen de cómo usarlo. La situación de Mica aquí es un caso de esquina interesante en el que confiaba en el ancho de columna fijo y la multicolumna abría demasiado. – dmckee