[NTG-context] splitting tables

Johannes Graumann johannes_graumann at web.de
Sat Jun 17 23:15:11 CEST 2006


Hello,

I'd like to explicitly thank Hans for these changes to the table splitting,
which is giving my thesis the last touches. 

Thanks you for your openness towards ConTeXt's users - even the more
obnoxiously insisting ones ;0)

Joh

Hans Hagen wrote:

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




More information about the ntg-context mailing list