Newbie wants to make long tables
Hi everybody, I'm wondering how to break up long tables over several pages, automatically placing continuing headers and footers. Thanks much for any help Thomas -- mailto laborator at web de
At 08:44 20/08/2003 +0200, you wrote:
Hi everybody,
I'm wondering how to break up long tables over several pages, automatically placing continuing headers and footers.
Thanks much for any help
this is supported in tabulate (by default), and can be turned on in the bTABLE mechanism (\setupTABLE[split=yes]) while (less robust) it's also available in \starttable by means of \starttables cum suis. Hans ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------
Hans, I have been looking at core-ntb (dangerous bend for me) and I found [b|e]TABLEhead, [b|e]TABLEbody and [b|e]TABLEfoot. I then put 2 + 2 together and made 5. It doesn't work as I expected. Are Table heads and foots available? TABLEbody gives no output and TABLEhead and TABLEfoot just place themselves at the end of table (head first, foot next) rather than at the beginning and end of each column. One version of my test code is below; \bTABLEhead \bTR \bTH Head 1 \eTH \bTH Head 2 \eTH \eTR \eTABLEhead \bTABLEfoot \bTR \bTH Foot 1 \eTH \bTH Foot 2 \eTH \eTR \eTABLEfoot \bTABLE[split=yes] \dorecurse{40}{\bTR \bTD left \eTD\bTD right \eTD \eTR} \eTABLE I have been looking forward to this feature for some time. If you work on it, it would be nice to have the middle table breaks to have their own heads and foots such that one can put 'continued' etc. into the table. TIA -- Nigel
From: Hans Hagen
At 08:44 20/08/2003 +0200, you wrote: Hi everybody,
I'm wondering how to break up long tables over several pages, automatically placing continuing headers and footers.
Thanks much for any help
this is supported in tabulate (by default), and can be turned on in the bTABLE mechanism (\setupTABLE[split=yes]) while (less robust) it's also available in \starttable by means of \starttables cum suis.
Hans
At 08:36 12/09/2003 +0100, you wrote:
Hans, I have been looking at core-ntb (dangerous bend for me) and I found [b|e]TABLEhead, [b|e]TABLEbody and [b|e]TABLEfoot. I then put 2 + 2 together and made 5. It doesn't work as I expected. Are Table heads and foots available? TABLEbody gives no output and TABLEhead and TABLEfoot just place themselves at the end of table (head first, foot next) rather than at the beginning and end of each column. One version of my test code is below;
\bTABLEhead \bTR \bTH Head 1 \eTH \bTH Head 2 \eTH \eTR \eTABLEhead \bTABLEfoot \bTR \bTH Foot 1 \eTH \bTH Foot 2 \eTH \eTR \eTABLEfoot \bTABLE[split=yes] \dorecurse{40}{\bTR \bTD left \eTD\bTD right \eTD \eTR} \eTABLE
I have been looking forward to this feature for some time. If you work on it, it would be nice to have the middle table breaks to have their own heads and foots such that one can put 'continued' etc. into the table.
the following will repeat the head, \bTABLE[split=repeat] \bTABLEhead \bTR \bTH Head 1 \eTH \bTH Head 2 \eTH \eTR \eTABLEhead \bTABLEfoot \bTR \bTH Foot 1 \eTH \bTH Foot 2 \eTH \eTR \eTABLEfoot \bTABLEbody \dorecurse{40}{\bTR \bTD left \eTD\bTD right \eTD \eTR} \eTABLEbody \eTABLE since foots often contain sums or so, they are not repeated, we could consider something \bMIDDLE \eMIDDLE but it would require some close re-reading of the source code since the available size calculation is tricky (unless we limit sucn a middle to a one liner Hans ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------
Hans, Thank you very much for this it is excellent-I have a further question. I have been trying to encourage page breaking on some lines rather than others. Consider the following \bTABLE[split=repeat] \bTABLEhead \bTR \bTH Head 1 \eTH \bTH Head 2 \eTH \eTR \eTABLEhead \bTABLEfoot \bTR \bTH Foot 1 \eTH \bTH Foot 2 \eTH \eTR \eTABLEfoot \bTABLEbody \dorecurse{40}{\bTR \bTD[nr=3] left \eTD\bTD right \eTD \eTR\dorecurse{2}{\bTR\bTD right \eTD \eTR}} \eTABLEbody \eTABLE Which is something like below Left right right right
At 17:05 14/09/2003 +0100, you wrote:
Hans, Thank you very much for this it is excellent-I have a further question.
I have been trying to encourage page breaking on some lines rather than others. Consider the following
\bTABLE[split=repeat] \bTABLEhead \bTR \bTH Head 1 \eTH \bTH Head 2 \eTH \eTR \eTABLEhead \bTABLEfoot \bTR \bTH Foot 1 \eTH \bTH Foot 2 \eTH \eTR \eTABLEfoot \bTABLEbody \dorecurse{40}{\bTR \bTD[nr=3] left \eTD\bTD right \eTD \eTR\dorecurse{2}{\bTR\bTD right \eTD \eTR}} \eTABLEbody \eTABLE
Which is something like below
Left right right right
I have been trying to find a way to encourage page breaking at appropriate points but have not found the way.
\bTABLE[split=yes] \bTR \bTD left \eTD\bTD right \eTD\eTR \bTR[after=\pagina] \bTD left \eTD\bTD right \eTD\eTR \bTR \bTD left \eTD\bTD right \eTD\eTR \bTR \bTD left \eTD\bTD right \eTD\eTR \bTR \bTD left \eTD\bTD right \eTD\eTR \bTR \bTD left \eTD\bTD right \eTD\eTR \eTABLE i'll send you the adapted core-ntb in another mail Hans ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------
Which is something like below
Left right right right
I have been trying to find a way to encourage page breaking at appropriate points but have not found the way.
\bTABLE[split=yes] \bTR \bTD left \eTD\bTD right \eTD\eTR \bTR[after=\pagina] \bTD left \eTD\bTD right \eTD\eTR \bTR \bTD left \eTD\bTD right \eTD\eTR \bTR \bTD left \eTD\bTD right \eTD\eTR \bTR \bTD left \eTD\bTD right \eTD\eTR \bTR \bTD left \eTD\bTD right \eTD\eTR \eTABLE
i'll send you the adapted core-ntb in another mail
When will this be included in the distribution? Willi
At 19:32 15/09/2003 +0200, you wrote:
When will this be included in the distribution?
some day soon Hans ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------
Hans, Thank you again for your speedy response.
\bTABLE[split=yes] \bTR \bTD left \eTD\bTD right \eTD\eTR \bTR[after=\pagina] \bTD left \eTD\bTD right \eTD\eTR \bTR \bTD left \eTD\bTD right \eTD\eTR \bTR \bTD left \eTD\bTD right \eTD\eTR \bTR \bTD left \eTD\bTD right \eTD\eTR \bTR \bTD left \eTD\bTD right \eTD\eTR \eTABLE
i'll send you the adapted core-ntb in another mail Thanks received and installed
Hans \pagina seems to be synonymous with \page at least \page appears to have the same effect. I was hoping for [after={\page[bigpreference]}] but that does not appear to work. [after={\page[yes]}] does the same as \page. It seems to be just that the preference does not do anything.
I was also hoping for [split=repeat] but that stops [after=\pagina] from doing anything. Thanks again -- Nigel
At 23:41 15/09/2003 +0100, you wrote:
Hans, Thank you again for your speedy response.
\bTABLE[split=yes] \bTR \bTD left \eTD\bTD right \eTD\eTR \bTR[after=\pagina] \bTD left \eTD\bTD right \eTD\eTR \bTR \bTD left \eTD\bTD right \eTD\eTR \bTR \bTD left \eTD\bTD right \eTD\eTR \bTR \bTD left \eTD\bTD right \eTD\eTR \bTR \bTD left \eTD\bTD right \eTD\eTR \eTABLE
i'll send you the adapted core-ntb in another mail Thanks received and installed
Hans \pagina seems to be synonymous with \page at least \page appears to have the same effect. I was hoping for [after={\page[bigpreference]}] but that does not appear to work. [after={\page[yes]}] does the same as \page. It seems to be just that the preference does not do anything.
I was also hoping for [split=repeat] but that stops [after=\pagina] from doing anything.
the next solution is quite ugly but seems to work; i wonder what happens in boundary cases \def\splittblbox#1% #1 <> 0/2 {\ifinsidefloat \unvbox#1% \else % spacing between rows gets lost in split \setbox4\vbox {\doifsomething\tbltbltussenwit{\blank[\tbltbltussenwit]}}% \setbox2\vbox {}% \dorecurse\noftblheadlines {\setbox0\vsplit#1 to \lineheight \setbox2\vbox{\unvcopy2\unvcopy0}}% \ifcase\noftblheadlines\else\unvcopy2\fi \donefalse \doloop {\setbox0\vsplit#1 to \lineheight \ifdim\pagegoal<\maxdimen \setbox0\vbox{\unvbox0}% \dimen0\ht0 \advance\dimen0\ht4 \advance\dimen0\pagetotal \ifdim\dimen0>\pagegoal \bgroup \pagina \egroup % make sure that local vars are kept \ifcase\noftblheadlines\else\unvcopy2\fi \fi \fi \ifdone \doifsomething\tbltbltussenwit{\blank[\tbltbltussenwit]}% \fi \unvbox0 % old solution: \allowbreak % start of forced break handling for Nigel King \bgroup \scratchcounter\recurselevel \advance\scratchcounter\noftblheadlines \setupTBLcell{\number\scratchcounter}1 \ifx\@@tblsplitafter\relax\else \scratchcounter\realpageno \@@tblsplitafter \ifnum\scratchcounter<\realpageno \ifcase\noftblheadlines\else\unvcopy2\fi \fi \else \allowbreak \fi \egroup % so far for the repeated head after forced break \ifvoid#1 \exitloop \else \donetrue \fi}% \fi} works ok for : % \bTABLE[split=repeat] % \bTABLEhead % \bTR \bTH lxxxeft \eTH\bTD right \eTD\eTR % \eTABLEhead % \bTABLEbody % \dorecurse{100}{\bTR[after={\pagina[bigpreference]}] \bTD left \eTD\bTD right \eTD\eTR} % \dorecurse{100}{\bTR\bTD left \eTD\bTD right \eTD\eTR} % \eTABLEbody % \eTABLE As said, an ugly, not so wel tested, patch Hans ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------
participants (4)
-
Hans Hagen
-
Nigel King
-
Thomas Schrader
-
Willi Egger