GeneralWide table: Cut manually in several smaller tables?

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
mutzinet
Posts: 5
Joined: Tue Feb 26, 2008 12:03 pm

Wide table: Cut manually in several smaller tables?

Post by mutzinet »

Hello,

I have a problem with a wide table (35 columns) that I cannot fit on my B5 page. Even with landscape mode, tiny font, the table is still too wide to fit on one page. Longtable and supertabular only seem to work with long tables (many rows), but they are inefficient with wide tables.

The option I am thinking about is to cut my table in several tables and just repeat the first two columns (sample numbers of chemical analyses). Is there a way to suppress the automatic numbering of the next tables, and call them "Table 1 (cont.)", instead?

I've been googling for hours to find a solution, with no success. And my thesis should go to the printer very soon. :|


I would be grateful for any help.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Juanjo
Posts: 657
Joined: Sat Jan 27, 2007 12:46 am

Wide table: Cut manually in several smaller tables?

Post by Juanjo »

Try the \ContinuedFloat command from the caption package.
The CTAN lion is an artwork by Duane Bibby. Courtesy of www.ctan.org.
mutzinet
Posts: 5
Joined: Tue Feb 26, 2008 12:03 pm

Re: Wide table: Cut manually in several smaller tables?

Post by mutzinet »

Thanks a lot Juanjo!

I discovered this command just before your post, but I do not understand how I can not have found it earlier.
I will post here whether it is working for me or not.
mutzinet
Posts: 5
Joined: Tue Feb 26, 2008 12:03 pm

Re: Wide table: Cut manually in several smaller tables?

Post by mutzinet »

This \ContinuedFloat command is exactly what I have been looking for since I started writing in latex about two years ago...

Thanks again, Juanjo!
mdn
Posts: 2
Joined: Fri Sep 26, 2008 10:51 am

Wide table: Cut manually in several smaller tables?

Post by mdn »

mutzinet wrote:Hello,

I have a problem with a wide table (35 columns) that I cannot fit on my B5 page. Even with landscape mode, tiny font, the table is still too wide to fit on one page. Longtable and supertabular only seem to work with long tables (many rows), but they are inefficient with wide tables.

The option I am thinking about is to cut my table in several tables and just repeat the first two columns (sample numbers of chemical analyses). Is there a way to suppress the automatic numbering of the next tables, and call them "Table 1 (cont.)", instead?

I've been googling for hours to find a solution, with no success. And my thesis should go to the printer very soon. :|


I would be grateful for any help.
I got the same problem ...I read the documentation of the caption, but i dont seem to get \ContinuedFloat to work :(

I would really appreciate if anyone make a small ex., caz i believe it's a syntax problem i got :)
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Wide table: Cut manually in several smaller tables?

Post by localghost »

mdn wrote:[...] I got the same problem ...I read the documentation of the caption, but i dont seem to get \ContinuedFloat to work [...]
Create an example of what you wanna do and show your recent efforts to make users able to search the critical piece of code.


Best regards and welcome to the board
Thorsten¹
mdn
Posts: 2
Joined: Fri Sep 26, 2008 10:51 am

Wide table: Cut manually in several smaller tables?

Post by mdn »

I have created an example of what i wanna do.

I made a table of 68 columns and 11 rows. I need to make the table stretch over 4-5 pages.

So I got 2 issues to solve:
  • First of all and most important , stretching the display of the table sideways over more pages.
  • Second displaying the first column that hold the names of the tasks, as the first column on each of these pages.

Code: Select all

\documentclass[10pt,a4paper]{report}
\usepackage[latin1]{inputenc}
\usepackage[danish]{babel}

\usepackage{graphicx} 
\usepackage{multirow}

% \usepackage{longtable}
% \usepackage{caption}

\begin{document}

\begin{tabular}{l| c|c| 
c|c|c|c|c| c|c|c|c|c| c|c|c|c|c| c|c|c|c|c| c|c|c|c|c| 
c|c|c|c|c| c|c|c|c|c| c|c|c|c|c| c|c|c|c|c| c|c|c|c|c| 
c|c|c|c|c| c|c|c|c|c| c|c|c|c|c| c|c|c|c|c| c|c|c|c|c|} 

\cline{2-68}     

& \multicolumn{2}{|c|}{Uge 32} 
& \multicolumn{5}{|c|}{Uge 33} 
& \multicolumn{5}{|c|}{Uge 34} 
& \multicolumn{5}{|c|}{Uge 35} 
& \multicolumn{5}{|c|}{Uge 36} 
& \multicolumn{5}{|c|}{Uge 37} 
& \multicolumn{5}{|c|}{Uge 38} 
& \multicolumn{5}{|c|}{Uge 39}
& \multicolumn{5}{|c|}{Uge 40} 
& \multicolumn{5}{|c|}{Uge 41} 
& \multicolumn{5}{|c|}{Uge 42} 
& \multicolumn{5}{|c|}{Uge 43}
& \multicolumn{5}{|c|}{Uge 44} 
& \multicolumn{5}{|c|}{Uge 45}
\\ \cline{2-68}

& \multicolumn{17}{|c|}{August}
& \multicolumn{22}{|c|}{September}
& \multicolumn{23}{|c|}{Oktober}
& \multicolumn{5}{|c|}{November}
\\ \cline{2-68}

& \rotatebox{70}{Torsdag} & \rotatebox{70}{Fredag} %Week 32
& \rotatebox{70}{Mandag} & \rotatebox{70}{Tirsdag} & \rotatebox{70}{Onsdag} & \rotatebox{70}{Torsdag} & \rotatebox{70}{Fredag} %Week 33 
& \rotatebox{70}{Mandag} & \rotatebox{70}{Tirsdag} & \rotatebox{70}{Onsdag} & \rotatebox{70}{Torsdag} & \rotatebox{70}{Fredag} %%Week 34
& \rotatebox{70}{Mandag} & \rotatebox{70}{Tirsdag} & \rotatebox{70}{Onsdag} & \rotatebox{70}{Torsdag} & \rotatebox{70}{Fredag} %%Week 35
& \rotatebox{70}{Mandag} & \rotatebox{70}{Tirsdag} & \rotatebox{70}{Onsdag} & \rotatebox{70}{Torsdag} & \rotatebox{70}{Fredag} %%Week 36
& \rotatebox{70}{Mandag} & \rotatebox{70}{Tirsdag} & \rotatebox{70}{Onsdag} & \rotatebox{70}{Torsdag} & \rotatebox{70}{Fredag} %%Week 37
& \rotatebox{70}{Mandag} & \rotatebox{70}{Tirsdag} & \rotatebox{70}{Onsdag} & \rotatebox{70}{Torsdag} & \rotatebox{70}{Fredag} %%Week 38
& \rotatebox{70}{Mandag} & \rotatebox{70}{Tirsdag} & \rotatebox{70}{Onsdag} & \rotatebox{70}{Torsdag} & \rotatebox{70}{Fredag} %%Week 38
& \rotatebox{70}{Mandag} & \rotatebox{70}{Tirsdag} & \rotatebox{70}{Onsdag} & \rotatebox{70}{Torsdag} & \rotatebox{70}{Fredag} %%Week 39
& \rotatebox{70}{Mandag} & \rotatebox{70}{Tirsdag} & \rotatebox{70}{Onsdag} & \rotatebox{70}{Torsdag} & \rotatebox{70}{Fredag} %%Week 40
& \rotatebox{70}{Mandag} & \rotatebox{70}{Tirsdag} & \rotatebox{70}{Onsdag} & \rotatebox{70}{Torsdag} & \rotatebox{70}{Fredag} %%Week 41
& \rotatebox{70}{Mandag} & \rotatebox{70}{Tirsdag} & \rotatebox{70}{Onsdag} & \rotatebox{70}{Torsdag} & \rotatebox{70}{Fredag} %%Week 42
& \rotatebox{70}{Mandag} & \rotatebox{70}{Tirsdag} & \rotatebox{70}{Onsdag} & \rotatebox{70}{Torsdag} & \rotatebox{70}{Fredag} %%Week 43
& \rotatebox{70}{Mandag} & \rotatebox{70}{Tirsdag} & \rotatebox{70}{Onsdag} & \rotatebox{70}{Torsdag} & \rotatebox{70}{Fredag} %%Week 44
& \rotatebox{70}{Mandag} & \rotatebox{70}{Tirsdag} & \rotatebox{70}{Onsdag} & \rotatebox{70}{Torsdag} & \rotatebox{70}{Fredag} %%Week 45
\\ \cline{2-68}

&7	&8                          %%Week 32	
&11	&12	&13	&14	&15 %%Week 33
&18	&19	&20	&21	&22 %%Week 34
&25	&26	&27	&28	&29 %%Week 35
&1	&2	&3	&4	&5  %%Week 36
&8	&9	&10	&11	&12 %%Week 37
&15	&16	&17	&18	&19 %%Week 38
&22	&23	&24	&25	&26 %%Week 39
&29	&30	&1	&2	&3  %%Week 40
&6	&7	&8	&9	&10 %%Week 41
&13	&14	&15	&16	&17 %%Week 42
&20	&21	&22	&23	&24 %%Week 43
&27	&28	&29	&30	&31 %%Week 44
&3	&4	&5	&6	&7  %%Week 45
\\ \cline{1-68}

\multicolumn{1}{|l|}{Task Group} 
& \multicolumn{2}{|c|}{} & \multicolumn{5}{|c|}{} 
& \multicolumn{5}{|c|}{} & \multicolumn{5}{|c|}{} & \multicolumn{5}{|c|}{} 
& \multicolumn{5}{|c|}{} & \multicolumn{5}{|c|}{} & \multicolumn{5}{|c|}{} 
& \multicolumn{5}{|c|}{} & \multicolumn{5}{|c|}{} & \multicolumn{5}{|c|}{}
& \multicolumn{5}{|c|}{} & \multicolumn{5}{|c|}{} & \multicolumn{5}{|c|}{}
\\ \cline{1-68}

\multicolumn{1}{|l|}{Task Name 1}
& X & X & X & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & &
\\ \cline{1-68}

\multicolumn{1}{|l|}{Task Name 2}
& & & & X & X & X & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & &
\\ \cline{1-68}

\multicolumn{1}{|l|}{Task Name 3}
& X & X & X & X & X & X & X & X & X & X & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & &
\\ \cline{1-68}

\multicolumn{1}{|l|}{Task Name 4}
& & & & & & & & X & X & X & X & X & X & X & X & X & X & X & X & X & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & &
\\ \cline{1-68}

\multicolumn{1}{|l|}{Task Name 5}
& X & X & X & X & & & & & & & & & & X & X & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & &
\\ \cline{1-68}

\multicolumn{1}{|l|}{Task Name 6}
& & & & & & & & & & & & & & & X & X & X & X & X & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & &
\\ \cline{1-68}

\end{tabular}

\end{document}
PDF output of this code
latex_ex.pdf
(15.53 KiB) Downloaded 307 times
After i been googling for days and read all the tutorials i could find. I still didn't have a solution.

My temperary solution was to make the first column a table (Name table) of itself, and splitting the rest of the table's column up manually into more tables that could fit a A4 paper, and the merce the Name table infront of each table.

But then i found this thread, and i got my hopes up for making a complete solution for this table schedule.
User avatar
Juanjo
Posts: 657
Joined: Sat Jan 27, 2007 12:46 am

Wide table: Cut manually in several smaller tables?

Post by Juanjo »

mdn,

The problem of the opening post treated about numbering of tables: a long table is splitted in several "pieces" which should share the same number. Your problem, once seen the minimal example, is about how to split the table, not about numbering. Unfortunately, the \ContinuedFloat command is not for you. Concerning your specific issue, I can't suggest anything essentially different to the solution you have already devised. Perhaps you could simplify some entries with judicious commands. For example, you could define a \Week command as follows:

Code: Select all

\newcommand{\Week}{& \rotatebox{70}{Mandag} & \rotatebox{70}{Tirsdag} & \rotatebox{70}{Onsdag} & \rotatebox{70}{Torsdag} & \rotatebox{70}{Fredag}}
Then you could use \Week instead of a so long portion of code.
The CTAN lion is an artwork by Duane Bibby. Courtesy of www.ctan.org.
Post Reply