ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* splitting tables
@ 2006-06-16 21:14 Hans Hagen
  2006-06-17 21:15 ` Johannes Graumann
  0 siblings, 1 reply; 3+ messages in thread
From: Hans Hagen @ 2006-06-16 21:14 UTC (permalink / raw)


Hi,

I will upload an alpha release with a cleaned up table (float) split 
mechanism. The splitter works for all three table types, either or not 
in floats with repeated head (and tail) sections, optionally with 
automatic (may become default) caption height detection etc. It works ok 
on some simple test files, but I have no time to test more obscure 
situations.

I'm not that sure if everything is downward compatible, but splitting is 
always tricky (and demanded some intervention) anyway. So, if you are 
using this kind of functionality, go ahead, download and test ..

\setupTABLE[split=repeat]

\input tufte \endgraf
\splitfloat[lines=11]
  {\placetable{\dorecurse{10}{test\recurselevel\endgraf}}}
  {\bTABLE\dorecurse{100}{\bTR \bTD test \eTD \eTR}\eTABLE}
\input tufte \page

\input tufte \endgraf
\splitfloat[lines=0]
  {}
  {\bTABLE\dorecurse{100}{\bTR \bTD test \eTD \eTR}\eTABLE}
\input tufte \endgraf \page

\input tufte \endgraf
\bTABLE\dorecurse{100}{\bTR \bTD test \eTD \eTR}\eTABLE
\input tufte \page

\setuptabulate[split=yes]

\input tufte \endgraf
\splitfloat[lines=11]
  {\placetable{\dorecurse{10}{test\recurselevel\endgraf}}}
  {\starttabulate\dorecurse{200}{\NC test \NC test \NC \NR}\stoptabulate}
\input tufte \page

\input tufte \endgraf
\splitfloat[lines=0]
  {}
  {\starttabulate\dorecurse{200}{\NC test \NC test \NC \NR}\stoptabulate}
\input tufte \page

\input tufte \endgraf
\starttabulate\dorecurse{200}{\NC test \NC test \NC \NR}\stoptabulate
\input tufte \page

\setuptables[split=yes]

\newtoks\TestToks

\TestToks\emptytoks
\appendtoks\starttablehead\to\TestToks
\dorecurse{3}{\appendtoks\VL head \VL head \VL \SR\to\TestToks}
\appendtoks\stoptablehead\to\TestToks
\appendtoks\starttabletail\to\TestToks
\dorecurse{3}{\appendtoks\VL tail \VL tail \VL \SR\to\TestToks}
\appendtoks\stoptabletail\to\TestToks
\appendtoks\starttables[|c|c|]\to\TestToks
\dorecurse{100}{\appendtoks\VL test \VL test \VL \SR\to\TestToks}
\appendtoks\stoptables\to\TestToks

\input tufte \endgraf
\splitfloat[lines=auto] % [lines=11]
  {\placetable{\dorecurse{10}{test\recurselevel\endgraf}}}
  {\the\TestToks}
\input tufte \page

\input tufte \endgraf
\splitfloat[lines=0]
  {}
  {\the\TestToks}
\input tufte \page

\input tufte \endgraf
\the\TestToks
\input tufte \page

Watch the lines=auto option! Mechanisms like this will never be perfect, 
but I think that the cleanup is not that bad. Especially the \startable 
bits and pieces needs some more testing, but then, i need to cleanup up 
that code anyway (write a cleaner version of that whole table mechanism).

Hans 

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-06-18 21:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-16 21:14 splitting tables Hans Hagen
2006-06-17 21:15 ` Johannes Graumann
2006-06-18 21:10   ` Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).