Re: [NTG-context] Re;Help TABLE

2010-12-10 Thread barney schwartz
Hans,
guess I didn't explain wel enough. Using Wolfgang's

TABLE module

\bTABLE
\bTABLEhead
\bTR
\bTH Group \eTH \bTH N \eTH \bTH MEAN \eTH \bTH STD \eTH \bTH MIN \eTH \bTH
MAX \eTH \bTH Gini \eTH \bTH 80/20 \eTH
\eTR
\eTABLEhead
\bTABLEbody
\bTR \bTC[nc=8] 1980 \eTC \eTR
.
..
.
lots and lots and lots or rows
.
...
.
\eTABLEbody
\bTABLEfoot
\bTR \bTC[nc=8]*\$=New Taiwan Dollars \eTC \eTR
\eTABLEfoot
\eTABLE\eTABLEbody
\bTABLEfoot
\bTR \bTC[nc=8]*\$=New Taiwan Dollars \eTC \eTR
\eTABLEfoot
\eTABLE


all works fine

but when I add:

\placetable[here][tab:five]{Descriptive Statistics for Salaried Men \
Women}
{


in order to get reference, caption I lose the split and so the tables just
runs OFF the end of the page

suggestions PLEASE

barney
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Re;Help TABLE

2010-12-10 Thread Philipp Gesang
Hi Barney,

On 2010-12-10 15:30:04, barney schwartz wrote:
 Hans,
 guess I didn't explain wel enough. Using Wolfgang's
 
 TABLE module
 
 \bTABLE
 \bTABLEhead
 \bTR
 \bTH Group \eTH \bTH N \eTH \bTH MEAN \eTH \bTH STD \eTH \bTH MIN \eTH \bTH
 MAX \eTH \bTH Gini \eTH \bTH 80/20 \eTH
 \eTR
 \eTABLEhead
 \bTABLEbody
 \bTR \bTC[nc=8] 1980 \eTC \eTR
 .
 ..
 .
 lots and lots and lots or rows

Fyi: context has a built-in way of saying “lots of”, it’s called
“\dorecurse”; have look at syst-aux.mkiv for loops c.

 .
 ...
 .
 \eTABLEbody
 \bTABLEfoot
 \bTR \bTC[nc=8]*\$=New Taiwan Dollars \eTC \eTR
 \eTABLEfoot
 \eTABLE\eTABLEbody
 \bTABLEfoot
 \bTR \bTC[nc=8]*\$=New Taiwan Dollars \eTC \eTR
 \eTABLEfoot
 \eTABLE
 
 
 all works fine
 
 but when I add:
 
 \placetable[here][tab:five]{Descriptive Statistics for Salaried Men \
 Women}
 {
 
 
 in order to get reference, caption I lose the split and so the tables just
 runs OFF the end of the page

Placetable takes an optional arg “split”:

···8

\startbuffer
\bTABLE[split=repeat]
\bTABLEhead
\bTR
\bTH Group \eTH \bTH N \eTH \bTH MEAN \eTH \bTH STD \eTH \bTH MIN \eTH \bTH
MAX \eTH \bTH Gini \eTH \bTH 80/20 \eTH
\eTR
\eTABLEhead
\bTABLEbody
\bTR \bTC[nc=8] 1980 \eTC \eTR
\dorecurse{100}{\bTR \dorecurse{8}{\bTC text \eTC} \eTR}
\eTABLEbody
\bTABLEfoot
\bTR \bTC[nc=8]*\$=New Taiwan Dollars \eTC \eTR
\eTABLEfoot
\eTABLE
\stopbuffer

\starttext
\placetable[here,split][tab:five]{Salary Stats}{\getbuffer}
\stoptext

···8

Regards, Philipp

PS: What table module are you referring to? This seems to be a
standard natural table.

 
 suggestions PLEASE
 
 barney

 ___
 If your question is of interest to others as well, please add an entry to the 
 Wiki!
 
 maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
 webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net
 ___


-- 
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments


pgpJZ2eWaj8Dd.pgp
Description: PGP signature
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Re; TABLE help

2010-12-10 Thread barney schwartz
Wolfgang, Phillip, Hans,

Thanks for the pointer to :

\placetable[here,*split*]

However I need this to be one table split across however many pages
required, so that I would have as example ...

page 1: table 1.1

page 2: table 1.1 (cont.)

page 3: table 1.1 (cont)

please see attached code.

\placetable[here,split][tab:five]{Descriptive Statistics for Salaried Men \
Women}
{%\setupTABLE[split=repeat]
\bTABLE
\bTABLEhead
\bTR
\bTH Group \eTH  \bTH N \eTH  \bTH MEAN \eTH\bTH STD \eTH \bTH MIN
\eTH\bTH MAX  \eTH  \bTH Gini  \eTH \bTH 80/20 \eTH
\eTR
\eTABLEhead
\bTABLEbody
\bTR \bTC[nc=8] 1980 \eTC \eTR
\bTR \bTC ALL \eTC \bTC 14202 \eTC \bTC \$195727.9 \eTC \bTC 912.89 \eTC
\bTC \$3600 \eTC \bTC  \$132 \eTC \bTC 0.278 \eTC \bTC 4.54 \eTC \eTR
\bTR \bTC Men \eTC \bTC 9852 \eTC \bTC \$224678.5 \eTC \bTC 1123.61 \eTC
\bTC  \$3600 \eTC \bTC  \$132 \eTC \bTC 0.242 \eTC \bTC  3.68 \eTC \eTR
\bTR \bTC Women \eTC \bTC 4350 \eTC \bTC \$130159.7 \eTC \bTC  991.05 \eTC
\bTC  \$5000 \eTC \bTC  \$448000 \eTC \bTC 0.259 \eTC \bTC   3.91 \eTC \eTR
\bTR \bTC[nc=8] 1982   \eTC \eTR
.
.
.
.
repeated by years
.
.
.
\bTR \bTC[nc=8]1999   \eTC \eTR
\bTR \bTC   ALL \eTC \bTC  XX \eTC \bTC \$362625.2 \eTC \bTC 1775.50
\eTC \bTC \$25247 \eTC \bTC \$1060 \eTC \bTC 0.269 \eTC \bTC  3.99 \eTC
\eTR
\bTR \bTC   Men \eTC  \bTC   8034 \eTC  \bTC \$419193.3 \eTC  \bTC 2614.59
\eTC \bTC \$25247 \eTC \bTC \$1060 \eTC \bTC 0.249 \eTC \bTC  3.63 \eTC
\eTR
\bTR \bTC  Women \eTC  \bTC   6101 \eTC \bTC \$288134.4 \eTC \bTC 1861.66
\eTC \bTC \$54000 \eTC \bTC  \$190 \eTC \bTC 0.249 \eTC \bTC 3.52 \eTC
\eTR
\eTABLEbody
\bTABLEfoot
\bTR \bTC[nc=8]*\$=New Taiwan Dollars \eTC \eTR
\eTABLEfoot
\eTABLE
}

full file is attached


barney


Chap5.tex
Description: TeX document
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] bug in TABLE when there is a complex head

2010-12-06 Thread Nigel King
Hi Developers,
Enclosed is a piece of code that demonstrates a bug in the NaturalTable 
environment when using a complex head in a multipage case. If you run the 
following code you will notice that not only does the head get repeated but 
also the first row of the body of the table. The cause appears to be [nr=2] in 
the head.

I am using
This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009) (format=cont-en 
2010.4.14)  6 DEC 2010 08:32
I do apologise if this is fixed in a later version. Thanks for a great program.

\bTABLE[split=repeat]
\bTABLEhead
\bTR
  \bTH[nr=2] head l\eTH
  \bTH head r\eTH
\eTR
\bTR
  \bTH head r\eTH
\eTR
\eTABLEhead
\bTABLEbody
\bTR\bTD first l\eTD\bTD first r\eTD\eTR
\dorecurse{50}{\bTR\bTD subsequent l\eTD\bTD subsequent r\eTD\eTR}
\eTABLEbody
\eTABLE

--
Nigel King



___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] bug in TABLE when there is a complex head

2010-12-06 Thread Hans Hagen

On 6-12-2010 9:39, Nigel King wrote:

Hi Developers,
Enclosed is a piece of code that demonstrates a bug in the NaturalTable 
environment when using a complex head in a multipage case. If you run the 
following code you will notice that not only does the head get repeated but 
also the first row of the body of the table. The cause appears to be [nr=2] in 
the head.

I am using
This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009) (format=cont-en 
2010.4.14)  6 DEC 2010 08:32
I do apologise if this is fixed in a later version. Thanks for a great program.

\bTABLE[split=repeat]
\bTABLEhead
\bTR
   \bTH[nr=2] head l\eTH
   \bTH head r\eTH
\eTR
\bTR
   \bTH head r\eTH
\eTR
\eTABLEhead
\bTABLEbody
\bTR\bTD first l\eTD\bTD first r\eTD\eTR
\dorecurse{50}{\bTR\bTD subsequent l\eTD\bTD subsequent r\eTD\eTR}
\eTABLEbody
\eTABLE


put this in cont-new.tex:

\unprotect

\def\endtblrow
  {\kern\dimexpr\tbltblrightmargindistance-\tbltblcolumndistance\relax
   \crcr
   \noalign
 {\nointerlineskip
  \ifnum\tblrow\noftblheadlines
\ifnum\gettblnob\tblrow=\zerocount
  \allowbreak
\fi
  \else
\allowbreak % else no proper head split off
  \fi
  \bgroup % protect local vars
\@@tblsplitafter
  \egroup
  \bgroup % protect local vars
\scratchcounter\numexpr\tblrow+\plusone\relax
\ifnum\scratchcounter\noftblhdnxlines\relax
  \ifnum\scratchcounter\maximumrow\relax

\doifsomething\tbltblspaceinbetween{\blank[\tbltblspaceinbetween]}%
  \fi
\fi
  \egroup}}

\protect

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] bug in TABLE when there is a complex head

2010-12-06 Thread Nigel King
Hans,
Thanks very much. That works perfectly.
Nigel




From: Hans Hagen pra...@wxs.nl
To: mailing list for ConTeXt users ntg-context@ntg.nl
Cc: Nigel King ni...@nigelking.me.uk
Sent: Monday, 6 December, 2010 13:13:39
Subject: Re: [NTG-context] bug in TABLE when there is a complex head

On 6-12-2010 9:39, Nigel King wrote:
 Hi Developers,
 Enclosed is a piece of code that demonstrates a bug in the NaturalTable 
environment when using a complex head in a multipage case. If you run the 
following code you will notice that not only does the head get repeated but 
also 
the first row of the body of the table. The cause appears to be [nr=2] in the 
head.
 
 I am using
 This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009) (format=cont-en 
2010.4.14)  6 DEC 2010 08:32
 I do apologise if this is fixed in a later version. Thanks for a great 
program.
 
 \bTABLE[split=repeat]
 \bTABLEhead
 \bTR
\bTH[nr=2] head l\eTH
\bTH head r\eTH
 \eTR
 \bTR
\bTH head r\eTH
 \eTR
 \eTABLEhead
 \bTABLEbody
 \bTR\bTD first l\eTD\bTD first r\eTD\eTR
 \dorecurse{50}{\bTR\bTD subsequent l\eTD\bTD subsequent r\eTD\eTR}
 \eTABLEbody
 \eTABLE

put this in cont-new.tex:

\unprotect

\def\endtblrow
  {\kern\dimexpr\tbltblrightmargindistance-\tbltblcolumndistance\relax
   \crcr
   \noalign
 {\nointerlineskip
  \ifnum\tblrow\noftblheadlines
\ifnum\gettblnob\tblrow=\zerocount
  \allowbreak
\fi
  \else
\allowbreak % else no proper head split off
  \fi
  \bgroup % protect local vars
\@@tblsplitafter
  \egroup
  \bgroup % protect local vars
\scratchcounter\numexpr\tblrow+\plusone\relax
\ifnum\scratchcounter\noftblhdnxlines\relax
  \ifnum\scratchcounter\maximumrow\relax

\doifsomething\tbltblspaceinbetween{\blank[\tbltblspaceinbetween]}%
  \fi
\fi
  \egroup}}

\protect

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] table background color in first row

2010-11-11 Thread Wolfgang Schuster

Am 11.11.2010 um 19:44 schrieb Manfred Lotz:

 Hi there,
 
 I have s simple table like this:
 
 \starttext
 
 \starttable[|l|l|]
 \NC \bf Colheader 1 \NC \bf Colheader 2 \NC \SR \HL 
 \NC cell 11 \NC cell 12 \NC \FR
 \NC cell 11 \NC cell 12 \NC \LR
 \stoptable
 
 \stoptext  
 
 and like to have a light gray background for the heading row. 
 
 I found documentation about \setupTABLE which on the one hand I did not
 fully understand how to use and on the other hand I'm not quite sure
 how far this is the way it is done nowadays.

The \setupTABLE command for the natural tables environment, you can find
a overview of the different environments on the wiki.

Here is a example for a natural table:

\starttext

\setupTABLE[header][style=bold,background=color,backgroundcolor=gray]

\bTABLE
  \bTABLEhead
\bTR
  \bTD Colheader 1 \eTD
  \bTD Colheader 2 \eTD
\eTR
  \eTBALEhead
  \bTABLEbody
\bTR
  \bTD cell 11 \eTD
  \bTD cell 12 \eTD
\eTR
\bTR
  \bTD cell 21 \eTD
  \bTD cell 22 \eTD
\eTR
  \eTABLEbody
\eTABLE

\stoptext

Wolfgang
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] table background color in first row

2010-11-11 Thread Manfred Lotz
Hi Wolfgang,

On Thu, 11 Nov 2010 20:13:22 +0100
Wolfgang Schuster schuster.wolfg...@googlemail.com wrote:

 
 Am 11.11.2010 um 19:44 schrieb Manfred Lotz:
 
  Hi there,
  
  I have s simple table like this:
  
  \starttext
  
  \starttable[|l|l|]
  \NC \bf Colheader 1 \NC \bf Colheader 2 \NC \SR \HL 
  \NC cell 11 \NC cell 12 \NC \FR
  \NC cell 11 \NC cell 12 \NC \LR
  \stoptable
  
  \stoptext  
  
  and like to have a light gray background for the heading row. 
  
  I found documentation about \setupTABLE which on the one hand I did
  not fully understand how to use and on the other hand I'm not quite
  sure how far this is the way it is done nowadays.
 
 The \setupTABLE command for the natural tables environment, you can
 find a overview of the different environments on the wiki.
 
 Here is a example for a natural table:
 
 \starttext
 
 \setupTABLE[header][style=bold,background=color,backgroundcolor=gray]
 
 \bTABLE
   \bTABLEhead
 \bTR
   \bTD Colheader 1 \eTD
   \bTD Colheader 2 \eTD
 \eTR
   \eTBALEhead
   \bTABLEbody
 \bTR
   \bTD cell 11 \eTD
   \bTD cell 12 \eTD
 \eTR
 \bTR
   \bTD cell 21 \eTD
   \bTD cell 22 \eTD
 \eTR
   \eTABLEbody
 \eTABLE
 
 \stoptext
 

Thanks for your example which works fine but raises some more questions:

1. Your example creates borders around each cell which I don't want to
have. Any way to get rid of them?


2. It seems to me that \setupTABLE creates a shading for the header for 
all tables in a document?! That is ok. 

However, I'd like to know what would be the variant to have it only for
a single table?


3. How does this \bTABLE stuff compare to the \starttable stuff? Are
these just different methods to create tables which are both in use
these days in context or is one method to be preferred over the other? 



-- 
Thanks,
Manfred



___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] table background color in first row

2010-11-11 Thread Herbert Voss
Am 11.11.2010 20:13, schrieb Wolfgang Schuster:

 The \setupTABLE command for the natural tables environment, you can find
 a overview of the different environments on the wiki.
 
 Here is a example for a natural table:
 
 \starttext
 
 \setupTABLE[header][style=bold,background=color,backgroundcolor=gray]
 
 \bTABLE
   \bTABLEhead
 \bTR
   \bTD Colheader 1 \eTD
   \bTD Colheader 2 \eTD
 \eTR
   \eTBALEhead

with current minimal mkiv I get:

(/opt/context/tex/texmf-context/tex/context/base/bxml-apa.mkiv)
systems : begin file latex5.tex at line 3
)
Runaway argument?
\bTR \bTD Colheader 1 \eTD \bTD Colheader 2 \eTD \eTR \eTBALEhead
\bTABLEbody \ETC.
! File ended while scanning use of \doTABLEhead.

system   error on line 0 in file : File ended while scanning
use of \doTABLEhead ...

empty file

inserted text
\par
* ./latex5.tex

?


Herbert
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] table background color in first row

2010-11-11 Thread Hans Hagen

On 11-11-2010 8:42, Herbert Voss wrote:

Am 11.11.2010 20:13, schrieb Wolfgang Schuster:


The \setupTABLE command for the natural tables environment, you can find
a overview of the different environments on the wiki.

Here is a example for a natural table:

\starttext

\setupTABLE[header][style=bold,background=color,backgroundcolor=gray]

\bTABLE
   \bTABLEhead
 \bTR
   \bTD Colheader 1 \eTD
   \bTD Colheader 2 \eTD
 \eTR
   \eTBALEhead


with current minimal mkiv I get:

(/opt/context/tex/texmf-context/tex/context/base/bxml-apa.mkiv)
systems : begin file latex5.tex at line 3
)
Runaway argument?
\bTR \bTD Colheader 1 \eTD \bTD Colheader 2 \eTD \eTR \eTBALEhead


typo: \eTBALEhead - \eTABLEhead

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] table background color in first row

2010-11-11 Thread Herbert Voss
Am 11.11.2010 20:45, schrieb Hans Hagen:
 On 11-11-2010 8:42, Herbert Voss wrote:
 Am 11.11.2010 20:13, schrieb Wolfgang Schuster:

 The \setupTABLE command for the natural tables environment, you can find
 a overview of the different environments on the wiki.

 Here is a example for a natural table:

 \starttext

 \setupTABLE[header][style=bold,background=color,backgroundcolor=gray]

 \bTABLE
\bTABLEhead
  \bTR
\bTD Colheader 1 \eTD
\bTD Colheader 2 \eTD
  \eTR
\eTBALEhead

 Runaway argument?
 \bTR \bTD Colheader 1 \eTD \bTD Colheader 2 \eTD \eTR \eTBALEhead
 
 typo: \eTBALEhead - \eTABLEhead

uuh, should have seen it myself ...

Herbert
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] table background color in first row

2010-11-11 Thread Herbert Voss
Am 11.11.2010 20:40, schrieb Manfred Lotz:

 \starttext

 \setupTABLE[header][style=bold,background=color,backgroundcolor=gray]

 \bTABLE
   \bTABLEhead
 \bTR
   \bTD Colheader 1 \eTD
   \bTD Colheader 2 \eTD
 \eTR
   \eTBALEhead
   \bTABLEbody
 \bTR
   \bTD cell 11 \eTD
   \bTD cell 12 \eTD
 \eTR
 \bTR
   \bTD cell 21 \eTD
   \bTD cell 22 \eTD
 \eTR
   \eTABLEbody
 \eTABLE

 \stoptext

 
 Thanks for your example which works fine but raises some more questions:
 
 1. Your example creates borders around each cell which I don't want to
 have. Any way to get rid of them?

\bTABLE[frame=off]

Herbert
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] XML ConTeXt

2010-11-02 Thread Daniel Grycman
Hi Wolfgang and list,

I already used this multipage table. But the result showed a header for
every entry of   the xml-source. Is there an option which I missed?

\startxmlsetups xml:personen:person % associate setups with elements
\bTABLE[split=yes,width=11em]
\setupTABLE[row][*][width=\textwidth]
\bTABLEhead
\bTR \bTH Name \eTH \bTH Vorname \eTH \bTH Email-Adresse \eTH \bTH Raum
\eTH \bTH Telefon \eTH \eTR
\eTABLEhead
\bTABLEbody
\bTR \bTD \xmltext{#1}{/Titel} \xmltext{#1}{/Name}  \eTD \bTD
\xmltext{#1}{/Vorname} \eTD \bTD \xmltext{#1}{/Mail} \eTD \bTD
\xmltext{#1}{/Raum} \eTD \bTD \xmltext{#1}{/Telefon} \eTD \eTR
\eTABLEbody
\eTABLE
\stopxmlsetups



Daniel

Am 02.11.10 22:38 schrieb Wolfgang Schuster unter
schuster.wolfg...@googlemail.com:


Am 02.11.2010 um 22:17 schrieb Daniel Grycman:


Hi Jano and list,

it works so far. But how can I set up a tablehead for the whole table?





http://wiki.contextgarden.net/TABLE#Multipage_TABLEs

Wolfgang

__
_
If your question is of interest to others as well, please add an entry to
the Wiki!

maillist : ntg-context@ntg.nl /
http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
__
_


___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] XML ConTeXt

2010-11-02 Thread Aditya Mahajan
A side remark: Try to indent your context code so that it is easier to read
(just like you indent xml). For example (adding | so that the email client 
does not reformt it)

| \startxmlsetups xml:personen:person % associate setups with elements
|   \bTABLE[split=yes,width=11em]
| \setupTABLE[row][*][width=\textwidth]
| \bTABLEhead
|   \bTR 
| \bTH Name  \eTH 
| \bTH Vorname   \eTH 
| \bTH Email-Adresse \eTH 
| \bTH Raum  \eTH 
| \bTH Telefon   \eTH
|   \eTR
| \eTABLEhead
| \bTABLEbody
|   \bTR 
| \bTD \xmltext{#1}{/Titel} \xmltext{#1}{/Name}   \eTD 
| \bTD \xmltext{#1}{/Vorname} \eTD 
| \bTD \xmltext{#1}{/Mail}\eTD 
| \bTD \xmltext{#1}{/Raum}\eTD 
| \bTD \xmltext{#1}{/Telefon} \eTD 
|   \eTR
| \eTABLEbody
|   \eTABLE
| \stopxmlsetups

This makes it much easier to see what is going on.

Aditya
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] XML ConTeXt

2010-11-02 Thread Jano Kula

On 11/02/2010 10:59 PM, Daniel Grycman wrote:

Hi Wolfgang and list,

I already used this multipage table. But the result showed a header for
every entry of   the xml-source. Is there an option which I missed?


No option, you want to set up the header only once, hence you need to 
typeset it in the parent element of multiple person elements, here 
personal.


\startxmlsetups xml:personen:personal
\title{Personalverzeichnis}
\placelist[chapter]
\page
 % open table
 \bTABLE[split=yes,width=11em]
 \setupTABLE[row][*][width=\textwidth]
 \bTABLEhead
 \bTR \bTH Name \eTH \bTH Vorname \eTH \bTH Email-Adresse \eTH \bTH Raum
 \eTH \bTH Telefon \eTH \eTR
 \eTABLEhead
 \bTABLEbody
% and now deeper to multiple persons (rows)
\xmlflush{#1}
 % close table
 \eTABLEbody
 \eTABLE
\stopxmlsetups

\startxmlsetups xml:personen:person
  % here every person generates one row
  \bTR \bTD \xmltext{#1}{/Titel} \xmltext{#1}{/Name}  \eTD \bTD
  \xmltext{#1}{/Vorname} \eTD \bTD \xmltext{#1}{/Mail} \eTD \bTD
  \xmltext{#1}{/Raum} \eTD \bTD \xmltext{#1}{/Telefon} \eTD \eTR
\stopxmlsetups

Jano


\startxmlsetups xml:personen:person % associate setups with elements
\bTABLE[split=yes,width=11em]
\setupTABLE[row][*][width=\textwidth]
\bTABLEhead
\bTR \bTH Name \eTH \bTH Vorname \eTH \bTH Email-Adresse \eTH \bTH Raum
\eTH \bTH Telefon \eTH \eTR
\eTABLEhead
\bTABLEbody
\bTR \bTD \xmltext{#1}{/Titel} \xmltext{#1}{/Name}  \eTD \bTD
\xmltext{#1}{/Vorname} \eTD \bTD \xmltext{#1}{/Mail} \eTD \bTD
\xmltext{#1}{/Raum} \eTD \bTD \xmltext{#1}{/Telefon} \eTD \eTR
\eTABLEbody
\eTABLE
\stopxmlsetups



Daniel

Am 02.11.10 22:38 schrieb Wolfgang Schuster unter
schuster.wolfg...@googlemail.com:



Am 02.11.2010 um 22:17 schrieb Daniel Grycman:


Hi Jano and list,

it works so far. But how can I set up a tablehead for the whole table?





http://wiki.contextgarden.net/TABLE#Multipage_TABLEs

Wolfgang

__
_
If your question is of interest to others as well, please add an entry to
the Wiki!

maillist : ntg-context@ntg.nl /
http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
__
_



___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___




___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] natural tables -- split 'n grid

2010-09-12 Thread Hans Hagen

On 11-9-2010 6:03, Philipp Gesang wrote:

Hi,

line correction leads to unwanted vertical spacing in split
natural tables. Example (in both MkII and MkIV):

··8·
%\setuplayout[grid=yes] % not required to reproduce it
\starttext
\dorecurse{4}{\input knuth\par}
\startlinecorrection% fine without line correction
\bTABLE[split=yes]  % fine with split=no
\bTABLEhead
\bTR\bTH p\eTH\bTH q\eTH\bTH p or q\eTH\eTR
\eTABLEhead
\bTABLEbody
\bTR\bTC False\eTC\bTC False\eTC\bTC False\eTC\eTR
\bTR\bTC True\eTC\bTC False\eTC\bTC True\eTC\eTR
\bTR\bTC False\eTC\bTC True\eTC\bTC True\eTC\eTR
\bTR\bTC True\eTC\bTC True\eTC\bTC True\eTC\eTR
\eTABLEbody
\eTABLE
\stoplinecorrection
\stoptext
··8·

What am I missing here? Is line correction even recommended for
use with tables? Why isn't it ignored if grid typesetting is
switched off? Thanks in advance,


that you should not use linecorrection with split


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] natural tables -- split 'n grid

2010-09-11 Thread Philipp Gesang
Hi,

line correction leads to unwanted vertical spacing in split
natural tables. Example (in both MkII and MkIV):

··8·
%\setuplayout[grid=yes] % not required to reproduce it
\starttext
\dorecurse{4}{\input knuth\par}
\startlinecorrection% fine without line correction
\bTABLE[split=yes]  % fine with split=no
\bTABLEhead
\bTR\bTH p\eTH\bTH q\eTH\bTH p or q\eTH\eTR
\eTABLEhead
\bTABLEbody
\bTR\bTC False\eTC\bTC False\eTC\bTC False\eTC\eTR
\bTR\bTC True\eTC\bTC False\eTC\bTC True\eTC\eTR
\bTR\bTC False\eTC\bTC True\eTC\bTC True\eTC\eTR
\bTR\bTC True\eTC\bTC True\eTC\bTC True\eTC\eTR
\eTABLEbody
\eTABLE
\stoplinecorrection
\stoptext
··8·

What am I missing here? Is line correction even recommended for
use with tables? Why isn't it ignored if grid typesetting is
switched off? Thanks in advance,

Philipp

-- 
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments


pgppUVXhT9VuC.pgp
Description: PGP signature
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Split Table Numbering

2010-01-29 Thread Tad Ashlock
Hi All,

How do I go about getting split tables to be numbered as, for example,
1.3a and 1.3b, instead of 1.3 and 1.4?  I'm using bychapter
numbering.

Example (also attached as tadtest3.tex):


\setupcaption[table][way=bychapter]

\starttext

\chapter{Chapter Name}

\dorecurse{3}{\input knuth\par}

\placetable[split]{Table Caption}%
{ \bTABLE[split=repeat]%
  \bTABLEhead
  \bTR\bTH Table Header \eTH\eTR
  \eTABLEhead
  \bTABLEbody
  \dorecurse{10}{\bTR\bTD table row \eTD\eTR}
  \eTABLEbody
  \eTABLE}

\stoptext


The problem with the current numbering scheme is that it doesn't
indicate that a single, split table is different than two separate
tables.

Another problem is that the tables end up getting numbered differently
for different output formats (e.g. print vs. screen).  So for
instance, you can't refer to table 4.7 in an e-mail, because you
might be looking at the presentation version of the document, but
others might be looking at the printed version.

Thanks,
Tad


tadtest3.tex
Description: TeX document
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Natural tables with \placetable

2009-04-17 Thread Design Department
Can anyone tell me why this table example is placed on the left margin
on the first page and the right margin on subsequent pages?
My intention is to place against the right margin on all pages.

\starttext
\placetable[right, 4*line, split]
  {none}
  {\bTABLE[split=repeat,option=stretch, textwidth=3in]
\bTABLEhead[rulethickness=1pt]
  \bTR
 \bTH[align={middle}] head \eTH
  \eTR
\eTABLEhead
\bTABLEbody
\dorecurse{6}{
  \bTR
\bTD
  {\input knuth \par}
\eTD
  \eTR
}
\eTABLEbody
\bTABLEfoot
  \bTR
\bTH footer  \eTH
  \eTR
\eTABLEfoot
  \eTABLE}
\stoptext


-- 
david
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Natural tables header

2008-11-19 Thread Horacio Suarez

Hello all:

I have a 5 pages tables at 5 points with a repeating header and also some 
nc=2 and nr=2 in header.

But when de table font is below 6 points there is a gap between the header and 
the body; and when there is some nr= in the header, the first row of the body 
repeats on every page. 

The code below shows it. Thankyou in advance for some advices.

\setuppapersize[A5][A5]

%%
\starttext

\setupcolors[state=start]

This table at 5 points. Below 6 points there is a gap between the header and 
the body; and the first row of the body repeats in every page.

\bTABLE[split=repeat]\switchtobodyfont[5pt]
\bTABLEhead
\bTR
\bTH[nr=2] 1\eTH
\bTH[nr=2] 2\eTH
\bTH[nc=2] 3\eTH
\eTR
\bTR
\bTH 3a\eTH
\bTH 3b\eTH
\eTR
\eTABLEhead
\bTABLEbody
\bTR[color=red]
\bTD body\eTD
\bTD first\eTD
\bTD row\eTD
\bTD Should not repeat every page\eTD
\eTR
\dorecurse{55}{\bTR\bTD[nc=4]the first row is repeating on every page\eTD\eTR}
\eTABLEbody
\eTABLE

\blank[12pt]

This table at 12 points. The gap is gone but still the first row of the body 
repeats in every page.

\bTABLE[split=repeat]\switchtobodyfont[12pt]
\bTABLEhead
\bTR
\bTH[nr=2] 1\eTH
\bTH[nr=2] 2\eTH
\bTH[nc=2] 3\eTH
\eTR
\bTR
\bTH 3a\eTH
\bTH 3b\eTH
\eTR
\eTABLEhead
\bTABLEbody
\bTR[color=red]
\bTD body\eTD
\bTD first\eTD
\bTD row\eTD
\bTD Should not repeat every page\eTD
\eTR
\dorecurse{25}{\bTR\bTD[nc=4]the first row is repeating on every page\eTD\eTR}
\eTABLEbody
\eTABLE

\blank[12pt]

In this table at 12 points and without nr=2 in the header, the repeating header 
is ok,

\bTABLE[split=repeat]\switchtobodyfont[12pt]
\bTABLEhead
\bTR
\bTH 1\eTH
\bTH 2\eTH
\bTH 3\eTH
\eTR
\bTR
\bTH 1a\eTH
\bTH 2a\eTH
\bTH 3a\eTH
\eTR
\eTABLEhead
\bTABLEbody
\bTR[color=red]
\bTD body\eTD
\bTD first\eTD
\bTD row\eTD
\eTR
\dorecurse{6}{\bTR\bTD[nc=3]the first row is ok\eTD\eTR}
\eTABLEbody
\eTABLE

\stoptext
%

_
News, entertainment and everything you care about at Live.com. Get it now!
http://www.live.com/getstarted.aspx___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Context TeXLive 2008

2008-09-26 Thread Brian R. Landy
Hi, I wanted to share some observations from enabling the latest MkIV  
code (2008.09.24, compiled luatex from svn just now) to run on a new  
installation of TeXLive 2008 on 64bit Linux.  This is my first time  
trying MkIV.


First -- a comment on installing using TeXLive 2008, which hopefully  
is helpful to others.  In my installation I noticed that  
x86-64/bin/luatools was symlinked to  
texmf-dist/scripts/context/stubs/unix/luatools.  The rsync update  
process as outlined on garden does not update this file; it updates  
texmf-dist/scripts/context/lua/luatools.lua.  So this needs to be  
copied (or linked) over to make the update work.  The same issues  
exists with mtxrun.  The symptom was a broken context --make.


Now, on to my issues.  I am listing anything that used to work in my  
TeXLive 2007 installation of MkII but fails in 2008 (MkII or MkIV).   
Items 1-3 were tested on garden as well to ensure it was not an issue  
in my setup --


1. \placefloat[here]{none} fails.  \placegraphic works instead.  This  
works on MkII.  See test_placefloat.tex.


2. MkIV fails due to the \startcolor...\stopcolor sequence embedded in  
a natural table (see test_color.tex).  A working alternative is  
commented in that file.


3. MkIV will not typeset the file test.tex.  It is due to using  
{style=\switchtobodyfont[tt]} in the table setup.  Using [modern,tt]  
works fine, but this is not necessary with MkII.


4. This is a MkII issue (or maybe it is a pdftex problem?)  MkII on  
2007, texexec --dvi on 2008, and MkIV all work.  The problem is with  
pulling in an external figure like this --


\externalfigure[/tmp/testfigure]

The files /tmp/testfigure.eps and /tmp/testfigure.pdf exist.  This  
should use the full path to find the file, and will pick the eps when  
creating dvi and the pdf when creating pdf's.  As mentioned, this  
works with every combination I tested except 2008 MkII.  Some (not  
very usable for me) workarounds are --


- use the filename without the path and add the path using  
\setupexternalfigures[directory=]
- specify the .pdf extension (means I cannot typeset to dvi if I want  
to; I find this useful for previewing with xdvi's auto-reload)

- use \setupexternalfigures[directory=/] and use a relative path

5. Just a comment on performance -- I noticed that using MkIV on a  
complicated document I have took 23 minutes vs. 12 minutes with MkII.   
I didn't know if MkIV is expected to be slower/comparable/faster at  
this stage.


Anyway, I hope this is useful to other users and to the developers.

Best Regards,
Brian\starttext
\placefloat[here]{none}{test}
\stoptext
\usetypescript[modern][ec]
\setupcolors[state=start]%
\definecolor[clear][y=1,t=0,a=1]%
\setupbodyfont[modern,10pt]
\starttext%
\start%
\setupTABLE[1][1,2,3][aligncharacter=yes,alignmentcharacter={/}]%
\bTABLE%
\bTABLEbody
\bTR%
\bTD{4 \startcolor[clear] 0/8\stopcolor}\eTD%
% the below line works
%\bTD{9 \color[clear] 0/8}\eTD%
\eTR%
\bTR%
\bTD{9 1/8}\eTD%
\eTR%
\bTR%
\bTD{9 1/4}\eTD%
\eTR%
\eTABLEbody%
\eTABLE%
\stop%
\stoptext%
\setupbodyfont[7pt]%
\starttext%
\bTABLE[left=\setupinterlinespace,strut=yes,autostrut=no,frame=off,headstyle=bold,align={middle,lohi},alignmentcharacter={.},aligncharacter=yes,background=color,backgroundcolor=screen,option=stretch,aligncharacter=no,style={\switchtobodyfont[tt]},frame=off]%
\chardef\characteralignmentmode=2%
\bTABLEhead%
\bTR%
\bTH[nc=22]{\setupinterlinespace\strut}{\strut}\eTH%
\eTR%
\bTR%
\bTH[]{\setupinterlinespace\strut}{}\eTH%
\bTH[]{\setupinterlinespace\strut}{}\eTH%
\bTH[]{\setupinterlinespace\strut}{}\eTH%
\bTH[]{\setupinterlinespace\strut}{}\eTH%
\bTH[]{\setupinterlinespace\strut}{}\eTH%
\bTH[]{\setupinterlinespace\strut}{}\eTH%
\bTH[]{\setupinterlinespace\strut}{}\eTH%
\bTH[]{\setupinterlinespace\strut}{}\eTH%
\bTH[]{\setupinterlinespace\strut}{Price}\eTH%
\bTH[nc=2]{\setupinterlinespace\strut}{\Delta Price}\eTH%
\bTH[]{\setupinterlinespace\strut}{Yield}\eTH%
\bTH[nc=2]{\setupinterlinespace\strut}{\Delta Yield (bps)}\eTH%
\bTH[nc=5]{\setupinterlinespace\strut}{Historical Levels}\eTH%
\bTH[nc=3]{\setupinterlinespace\strut}{Average}\eTH%
\eTR%
\bTR%
\bTH[]{\setupinterlinespace\strut}{Term}\eTH%
\bTH[]{\setupinterlinespace\strut}{Cpn}\eTH%
\bTH[]{\setupinterlinespace\strut}{Mat}\eTH%
\bTH[]{\setupinterlinespace\strut}{Dur}\eTH%
\bTH[]{\setupinterlinespace\strut}{\$ Dur}\eTH%
\bTH[]{\setupinterlinespace\strut}{\#}\eTH%
\bTH[]{\setupinterlinespace\strut}{*}\eTH%
\bTH[]{\setupinterlinespace\strut}{Cx}\eTH%
\bTH[]{\setupinterlinespace\strut}{9/10}\eTH%
\bTH[]{\setupinterlinespace\strut}{1d}\eTH%
\bTH[]{\setupinterlinespace\strut}{5d}\eTH%
\bTH[]{\setupinterlinespace\strut}{9/10}\eTH%
\bTH[]{\setupinterlinespace\strut}{1d}\eTH%
\bTH[]{\setupinterlinespace\strut}{5d}\eTH%
\bTH[]{\setupinterlinespace\strut}{9/9}\eTH%
\bTH[]{\setupinterlinespace\strut}{9/8}\eTH%
\bTH[]{\setupinterlinespace\strut}{9/5}\eTH%
\bTH[]{\setupinterlinespace\strut}{9/4}\eTH%
\bTH[]{\setupinterlinespace

[NTG-context] feature request: TABLEs in columns

2008-05-12 Thread Peter Münster
Hello,

It would be very nice, if one could put splitted TABLEs in columns (or
column-sets) without restrictions:

text before columns
\startcolumns[n=X]
  some text spanning 1 or more columns, 1 or more pages
  \bTABLE[split=repeat]
\bTABLEhead \bTR \bTH Head \eTH \eTABLEhead
\bTABLEbody
  some table lines spanning 1 or more columns, 1 or more pages
\eTABLEbody
  \eTABLE
  some text spanning 1 or more columns, 1 or more pages
  perhaps some more TABLEs and text...
\stopcolumns
text after columns

Cheers, Peter

-- 
http://pmrb.free.fr/contact/

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] feature request: TABLEs in columns

2008-05-12 Thread Hans Hagen
Peter Münster wrote:
 Hello,
 
 It would be very nice, if one could put splitted TABLEs in columns (or
 column-sets) without restrictions:
 
 text before columns
 \startcolumns[n=X]
   some text spanning 1 or more columns, 1 or more pages
   \bTABLE[split=repeat]
 \bTABLEhead \bTR \bTH Head \eTH \eTABLEhead
 \bTABLEbody
   some table lines spanning 1 or more columns, 1 or more pages
 \eTABLEbody
   \eTABLE
   some text spanning 1 or more columns, 1 or more pages
   perhaps some more TABLEs and text...
 \stopcolumns
 text after columns

too complex now; maybe someday i will provide a lua based splitter


-
   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
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Natural Tables, backgroundcolor, and frames

2008-05-05 Thread Wolfgang Schuster
On Sun, May 4, 2008 at 11:22 PM, Brian R. Landy [EMAIL PROTECTED] wrote:
 Hi,

 I actually posted this last summer, but never got a reply and did not
 have a chance to follow up.  When using natural tables, a cell with
 backgroundcolor enabled will overwrite the topframe/rightframe from
 the cell to the left/above.  A workaround could be to always use
 topframe/leftframe.  However this workaround is not possible with
 tables with split=repeat that span multiple pages, since you cannot
 know which rows on pages beyond the first for which you should set
 topframe=on.

 The below code demonstrates the problem for color w/ bottomframe
 specified for the header --

 \setupcolors[state=start]
 \definecolor[ice][r=0.867, g=0.945, b=0.973, s=0.9]

\startuseMPgraphic{headerrule}
linecap := butt ;
draw (-1.5*\the\linewidth,0)--(OverlayWidth+1.5*\the\linewidth,0) ;
setbounds currentpicture to unitsquare xyscaled (OverlayWidth,OverlayHeight) ;
\stopuseMPgraphic

\defineoverlay[headerrule][\useMPgraphic{headerrule}]

 \starttext
 \bTABLE[split=repeat,frame=off,background=color]
 \bTABLEhead
 \bTR[bottomframe=on]

\bTR[background=headerrule,backgroundoffset=-\linewidth]

 \bTH A \eTH \bTH B \eTH
 \eTR
 \eTABLEhead
 \bTABLEbody
 \dorecurse{25}{\bTR[backgroundcolor=ice] \bTD a \eTD \bTD b \eTD \eTR
 \bTR \bTD a \eTD \bTD b \eTD \eTR}
 eTABLEbody
 \eTABLE
 \stoptext

 I tested this at http://live.contextgarden.net.  Does anyone have a
 solution?  One thought I had was to insert a very thin row  (with
 height set to rulethickness) at the bottom of the header, but with
 split=repeat it appears that the table forces a minimum height to a
 row, so it is too tall.

Wolfgang
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Natural Tables, backgroundcolor, and frames

2008-05-05 Thread Brian R . Landy
Hi,

I actually posted this last summer, but never got a reply and did not  
have a chance to follow up.  When using natural tables, a cell with  
backgroundcolor enabled will overwrite the topframe/rightframe from  
the cell to the left/above.  A workaround could be to always use  
topframe/leftframe.  However this workaround is not possible with  
tables with split=repeat that span multiple pages, since you cannot  
know which rows on pages beyond the first for which you should set  
topframe=on.

The below code demonstrates the problem for color w/ bottomframe  
specified for the header --

\setupcolors[state=start]
\definecolor[ice][r=0.867, g=0.945, b=0.973, s=0.9]
\starttext
\bTABLE[split=repeat,frame=off,background=color]
\bTABLEhead
\bTR[bottomframe=on]
\bTH A \eTH \bTH B \eTH
\eTR
\eTABLEhead
\bTABLEbody
\dorecurse{25}{\bTR[backgroundcolor=ice] \bTD a \eTD \bTD b \eTD \eTR  
\bTR \bTD a \eTD \bTD b \eTD \eTR}
eTABLEbody
\eTABLE
\stoptext

I tested this at http://live.contextgarden.net.  Does anyone have a  
solution?  One thought I had was to insert a very thin row  (with  
height set to rulethickness) at the bottom of the header, but with  
split=repeat it appears that the table forces a minimum height to a  
row, so it is too tall.

Thanks,
Brian
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] how to supress headers

2008-03-26 Thread Peter Rolf
://www.pragma-ade.nl / http://tex.aanhet.net
   archive : https://foundry.supelec.fr/projects/contextrev/
   wiki : http://contextgarden.net
   
___

 
  
___
  If your question is of interest to others as well, please add an 
entry to the Wiki!

 
  maillist : ntg-context@ntg.nl / 
http://www.ntg.nl/mailman/listinfo/ntg-context

  webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
  archive : https://foundry.supelec.fr/projects/contextrev/
  wiki : http://contextgarden.net
  
___



Discover the new Windows Vista Learn more! 
http://search.msn.com/results.aspx?q=windows+vistamkt=en-USform=QBRE





___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


\setuppagenumbering[alternative=doublesided]

\setuphead[title][header=empty]
\setuppagenumbering[location=] % thanks to Wolfgang :)

\setupfootertexts[\setups{texta}][][][\setups{textb}]
\startsetups[texta]
{\tfx\ss Editorial Antropofagia - www.eantropofagia.com.ar - [EMAIL PROTECTED] 
\hfill {\bf Página \pagenumber}}
\stopsetups

\startsetups[textb]
{\tfx\ss{\bf Página \pagenumber}\hfill Editorial Antropofagia - 
www.eantropofagia.com.ar - [EMAIL PROTECTED]
\stopsetups

\starttext

\title Un título cualquiera

\dorecurse{4}{\input tufte}


\bTABLE

\bTABLEhead
\bTR
  \bTH Un título cualquiera \eTH
\eTR
\eTABLEhead


\bTABLEbody

\bTR \bTD \dorecurse{4}{\input tufte}\eTD \eTR

\eTABLEbody


\eTABLE


\stoptext
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Bug: Messy results when using table in head and multi-page tables in text

2008-01-20 Thread Carsten Fechtmann

Dear Wolfgang,

I tried that too already, but unfortunately I run into the same problem:
That is, if I use the natural tables in the header, I can't use them  
for multi-page tables in the text, as again the results ain't pretty,  
to say the least.

Here the ConTeXt to show what happens in that case
(and using your suggestion for the page-head with natural tables)

\setuppagenumbering[location=]
\setupheadertexts[\setups{pagehead}][][\setups{pagehead}][]
\startsetups[pagehead]
\bTABLE[option=stretch,strut=no,offset=.5em]
  \bTR
\bTD[align={right,lohi},width=4cm] left \eTD
\bTD[align={middle,lohi},width=6cm] middle \eTD
\bTD[align={left,lohi},width=4cm] right \eTD
  \eTR
\eTABLE
\stopsetups

\starttext

\bTABLE[split=repeat,option=stretch,strut=no,offset=.5em]
\bTABLEhead[rulethickness=1pt]
   \bTR
  \bTH[align={middle,lohi},width=6cm] head \eTH
   \eTR
\eTABLEhead
\bTABLEbody%
%\dorecurse{1}{ % works
\dorecurse{10}{ % works NOT
   \bTR
 \bTD
{\input knuth \par}
 \eTD
   \eTR
}
\eTABLEbody
\bTABLEfoot
   \bTR
 \bTH footer  \eTH
   \eTR
\eTABLEfoot
\eTABLE

\stoptext

The thing is, I rather tell the users of this page-layout NOT to use  
the \starttables ... \stoptables for multi-page tables, but rely on  
the natural tables for those (which work nicely, even though I  
_really_ would like to have a dedicated footer for each page here and  
not just one for the last page! Which by the way is something one  
doesn't need a dedicated command for, as one could _always_ just place  
that part at the end of the body part, as that will be then at the end  
of the table, i.e. the right place, no matter how many pages the table  
has.)
However, given, that \starttables ... \stoptables doesn't give me the  
correct footer in my case anyway, I rather have one type of table that  
is quite a bit easier for me and my colleagues to use and adapt for  
the multi-page tables, i.e. the 'natural' ones, and therefore keep  
using table in the header.

But yes, thanks for the suggestion, unfortunately, TABLE seems to rely  
on the same sort of buffer / storage / whatever mechanism, to do it's  
multi-page magic

And that just doesn't work with having the same table-type in the  
header, too.
(This is probably also true in case of the footer...)

Overall, things do work, as long as one does use the other type of  
table or tables / TABLE in either header or text, but it works NOT  
when you use the same in both...

Not quite sure, what's the reason for that or (and more importantly)  
what can be done about it

With best regards
Carsten

P.S.: What is interesting is that on the last pages of a multi-page  
table things do become sorted out again in either case and everything  
looks more or less as it should (i.e. like in the single-page table)

Am 20.01.2008 um 14:10 schrieb Wolfgang Schuster:

 On Sun, 20 Jan 2008 12:37:13 +0100
 Carsten Fechtmann [EMAIL PROTECTED] wrote:


 Dear ConTeXt experts,

 I have setup a page layout where I use table in the page-head for
 formatting quite a bit of stuff. (The example below is just a simple
 as can be basic idea, to show the overall effect)
 Now - as I can't prevent later users of this layout environment - to
 not use \starttables ... \stoptables I naturally would like for this
 to work in the text region as well.
 This works fine and as advertised (well mostly, see below) as long as
 the table does not spill over to the next page. In which case, things
 start to look very messy, indeed.

 From my (simple) point of view it looks like ConTeXt gets confused
 about which format to use for which table and tries to do them all at
 the same place or something.

 Any chance to get this fixed ?

 Use the following setup for the header, it use natural tables.

 \startsetups pagehead

 \bTABLE[option=stretch,strut=no,offset=.5em]
  \bTR
\bTD[align={right,lohi},width=4cm] left \eTD
\bTD[align={middle,lohi},width=6cm] middle \eTD
\bTD[align={left,lohi},width=4cm] right \eTD
  \eTR
 \eTABLE

 \stopsetups

 Thanks in advance
 Carsten

 P.S.: There is an additional bug (also concerning the single page
 version and not related to having a table in the pagehead), which
 puts in an extra (empty) gap in between the end of the tablebody and
 the tablefoot when the tablefoot starts with \HL (and there is no \HL
 at the end of tablebody).
 Things work when putting the \HL at the end of the tablebody, but  
 then
 no \HL will be put on top of the foot for any intermediate pages of
 the table, which is certainly not what one would usually want in this
 case.

 I have no solution for this.

 Anyway, here a simple version of this to demonstrate the effect(s)

 \setuppagenumbering[location=]
 \setupheadertexts[\setups{pagehead}][][\setups{pagehead}][]
 \startsetups[pagehead]
 \SetTableToWidth{\makeupwidth}
 \starttable[|p(40mm)|p(60mm)|p(40mm)|]
 \HL
 \VL \leftaligned{left} \VL \midaligned{middle} \VL
 \rightaligned{right} \VL\SR
 \HL
 \stoptable

Re: [NTG-context] Bug: Messy results when using table in head and multi-page tables in text

2008-01-20 Thread Wolfgang Schuster
On Sun, 20 Jan 2008 16:22:10 +0100
Carsten Fechtmann [EMAIL PROTECTED] wrote:

 
 Dear Wolfgang,
 
 I tried that too already, but unfortunately I run into the same problem:
 That is, if I use the natural tables in the header, I can't use them  
 for multi-page tables in the text, as again the results ain't pretty,  
 to say the least.
 
 Here the ConTeXt to show what happens in that case
 (and using your suggestion for the page-head with natural tables)
 
 \setuppagenumbering[location=]
 \setupheadertexts[\setups{pagehead}][][\setups{pagehead}][]
 \startsetups[pagehead]
 \bTABLE[option=stretch,strut=no,offset=.5em]
   \bTR
 \bTD[align={right,lohi},width=4cm] left \eTD
 \bTD[align={middle,lohi},width=6cm] middle \eTD
 \bTD[align={left,lohi},width=4cm] right \eTD
   \eTR
 \eTABLE
 \stopsetups

next solution, framed:

\startsetups[pagehead]
\setupframed[strut=no,offset=.5em,height=1cm]
\dontleavehmode
\framed[align={right,lohi},width=\dimexpr(\textwidth/7)*2+\linewidth
\relax]{left} \hskip-\linewidth
\framed[align={middle,lohi},width=\dimexpr(\textwidth/7)*3\relax]
{middle} \hskip-\linewidth
\framed[align={left,lohi},width=\dimexpr(\textwidth/7)*2+\linewidth
\relax]{right} \stopsetups

 \starttext
 
 \bTABLE[split=repeat,option=stretch,strut=no,offset=.5em]
 \bTABLEhead[rulethickness=1pt]
\bTR
   \bTH[align={middle,lohi},width=6cm] head \eTH
\eTR
 \eTABLEhead
 \bTABLEbody%
 %\dorecurse{1}{   % works
 \dorecurse{10}{   % works NOT
\bTR
  \bTD
   {\input knuth \par}
  \eTD
\eTR
 }
 \eTABLEbody
 \bTABLEfoot
\bTR
  \bTH footer  \eTH
\eTR
 \eTABLEfoot
 \eTABLE
 
 \stoptext
 
 The thing is, I rather tell the users of this page-layout NOT to use  
 the \starttables ... \stoptables for multi-page tables, but rely on  
 the natural tables for those (which work nicely, even though I  
 _really_ would like to have a dedicated footer for each page here and  
 not just one for the last page! Which by the way is something one  
 doesn't need a dedicated command for, as one could _always_ just place  
 that part at the end of the body part, as that will be then at the end  
 of the table, i.e. the right place, no matter how many pages the table  
 has.)
 However, given, that \starttables ... \stoptables doesn't give me the  
 correct footer in my case anyway, I rather have one type of table that  
 is quite a bit easier for me and my colleagues to use and adapt for  
 the multi-page tables, i.e. the 'natural' ones, and therefore keep  
 using table in the header.

This is the wishlist from us users since a few years.

 But yes, thanks for the suggestion, unfortunately, TABLE seems to rely  
 on the same sort of buffer / storage / whatever mechanism, to do it's  
 multi-page magic

The mchism works with \vsplit

 And that just doesn't work with having the same table-type in the  
 header, too.
 (This is probably also true in case of the footer...)
 
 Overall, things do work, as long as one does use the other type of  
 table or tables / TABLE in either header or text, but it works NOT  
 when you use the same in both...
 
 Not quite sure, what's the reason for that or (and more importantly)  
 what can be done about it
 
 With best regards
 Carsten
 
 P.S.: What is interesting is that on the last pages of a multi-page  
 table things do become sorted out again in either case and everything  
 looks more or less as it should (i.e. like in the single-page table)

Wolfgang
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] ConTeXt-ifying Kile

2008-01-02 Thread Matija Šuklje
OK, it's been a fun day's work, but here's the current working version of 
the context.cwl file.

What it does include:
* all the commands with all the fields mentioned on texshow.contextgarden.net
* the rest of the commands that I used from the list Idris sent me are 
currently commented out, until I find out they're valid (although not on 
texshow)
* all the fields have short descriptions
* all the \start* commands end with appropriate \stop* commands
* some of the fields (where it was simple to do it) use a '|' character as a 
separator inside fields

What it does not include:
* a syntax completely as Kile's README.cwl would want to have (especially 
because of my misuse of \start* \stop* in the same command and Mojca's 
separator suggestion)
* a completely coherent and Kile-valid syntax is still missing, although as 
it is, the file is usable
* some commands are commented out, as mentioned above

Installation:
copy or link the file to /usr/share/apps/kile/complete/tex/ (or the 
appropriate kile/complete/tex/ directory) and add context.cwl in Kile's 
settings under Kile-Complete-TeX/LaTeX

I hope anyone finds it useful and that I manage to get it working 
perfectly/validly soon.


Cheers,
Matija

-- 
gsm: +386 41 849 552
e-mail: [EMAIL PROTECTED]
www: http://matija.suklje.name

aim: hookofsilver
icq: 110183360
jabber/g-talk: [EMAIL PROTECTED]
msn: [EMAIL PROTECTED]
yahoo: matija_suklje
# ConTeXt commands
# Matija silverhook Šuklje, 02. Jan. 2008 — [EMAIL PROTECTED]
# URL: todo

\about{text}[reference]
\adaptlayout[number][dimensions]
\adding[size]
# \aftersplitstring
# \and
\appendix[references]{text}
# \appendtoks
# \AR
\arg{text}
\at{text}{text}[reference]
\atpage[reference]
\background
# \bbox
# \beforesplitstring
# \begstrut
\blackrule[settings]
\blackrules[settings]
\blank[size]
# \blockquote
\bookmark[name]{text}
# \bTABLE
# \bTABLEbody
# \bTABLEfoot
# \bTABLEhead
# \bTABLEnext
# \bTD
# \bTH
# \bTR
\but[reference]
\button[settings]{text}[references]
\bypassblocks[names][names]
\CAP{text}
\Cap{text}
\cap{text}
\Caps{text}
\chapter[references]{text}
\Character{text}
\character{text}
\Characters{text}
\characters{text}
\chem{text}{text}{text}
\clip[settings]{text}
\clonefield[name][names][name][names]
\color[text{text}
\column
# \commalistelement
\comment[name][settings]{text}
\comparecolorgroup[name]
\comparepalet[name]
\completecombinedlist[name][settings]
\completelistoffloats
\completelistofsorts
\completelistofsynonyms
\completeregister[settings]
# \component
# \ConTeXt
# \Context
# \convertargument
# \convertcommand
\convertnumber{text}{text}
\copyfield[name][names]
\correctwhitespace{text}
# \countXMLchildren
\coupledocument[name][file][name]
\coupledregister[text]{text}
\couplemarking[name][name]
\couplepage[names][options]
\couplepaper[name]
\coupleregister[name]
\crlf
\currentdate[syntax]
\currentheadnumber
\date[date][syntax]
\decouplemarking[name]
# \decrement
\define[number]\command{text}
\defineblank[name][settings]
\defineblock[name]
\definebodyfont[font size][type][files]
\definebodyfontenvironment[font size][dimensions]
\definebuffer[name]
# \definecollector
\definecolor[name]{colour values}
\definecolorgroup[name][colour model][colour values]
\definecombinedlist[name][list][settings]
\defineconversion[name][command]
\definedescription[name][settings]
# \definedfont
\defineenumeration[names][name][settings]
# \defineexternalfigure
\definefield[reference][widget type][setup name][names][initial content]
\definefieldstack[name][names][settings]
\definefiguresymbol[name][text][settings]
\definefloat[singular][plural]
\definefont[name][file]
# \definefontsynonym
\defineframed[name][settings]
# \defineframedcontent
\defineframedtext[name][settings]
\definehead[name][section]
# \definehspace
\defineindenting[name][settings]
\defineinteractionmenu[position|names][options and settings]
\defineinteractionmenu[position|name][position|name][settings]
\definelabel[name][text and options]
# \definelayer
# \definelayerpreset
# \definelayout
\definelist[name][name][settings]
\definelogo[name][position][position][command][state]
# \definemainfield
\definemakeup[name][settings]
\definemarking[name][name]
# \definemeasure
# \defineoutput[name][specials]
\defineoverlay[names][command]
# \definepagebreak
\definepalet[name][name]
\definepapersize[name][dimenstions]
\defineparagraphs[name][options and settings]
\defineprofile[names][names]
\defineprogram[name][text][text]
# \definepushbutton
# \definepushsymbol
\definerawfont[name][file][settings]
\definereference[name][references]
\definereferenceformat[name][options]
\definereferencelist[name][settings]
\defineregister[singular][plural]
\definerule[name][settings]
\definesection[name]
\definesectionblock[name][settings]
\definesorting[singular][plural][command]
\definestartstop[name][commands]
\definesubfield[name][name][names]
\definesymbol[name][text]
\definesynonyms[singular][plural][command][command]
\definetabletemplate[name][text][text][text

[NTG-context] table layout

2007-11-06 Thread Wolfgang Schuster
Hi,

I try currently to write a table with a repeated header on all pages and
rules above and below the header
and another rule below the table on all pages. I tried this now with all
tables in ConTeXt but I can't the
desired result from any of them.

Tabulate has problems with rule below the header and did not support
repeated footers.

TaBlE has problems with the spacing of his rows below the header and at the
bottom of the tables,
it has also a problem with the spacing from the rule at the bottom.

Natural Tables allow me to put a rule above and below the header but I'm
unable to get rule at last row
on every page, the last key for rows use always the last row of the hole
table.

I played also a little bit with textbackground but I have a few problems
with the results, the background
has always the width of the current textwidth and it takes always the
topskip into account.

What it tried so far is the following code:


\setuppapersize[A7,landscape][A7,landscape]
\setuplayout[lines=5]

\starttext

\tracetablestrue
\setuptables[split=repeat]

\starttablehead
\HL
\NC Row 1 \NC Row 2 \NC Row 3 \NC\AR
\HL
\stoptablehead

\starttabletail
\HL
\stoptabletail

\starttable[|l|l|l|]
\NC Text \NC Text \NC Text \NC\AR
\NC Text \NC Text \NC Text \NC\AR
\NC Text \NC Text \NC Text \NC\AR
\NC Text \NC Text \NC Text \NC\AR
\NC Text \NC Text \NC Text \NC\AR
\NC Text \NC Text \NC Text \NC\AR
\stoptable

\page

\startbuffer[tabulate]
\starttabulatehead
\HL
\NC Row 1 \NC Row 2 \NC Row 3 \NC\NR
\HL
\stoptabulatehead

\starttabulatetail
\HL
\stoptabulatetail

\starttabulate[|l|l|l|]
\NC Text \NC Text \NC Text \NC\NR
\NC Text \NC Text \NC Text \NC\NR
\NC Text \NC Text \NC Text \NC\NR
\NC Text \NC Text \NC Text \NC\NR
\NC Text \NC Text \NC Text \NC\NR
\NC Text \NC Text \NC Text \NC\NR
\stoptabulate
\stopbuffer

\getbuffer[tabulate]

\page

\setuptabulate[header=repeat]

\getbuffer[tabulate]

\page

\newconditional\tabulaterepeatfoot

\settrue\tabulaterepeatfoot

\def\dosplittabulatebox#1%
  {\resettsplit
   \def\tsplitminimumfreelines{2}%
   \def\tsplitminimumfreespace{0pt}%
   \setbox\tsplitcontent\box#1%
   \ifcase\tabulaterepeathead\or
 \setbox\tsplithead\vsplit\tsplitcontent to 3\lineheight
 \setbox\tsplithead\vbox{\unvbox\tsplithead}%
   \or
 \setbox\tsplithead\vbox{\hbox{\strut\tabulateparameter\c!title}}%
   \fi
   \ifcase\tabulaterepeatfoot
 %\setbox\tsplittail\vsplit\tsplitcontent to \lineheight
 %\setbox\tsplittail\vbox{\unvbox\tsplittail}%
 \setbox\tsplittail\vbox{\color[orange]{\hrule}}%
   \fi
   \handletsplit}

\def\fulltabulatecontent
  {\tabulateheadcontent
   \tabulatecontent
   \ifcase\tabulaterepeatfoot\else
 \tabulatetailcontent
   \fi
   \removefunnytabulateline}

%\tracetabulatetrue

\getbuffer[tabulate]

\page

%\traceTABLEtrue
\setupTABLE[split=repeat,frame=off]
\setupTABLE[header][topframe=on,bottomframe=on]
\setupTABLE[row][last][bottomframe=on]

\bTABLE
\bTABLEhead
\bTR\bTH Row 1 \eTH\bTH Row 2 \eTH\bTH Row 3 \eTH\eTR
\eTABLEhead
\bTABLEfoot
\bTR\bTD Row 1 \eTD\bTD Row 2 \eTD\bTD Row 3 \eTD\eTR
\eTABLEfoot
\bTABLEbody
\bTR\bTD Text \eTD\bTD Text \eTD\bTD Text \eTD\eTR
\bTR\bTD Text \eTD\bTD Text \eTD\bTD Text \eTD\eTR
\bTR\bTD Text \eTD\bTD Text \eTD\bTD Text \eTD\eTR
\bTR\bTD Text \eTD\bTD Text \eTD\bTD Text \eTD\eTR
\bTR\bTD Text \eTD\bTD Text \eTD\bTD Text \eTD\eTR
\bTR\bTD Text \eTD\bTD Text \eTD\bTD Text \eTD\eTR
\eTABLEbody
\eTABLE

\stoptext

I will also show you what I tried to get with textbackgrounds.

\setuppapersize[A7,landscape][A7,landscape]
\setuplayout[lines=5]
\setupcolors[state=start]

\startuseMPgraphic{tableback}
pickup pencircle scaled 1pt;
path p;
p = (multipars[1]);
draw p withcolor red;
\stopuseMPgraphic

\definetextbackground
  [mytab]
  [location=paragraph,
   width=local,
   mp=tableback]

\starttext

%\topskip=0pt

\setuptabulate
  [before={\starttextbackground[mytab]},
   after=\stoptextbackground]

\starttabulatehead
\HL
\NC Row 1 \NC Row 2 \NC Row 3 \NC\NR
\HL
\stoptabulatehead

\starttabulatetail
\HL
\stoptabulatetail

\starttabulate[|l|l|l|]
\NC Text \NC Text \NC Text \NC\NR
\NC Text \NC Text \NC Text \NC\NR
\NC Text \NC Text \NC Text \NC\NR
\NC Text \NC Text \NC Text \NC\NR
\NC Text \NC Text \NC Text \NC\NR
\NC Text \NC Text \NC Text \NC\NR
\stoptabulate

\stoptext

Wolfgang
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] table layout

2007-11-06 Thread Peter Rolf
Hi Wolfgang,

what a nice 'minimal' example :)

I'm no table expert, not even an experienced table user. Anyhow, I think
that table is the best choice here. Aside from the bad placing of the
horizontal rules, all is working. This is much more than you can say
from the other candidates.

How about defining your own horizontal rules instead of using the
default \HL ones? See definition of \TableHL and alike in core-tab.tex.
You can define special horizontal lines for all three occurrences, so
spacing should not be a problem.

Donno if this works out of the box (if table accepts such stuff in head
and tail). All untested, as I don't have much time.

try (ugly and old code, works between normal table lines)

\def\betweentable#1{\TABLEnoalign{\nointerlineskip#1\nointerlineskip}}

\TB[small,medium,...] for vertical spacing and
\betweentable{...} for the line (MP line is always nice)

\TB[small]
\betweentable{\hbox{~~~\reuseMPgraphic{EnglishRule}{color=dimgray,width=81.3mm,height=2pt}}}
\TB[medium]


CHANGE IT HERE 

\starttablehead
\HL % 
\NC Row 1 \NC Row 2 \NC Row 3 \NC\AR
\HL % 
\stoptablehead

\starttabletail
\HL % 
\stoptabletail


Hope that helps,

Peter


Wolfgang Schuster schrieb:
 Hi,
  
 I try currently to write a table with a repeated header on all pages and
 rules above and below the header
 and another rule below the table on all pages. I tried this now with all
 tables in ConTeXt but I can't the
 desired result from any of them.
  
 Tabulate has problems with rule below the header and did not support
 repeated footers.
  
 TaBlE has problems with the spacing of his rows below the header and at
 the bottom of the tables,
 it has also a problem with the spacing from the rule at the bottom.
  
 Natural Tables allow me to put a rule above and below the header but I'm
 unable to get rule at last row
 on every page, the last key for rows use always the last row of the
 hole table.
  
 I played also a little bit with textbackground but I have a few problems
 with the results, the background
 has always the width of the current textwidth and it takes always the
 topskip into account.
  
 What it tried so far is the following code:
  
 
 \setuppapersize[A7,landscape][A7,landscape]
 \setuplayout[lines=5]
 
 \starttext
 
 \tracetablestrue
 \setuptables[split=repeat]
 
 \starttablehead
 \HL
 \NC Row 1 \NC Row 2 \NC Row 3 \NC\AR
 \HL
 \stoptablehead
 
 \starttabletail
 \HL
 \stoptabletail
 
 \starttable[|l|l|l|]
 \NC Text \NC Text \NC Text \NC\AR
 \NC Text \NC Text \NC Text \NC\AR
 \NC Text \NC Text \NC Text \NC\AR
 \NC Text \NC Text \NC Text \NC\AR
 \NC Text \NC Text \NC Text \NC\AR
 \NC Text \NC Text \NC Text \NC\AR
 \stoptable
 
 \page
 
 \startbuffer[tabulate]
 \starttabulatehead
 \HL
 \NC Row 1 \NC Row 2 \NC Row 3 \NC\NR
 \HL
 \stoptabulatehead
 
 \starttabulatetail
 \HL
 \stoptabulatetail
 
 \starttabulate[|l|l|l|]
 \NC Text \NC Text \NC Text \NC\NR
 \NC Text \NC Text \NC Text \NC\NR
 \NC Text \NC Text \NC Text \NC\NR
 \NC Text \NC Text \NC Text \NC\NR
 \NC Text \NC Text \NC Text \NC\NR
 \NC Text \NC Text \NC Text \NC\NR
 \stoptabulate
 \stopbuffer
 
 \getbuffer[tabulate]
 
 \page
 
 \setuptabulate[header=repeat]
 
 \getbuffer[tabulate]
 
 \page
 
 \newconditional\tabulaterepeatfoot
 
 \settrue\tabulaterepeatfoot
 
 \def\dosplittabulatebox#1%
   {\resettsplit
\def\tsplitminimumfreelines{2}%
\def\tsplitminimumfreespace{0pt}%
\setbox\tsplitcontent\box#1%
\ifcase\tabulaterepeathead\or
  \setbox\tsplithead\vsplit\tsplitcontent to 3\lineheight
  \setbox\tsplithead\vbox{\unvbox\tsplithead}%
\or
  \setbox\tsplithead\vbox{\hbox{\strut\tabulateparameter\c!title}}%
\fi
\ifcase\tabulaterepeatfoot
  %\setbox\tsplittail\vsplit\tsplitcontent to \lineheight
  %\setbox\tsplittail\vbox{\unvbox\tsplittail}%
  \setbox\tsplittail\vbox{\color[orange]{\hrule}}%
\fi
\handletsplit}
 
 \def\fulltabulatecontent
   {\tabulateheadcontent
\tabulatecontent
\ifcase\tabulaterepeatfoot\else
  \tabulatetailcontent
\fi
\removefunnytabulateline}
 
 %\tracetabulatetrue
 
 \getbuffer[tabulate]
 
 \page
 
 %\traceTABLEtrue
 \setupTABLE[split=repeat,frame=off]
 \setupTABLE[header][topframe=on,bottomframe=on]
 \setupTABLE[row][last][bottomframe=on]
 
 \bTABLE
 \bTABLEhead
 \bTR\bTH Row 1 \eTH\bTH Row 2 \eTH\bTH Row 3 \eTH\eTR
 \eTABLEhead
 \bTABLEfoot
 \bTR\bTD Row 1 \eTD\bTD Row 2 \eTD\bTD Row 3 \eTD\eTR
 \eTABLEfoot
 \bTABLEbody
 \bTR\bTD Text \eTD\bTD Text \eTD\bTD Text \eTD\eTR
 \bTR\bTD Text \eTD\bTD Text \eTD\bTD Text \eTD\eTR
 \bTR\bTD Text \eTD\bTD Text \eTD\bTD Text \eTD\eTR
 \bTR\bTD Text \eTD\bTD Text \eTD\bTD Text \eTD\eTR
 \bTR\bTD Text \eTD\bTD Text \eTD\bTD Text \eTD\eTR
 \bTR\bTD Text \eTD\bTD Text \eTD\bTD Text \eTD\eTR
 \eTABLEbody
 \eTABLE
 
 \stoptext
 
 I will also show you what I tried to get with textbackgrounds.
 
 \setuppapersize[A7,landscape][A7,landscape]
 \setuplayout[lines=5]
 \setupcolors[state=start]
 
 \startuseMPgraphic{tableback

Re: [NTG-context] natural table splitting problems

2007-10-31 Thread Peter Rolf
Santy, Michael schrieb:
 
 The same as in my first reply. Look at the first page with the text
 only. There isn't a space behind the sentence(s) and TeX can't break the
 paragraph (text expands it's lower border). This also breaks the
 splitting of the table, as it is (partly) on the same page.
 
 Peter, all of the information that you've sent me has been very
 educational, but I think you may be focusing too much on the approach

maybe, but it's the only thing i had :)

 that I've used to illustrate the errant table splitting behavior.  The
 example below also illustrates this behavior and does not extend the
 text below its lower border as did the previous example. 

confirmed

page 1 : text
page 2 : header with one row
page 3 : header with rest of table

and this time i have no explanation.

 This is of course a contrived example -- I unfortunately cannot post a
 real example.  You can slightly change the layout and the problem will
 going away (for this particular document).  The problem is that my
 ConTeXt rendering layer has to process arbitrary XML input and this very
 same behavior pops up in documents regardless of the layout.  Making
 adjustments to the layout, font size, etc will just change where the
 problem manifests itself.  It is still possible that I'm doing something
 wrong, but my gut tells me that it is a bug in the context natural table
 splitting code.
 
i have looked into your source and the only thing that was irritating to
me is that fact, that you use 'split' twice.

 \placetable[split]{Broken Split Table}{%
 \bTABLE[split=repeat]

the second one looks ok for me, but the first one is fishy. i have
looked into the definition of \placefloat and there is no option 'split'.


\placefloat[...][ref,ref,...]{...}{...}

[...]  left right here top bottom inleft inright inmargin
margin leftmargin
   rightmargin leftedge rightedge innermargin
outermargin inneredge outeredge
   inner outer line high low fit page opposite always
force tall reset line
   height depth
[ref,ref,...]
{...}  text
{...}  text


it can be seen as ref(erence), but the funny thing is, that the problems
vanished, if i delete the '[split]' after placetable or complete it to
'[here] [split]' (split as reference).

give it a try (and ask hans about the why). ;)


best wishes, peter


 \setuppapersize[letter][letter]
 
 \setuplayout[textwidth=6.5in,
  width=middle,
  height=middle,
  footer=3\bodyfontsize,
  footerdistance=\bodyfontsize,
  header=0pt,
  headerdistance=0pt,
  top=\bodyfontsize,
  topdistance=\bodyfontsize,
  topspace=0.8in,
  bottom=\bodyfontsize,
  bottomdistance=0.5\bodyfontsize,
  bottomspace=0.8in,
  location=middle]
 
 \showframe
 
 \usetypescript[times][ec]
 \setupbodyfont[times,13pt]
 
 \setupwhitespace[big]
 
 \starttext
 
 Now is the time for all good men to come to the aid of their country.
 
 Now is the time for all good men to come to the aid of their country.
 
 Now is the time for all good men to come to the aid of their country.
 
 Now is the time for all good men to come to the aid of their country.
 
 Now is the time for all good men to come to the aid of their country.
 
 Now is the time for all good men to come to the aid of their country.
 
 Now is the time for all good men to come to the aid of their country.
 
 Now is the time for all good men to come to the aid of their country.
 
 Now is the time for all good men to come to the aid of their country.
 
 Now is the time for all good men to come to the aid of their country.
 
 Now is the time for all good men to come to the aid of their country.
 
 Now is the time for all good men to come to the aid of their country.
 
 Now is the time for all good men to come to the aid of their country.
 
 Now is the time for all good men to come to the aid of their country.
 
 Now is the time for all good men to come to the aid of their country.
 
 Now is the time for all good men to come to the aid of their country.
 
 Now is the time for all good men to come to the aid of their country.
 
 Now is the time for all good men to come to the aid of their country.
 
 Now is the time for all good men to come to the aid of their country.
 
 Now is the time for all good men to come to the aid of their country.
 
 Now is the time for all good men to come to the aid of their country.
 
 Now is the time for all good men to come to the aid of their country.
 
 Now is the time for all good men to come to the aid of their country.
 
 Now is the time for all good men to come to the aid of their country.
 
 Now is the time for all good men to come to the aid of their country.
 
 \placetable[split]{Broken Split Table}{%
 \bTABLE[split=repeat]
 \bTABLEhead
 \bTR 
 \bTH Header A \eTH
 \bTH Header B \eTH
 \eTR
 \eTABLEhead

Re: [NTG-context] natural table splitting problems

2007-10-31 Thread Santy, Michael

Peter,

There definitely seems to be something wrong with the splitting behavior, but 
I'm able to illustrate the same problem regardless of whether its wrapped in a 
\placetable (see example below).  From my experiments, wrapping a table in 
placetable didn't seem to fix the broken tables or break the correctly split 
tables.

Cheers,
Mike

\setuppapersize[letter][letter]

\setuplayout[textwidth=6.5in,
 width=middle,
 height=middle,
 footer=3\bodyfontsize,
 footerdistance=\bodyfontsize,
 header=0pt,
 headerdistance=0pt,
 top=\bodyfontsize,
 topdistance=\bodyfontsize,
 topspace=0.8in,
 bottom=\bodyfontsize,
 bottomdistance=0.5\bodyfontsize,
 bottomspace=0.8in,
 location=middle]

\showframe

\usetypescript[times][ec]
\setupbodyfont[times,13pt]

\setupwhitespace[big]

\starttext

Now is the time for all good men to come to the aid of their country. 

Now is the time for all good men to come to the aid of their country. 

Now is the time for all good men to come to the aid of their country. 

Now is the time for all good men to come to the aid of their country. 

Now is the time for all good men to come to the aid of their country. 

Now is the time for all good men to come to the aid of their country. 

Now is the time for all good men to come to the aid of their country. 

Now is the time for all good men to come to the aid of their country. 

Now is the time for all good men to come to the aid of their country. 

Now is the time for all good men to come to the aid of their country. 

Now is the time for all good men to come to the aid of their country. 

Now is the time for all good men to come to the aid of their country. 

Now is the time for all good men to come to the aid of their country. 

Now is the time for all good men to come to the aid of their country. 

Now is the time for all good men to come to the aid of their country. 

Now is the time for all good men to come to the aid of their country. 

Now is the time for all good men to come to the aid of their country. 

Now is the time for all good men to come to the aid of their country. 

Now is the time for all good men to come to the aid of their country. 

Now is the time for all good men to come to the aid of their country. 

Now is the time for all good men to come to the aid of their country. 

Now is the time for all good men to come to the aid of their country. 

Now is the time for all good men to come to the aid of their country. 

Now is the time for all good men to come to the aid of their country. 

Now is the time for all good men to come to the aid of their country. 

\blank[line,medium,force]

\bTABLE[split=repeat]
\bTABLEhead
\bTR  
\bTH Header A \eTH 
\bTH Header B \eTH 
\eTR 
\eTABLEhead
\bTABLEbody
\bTR
\bTC A \eTC
\bTC B \eTC
\eTR
\bTR
\bTC A \eTC
\bTC B \eTC
\bTR
\bTC A \eTC
\bTC B \eTC
\eTR
\bTR
\bTC A \eTC
\bTC B \eTC
\eTR
\bTR
\bTC A \eTC
\bTC B \eTC
\eTR
\bTR
\bTC A \eTC
\bTC B \eTC
\eTR
\bTR
\bTC A \eTC
\bTC B \eTC
\eTR
\bTR
\bTC A \eTC
\bTC B \eTC
\eTR
\bTR
\bTC A \eTC
\bTC B \eTC
\eTR
\bTR
\bTC A \eTC
\bTC B \eTC
\eTR
\bTR
\bTC A \eTC
\bTC B \eTC
\eTR
\bTR
\bTC A \eTC
\bTC B \eTC
\eTR
\bTR
\bTC A \eTC
\bTC B \eTC
\eTR
\bTR
\bTC A \eTC
\bTC B \eTC
\eTR
\bTR
\bTC A \eTC
\bTC B \eTC
\eTR
\bTR
\bTC A \eTC
\bTC B \eTC
\eTR
\bTR
\bTC A \eTC
\bTC B \eTC
\eTR
\bTR
\bTC A \eTC
\bTC B \eTC
\eTR
\bTR
\bTC A \eTC
\bTC B \eTC
\eTR
\bTR
\bTC A \eTC
\bTC B \eTC
\eTR
\bTR
\bTC A \eTC
\bTC B \eTC
\eTR
\bTR
\bTC A \eTC
\bTC B \eTC
\eTR
\bTR
\bTC A \eTC
\bTC B \eTC
\eTR
\eTABLEbody
\eTABLE

\stoptext

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] natural table splitting problems

2007-10-31 Thread Peter Rolf
Santy, Michael schrieb:
 
 Peter,
 
 There definitely seems to be something wrong with the splitting
 behavior, but I'm able to illustrate the same problem regardless of
 whether its wrapped in a \placetable (see example below).  From my
 experiments, wrapping a table in placetable didn't seem to fix the
 broken tables or break the correctly split tables.

hi mike,

indeed not a nice break, but the table is at least split correctly here.

what is missing is the right space ajustment in front of the table and
the caption. try it without the 'forced' in blank (i used it, as the
blank was eaten up otherwise). i know that this is still no satisfying
solution.

have you tried this with your 'real world' documents?

cheers, peter

 Cheers,
 Mike
 
 \setuppapersize[letter][letter]
 
 \setuplayout[textwidth=6.5in,
  width=middle,
  height=middle,
  footer=3\bodyfontsize,
  footerdistance=\bodyfontsize,
  header=0pt,
  headerdistance=0pt,
  top=\bodyfontsize,
  topdistance=\bodyfontsize,
  topspace=0.8in,
  bottom=\bodyfontsize,
  bottomdistance=0.5\bodyfontsize,
  bottomspace=0.8in,
  location=middle]
 
 \showframe
 
 \usetypescript[times][ec]
 \setupbodyfont[times,13pt]
 
 \setupwhitespace[big]
 
 \starttext
 
 Now is the time for all good men to come to the aid of their country.
 
 Now is the time for all good men to come to the aid of their country.
 
 Now is the time for all good men to come to the aid of their country.
 
 Now is the time for all good men to come to the aid of their country.
 
 Now is the time for all good men to come to the aid of their country.
 
 Now is the time for all good men to come to the aid of their country.
 
 Now is the time for all good men to come to the aid of their country.
 
 Now is the time for all good men to come to the aid of their country.
 
 Now is the time for all good men to come to the aid of their country.
 
 Now is the time for all good men to come to the aid of their country.
 
 Now is the time for all good men to come to the aid of their country.
 
 Now is the time for all good men to come to the aid of their country.
 
 Now is the time for all good men to come to the aid of their country.
 
 Now is the time for all good men to come to the aid of their country.
 
 Now is the time for all good men to come to the aid of their country.
 
 Now is the time for all good men to come to the aid of their country.
 
 Now is the time for all good men to come to the aid of their country.
 
 Now is the time for all good men to come to the aid of their country.
 
 Now is the time for all good men to come to the aid of their country.
 
 Now is the time for all good men to come to the aid of their country.
 
 Now is the time for all good men to come to the aid of their country.
 
 Now is the time for all good men to come to the aid of their country.
 
 Now is the time for all good men to come to the aid of their country.
 
 Now is the time for all good men to come to the aid of their country.
 
 Now is the time for all good men to come to the aid of their country.
 
 \blank[line,medium,force]
 
 \bTABLE[split=repeat]
 \bTABLEhead
 \bTR 
 \bTH Header A \eTH
 \bTH Header B \eTH
 \eTR
 \eTABLEhead
 \bTABLEbody
 \bTR
 \bTC A \eTC
 \bTC B \eTC
 \eTR
 \bTR
 \bTC A \eTC
 \bTC B \eTC
 \bTR
 \bTC A \eTC
 \bTC B \eTC
 \eTR
 \bTR
 \bTC A \eTC
 \bTC B \eTC
 \eTR
 \bTR
 \bTC A \eTC
 \bTC B \eTC
 \eTR
 \bTR
 \bTC A \eTC
 \bTC B \eTC
 \eTR
 \bTR
 \bTC A \eTC
 \bTC B \eTC
 \eTR
 \bTR
 \bTC A \eTC
 \bTC B \eTC
 \eTR
 \bTR
 \bTC A \eTC
 \bTC B \eTC
 \eTR
 \bTR
 \bTC A \eTC
 \bTC B \eTC
 \eTR
 \bTR
 \bTC A \eTC
 \bTC B \eTC
 \eTR
 \bTR
 \bTC A \eTC
 \bTC B \eTC
 \eTR
 \bTR
 \bTC A \eTC
 \bTC B \eTC
 \eTR
 \bTR
 \bTC A \eTC
 \bTC B \eTC
 \eTR
 \bTR
 \bTC A \eTC
 \bTC B \eTC
 \eTR
 \bTR
 \bTC A \eTC
 \bTC B \eTC
 \eTR
 \bTR
 \bTC A \eTC
 \bTC B \eTC
 \eTR
 \bTR
 \bTC A \eTC
 \bTC B \eTC
 \eTR
 \bTR
 \bTC A \eTC
 \bTC B \eTC
 \eTR
 \bTR
 \bTC A \eTC
 \bTC B \eTC
 \eTR
 \bTR
 \bTC A \eTC
 \bTC B \eTC
 \eTR
 \bTR
 \bTC A \eTC
 \bTC B \eTC
 \eTR
 \bTR
 \bTC A \eTC
 \bTC B \eTC
 \eTR
 \eTABLEbody
 \eTABLE
 
 \stoptext
 
 
 
 
 ___
 If your question is of interest to others as well, please add an entry to the 
 Wiki!
 
 maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
 webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
 archive  : https://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net
 ___

___
If your question is of interest to others as well, please add an entry to the 
Wiki

Re: [NTG-context] natural table splitting problems

2007-10-30 Thread Santy, Michael

Thanks Peter for the pointer to the multipage table in the wiki.  I don't know 
how I overlooked that example.  However, I was still able to duplicate the 
problem with this sample table by including a page full of text before the 
table (see below).  

If the dorecurse is set to 62 or 63, the contents slightly overflow the first 
page text area and only the first row of the table is rendered on the second 
page.  If dorecurse on blah is performed 61 or 64 times, the table is rendered 
properly.

Any thoughts?

Cheers,
Mike

\starttext

\setupcolors[state=start]

\showframe

\def\blah{The quick brown fox jumped over the lazy stupid dog.}
\dorecurse{62}{\blah}

% setup for all cells
\setupTABLE[r][each][style=\tfx\it, align=center]

% setup table head
\setupTABLE[r][first]
  [background=color,
   backgroundcolor=yellow]
% setup table footer
\setupTABLE[r][last]
  [style=bold,
   background=color,
   backgroundcolor=green]

\bTABLE[split=repeat,option=stretch]% head on every page, stretch columns
%
% IMPORTANT: use \bTH ... \eTH to enclose the head|next cells
\bTABLEhead
\bTR
  \bTH  head1 \eTH
  \bTH  head2 \eTH
  \bTH  head3 \eTH
\eTR
\eTABLEhead
% 
\bTABLEnext % setup for next table head
\bTR [background=color,backgroundcolor=cyan]
  \bTH  next1 \eTH
  \bTH  next2 \eTH
  \bTH  next3 \eTH
\eTR
\eTABLEnext
%
% the table body (main part)
%
\bTABLEbody
%
\dorecurse{100}{% 100 rows
\bTR
  \bTC  body body body body body \eTC
  \bTC  body body body body body \eTC
  \bTC  body body body body body \eTC
\eTR
}%
%
\eTABLEbody
%
% the table foot
%
\bTABLEfoot
\bTR
  \bTC  foot1 \eTC
  \bTC  foot2 \eTC
  \bTC  foot3 \eTC
\eTR
\eTABLEfoot
%
\eTABLE

\stoptext
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] natural table splitting problems

2007-10-30 Thread Peter Rolf
Santy, Michael schrieb:
 
 Thanks Peter for the pointer to the multipage table in the wiki.  I
 don't know how I overlooked that example.  However, I was still able to
 duplicate the problem with this sample table by including a page full of
 text before the table (see below). 
 
 If the dorecurse is set to 62 or 63, the contents slightly overflow the
 first page text area and only the first row of the table is rendered on
 the second page.  If dorecurse on blah is performed 61 or 64 times, the
 table is rendered properly.
 
 Any thoughts?

The same as in my first reply. Look at the first page with the text
only. There isn't a space behind the sentence(s) and TeX can't break the
paragraph (text expands it's lower border). This also breaks the
splitting of the table, as it is (partly) on the same page.

So you should better use the example texts that are shipped with
ConText. Look at your

tex\texmf-local\tex\context\sample

directory for the file names.

For example use something like
\dorecurse{3}{\input knuth\relax}

or a combination

\dorecurse{2}{\input knuth\par
\input zapf\par
\input bryson\par\blank}

If you like you can learn more about TeX's line breaking algorithm, so
that you can create better (working) example texts. Search for
'texbytopic' and you will find an excellent (and free) book about TeX.

Good luck for your further work with ConTeXt,

Peter


 Cheers,
 Mike
 
 \starttext
 
 \setupcolors[state=start]
 
 \showframe
 
 \def\blah{The quick brown fox jumped over the lazy stupid dog.}
 \dorecurse{62}{\blah}
 
 % setup for all cells
 \setupTABLE[r][each][style=\tfx\it, align=center]
 
 % setup table head
 \setupTABLE[r][first]
   [background=color,
backgroundcolor=yellow]
 % setup table footer
 \setupTABLE[r][last]
   [style=bold,
background=color,
backgroundcolor=green]
 
 \bTABLE[split=repeat,option=stretch]% head on every page, stretch columns
 %
 % IMPORTANT: use \bTH ... \eTH to enclose the head|next cells
 \bTABLEhead
 \bTR
   \bTH  head1 \eTH
   \bTH  head2 \eTH
   \bTH  head3 \eTH
 \eTR
 \eTABLEhead
 %
 \bTABLEnext % setup for next table head
 \bTR [background=color,backgroundcolor=cyan]
   \bTH  next1 \eTH
   \bTH  next2 \eTH
   \bTH  next3 \eTH
 \eTR
 \eTABLEnext
 %
 % the table body (main part)
 %
 \bTABLEbody
 %
 \dorecurse{100}{% 100 rows
 \bTR
   \bTC  body body body body body \eTC
   \bTC  body body body body body \eTC
   \bTC  body body body body body \eTC
 \eTR
 }%
 %
 \eTABLEbody
 %
 % the table foot
 %
 \bTABLEfoot
 \bTR
   \bTC  foot1 \eTC
   \bTC  foot2 \eTC
   \bTC  foot3 \eTC
 \eTR
 \eTABLEfoot
 %
 \eTABLE
 
 \stoptext
 
 
 
 
 ___
 If your question is of interest to others as well, please add an entry to the 
 Wiki!
 
 maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
 webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
 archive  : https://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net
 ___

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] natural table splitting problems

2007-10-30 Thread Santy, Michael

 The same as in my first reply. Look at the first page with the text
 only. There isn't a space behind the sentence(s) and TeX can't break the
 paragraph (text expands it's lower border). This also breaks the
 splitting of the table, as it is (partly) on the same page.

Peter, all of the information that you've sent me has been very educational, 
but I think you may be focusing too much on the approach that I've used to 
illustrate the errant table splitting behavior.  The example below also 
illustrates this behavior and does not extend the text below its lower border 
as did the previous example.  

This is of course a contrived example -- I unfortunately cannot post a real 
example.  You can slightly change the layout and the problem will going away 
(for this particular document).  The problem is that my ConTeXt rendering layer 
has to process arbitrary XML input and this very same behavior pops up in 
documents regardless of the layout.  Making adjustments to the layout, font 
size, etc will just change where the problem manifests itself.  It is still 
possible that I'm doing something wrong, but my gut tells me that it is a bug 
in the context natural table splitting code.

\setuppapersize[letter][letter]

\setuplayout[textwidth=6.5in,
 width=middle,
 height=middle,
 footer=3\bodyfontsize,
 footerdistance=\bodyfontsize,
 header=0pt,
 headerdistance=0pt,
 top=\bodyfontsize,
 topdistance=\bodyfontsize,
 topspace=0.8in,
 bottom=\bodyfontsize,
 bottomdistance=0.5\bodyfontsize,
 bottomspace=0.8in,
 location=middle]

\showframe

\usetypescript[times][ec]
\setupbodyfont[times,13pt]

\setupwhitespace[big]

\starttext

Now is the time for all good men to come to the aid of their country. 

Now is the time for all good men to come to the aid of their country. 

Now is the time for all good men to come to the aid of their country. 

Now is the time for all good men to come to the aid of their country. 

Now is the time for all good men to come to the aid of their country. 

Now is the time for all good men to come to the aid of their country. 

Now is the time for all good men to come to the aid of their country. 

Now is the time for all good men to come to the aid of their country. 

Now is the time for all good men to come to the aid of their country. 

Now is the time for all good men to come to the aid of their country. 

Now is the time for all good men to come to the aid of their country. 

Now is the time for all good men to come to the aid of their country. 

Now is the time for all good men to come to the aid of their country. 

Now is the time for all good men to come to the aid of their country. 

Now is the time for all good men to come to the aid of their country. 

Now is the time for all good men to come to the aid of their country. 

Now is the time for all good men to come to the aid of their country. 

Now is the time for all good men to come to the aid of their country. 

Now is the time for all good men to come to the aid of their country. 

Now is the time for all good men to come to the aid of their country. 

Now is the time for all good men to come to the aid of their country. 

Now is the time for all good men to come to the aid of their country. 

Now is the time for all good men to come to the aid of their country. 

Now is the time for all good men to come to the aid of their country. 

Now is the time for all good men to come to the aid of their country. 

\placetable[split]{Broken Split Table}{%
\bTABLE[split=repeat]
\bTABLEhead
\bTR  
\bTH Header A \eTH 
\bTH Header B \eTH 
\eTR 
\eTABLEhead
\bTABLEbody
\bTR
\bTC A \eTC
\bTC B \eTC
\eTR
\bTR
\bTC A \eTC
\bTC B \eTC
\bTR
\bTC A \eTC
\bTC B \eTC
\eTR
\bTR
\bTC A \eTC
\bTC B \eTC
\eTR
\bTR
\bTC A \eTC
\bTC B \eTC
\eTR
\bTR
\bTC A \eTC
\bTC B \eTC
\eTR
\bTR
\bTC A \eTC
\bTC B \eTC
\eTR
\bTR
\bTC A \eTC
\bTC B \eTC
\eTR
\bTR
\bTC A \eTC
\bTC B \eTC
\eTR
\bTR
\bTC A \eTC
\bTC B \eTC
\eTR
\bTR
\bTC A \eTC
\bTC B \eTC
\eTR
\bTR
\bTC A \eTC
\bTC B \eTC
\eTR
\bTR
\bTC A \eTC
\bTC B \eTC
\eTR
\bTR
\bTC A \eTC
\bTC B \eTC
\eTR
\bTR
\bTC A \eTC
\bTC B \eTC
\eTR
\bTR
\bTC A \eTC
\bTC B \eTC
\eTR
\bTR
\bTC A \eTC
\bTC B \eTC
\eTR
\bTR
\bTC A \eTC
\bTC B \eTC
\eTR
\bTR
\bTC A \eTC
\bTC B \eTC
\eTR
\bTR
\bTC A \eTC
\bTC B \eTC
\eTR
\bTR
\bTC A \eTC
\bTC B \eTC
\eTR
\bTR
\bTC A \eTC
\bTC B \eTC
\eTR
\bTR
\bTC A \eTC
\bTC B \eTC
\eTR
\eTABLEbody
\eTABLE
} 

\stoptext
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] natural table splitting problems

2007-10-29 Thread Santy, Michael

In our XML-ConTeXt-PDF workflow, we've encountered a few intermittent 
problems when using split natural tables.  I'm not able to post the original 
documents in which the problems are manifesting, but below is a document that 
reproduces one of the problems.  The first page of the document is full of 
text, pushing a split natural table with five rows and a header to the top of 
the second page.  However, only the first row appears on the second page, and 
the rest of the table is continued on the third page. 

I'm using a stock ConTeXt 9/28 distribution, but this problem can also be 
reproduced on live.contextgarden.net.

Can someone please tell me what I'm doing wrong or help me debug this problem?  
These natural table bugs are the only thing stopping us from deploying our 
ConTeXt workflow.

Cheers,
Mike Santy


\setuppapersize[letter][letter]

\showframe

\starttext

\def\blah{
  Now is the time for all good men to come to the aid of their %
  country.  The quick brown fox jumped over the lazy dog.
}
\dorecurse{28}{\blah}

\placetable[split]{Broken Split Table}{
\setupTABLE[split=repeat]
\bTABLE
\bTABLEhead
  \bTR[style=\bf]
\bTD Header A \eTD
\bTD Header B \eTD
  \eTR
\eTABLEhead
\bTABLEbody
  \dorecurse{5}{
\bTR
  \bTD A \eTD
  \bTD B \eTD
\eTR
  }
\eTABLEbody
\eTABLE
}

\stoptext
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] natural table splitting problems

2007-10-29 Thread Peter Rolf
Santy, Michael schrieb:
 
 In our XML-ConTeXt-PDF workflow, we've encountered a few intermittent
 problems when using split natural tables.  I'm not able to post the
 original documents in which the problems are manifesting, but below is a
 document that reproduces one of the problems.  The first page of the
 document is full of text, pushing a split natural table with five rows
 and a header to the top of the second page.  However, only the first row
 appears on the second page, and the rest of the table is continued on
 the third page.
 
 I'm using a stock ConTeXt 9/28 distribution, but this problem can also
 be reproduced on live.contextgarden.net.
 
 Can someone please tell me what I'm doing wrong or help me debug this
 problem?  These natural table bugs are the only thing stopping us from
 deploying our ConTeXt workflow.
 
 Cheers,
 Mike Santy
 
 
 \setuppapersize[letter][letter]
 
 \showframe
 
 \starttext
 
 \def\blah{
   Now is the time for all good men to come to the aid of their %
   country.  The quick brown fox jumped over the lazy dog.
 }
 \dorecurse{28}{\blah}
 
 \placetable[split]{Broken Split Table}{
 \setupTABLE[split=repeat]
 \bTABLE
 \bTABLEhead
   \bTR[style=\bf]
 \bTD Header A \eTD

  \bTH  \eTH % this is emphasized twice in the wiki example


BTW: You have the possibility to answer to replies, like

... your answer doen't help  or
... I don't understand what you mean

Simply reposting the same question is bad behaviour. Not that clever if
you want an answer.

Peter

 \bTD Header B \eTD
   \eTR
 \eTABLEhead
 \bTABLEbody
   \dorecurse{5}{
 \bTR
   \bTD A \eTD
   \bTD B \eTD
 \eTR
   }
 \eTABLEbody
 \eTABLE
 }
 
 \stoptext
 
 
 
 
 ___
 If your question is of interest to others as well, please add an entry to the 
 Wiki!
 
 maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
 webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
 archive  : https://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net
 ___

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] [Fwd: natural table splitting problems]

2007-10-29 Thread Hans Hagen


--

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

I've tried to post this to the list several times, but it doesn't show up...

In our XML-ConTeXt-PDF workflow, we've encountered a few intermittent 
problems when using split natural tables.  I'm not able to post the original 
documents in which the problems are manifesting, but below is a document that 
reproduces one of the problems.  The first page of the document is full of 
text, pushing a split natural table with five rows and a header to the top of 
the second page.  However, only the first row appears on the second page, and 
the rest of the table is continued on the third page.

I'm using a stock ConTeXt 9/28 distribution, but this problem can also be 
reproduced on live.contextgarden.net.

Can someone please tell me what I'm doing wrong or help me debug this problem?  
These natural table bugs are the only thing stopping us from deploying our 
ConTeXt workflow.

Cheers,
Mike Santy


\setuppapersize[letter][letter]

\showframe

\starttext

\def\blah{
  Now is the time for all good men to come to the aid of their %
  country.  The quick brown fox jumped over the lazy dog.
}
\dorecurse{28}{\blah}

\placetable[split]{Broken Split Table}{
\setupTABLE[split=repeat]
\bTABLE
\bTABLEhead
  \bTR[style=\bf]
\bTD Header A \eTD
\bTD Header B \eTD
  \eTR
\eTABLEhead
\bTABLEbody
  \dorecurse{5}{
\bTR
  \bTD A \eTD
  \bTD B \eTD
\eTR
  }
\eTABLEbody
\eTABLE
}

\stoptext
---End Message---
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] natural table splitting bug

2007-10-26 Thread Santy, Michael
In our XML-ConTeXt-PDF workflow, we've encountered a few intermittent 
problems when using split natural tables.  I'm not able to post the original 
documents in which the problems are manifesting, but below is a document that 
reproduces one of the problems.  The first page of the document is full of 
text, pushing a split natural table with five rows and a header to the top of 
the second page.  However, only the first row appears on the second page, and 
the rest of the table is continued on the third page.  

I'm using a stock ConTeXt 9/28 distribution, but this problem can also be 
reproduced on live.contextgarden.net. 

Can someone please tell me what I'm doing wrong or help me debug this problem?  
These natural table bugs are the only thing stopping us from deploying our 
ConTeXt workflow.

Cheers,
Mike Santy


\setuppapersize[letter][letter]

\showframe

\starttext

\def\blah{
  Now is the time for all good men to come to the aid of their %
  country.  The quick brown fox jumped over the lazy dog.
}
\dorecurse{28}{\blah}

\placetable[split]{Broken Split Table}{
\setupTABLE[split=repeat]
\bTABLE
\bTABLEhead
  \bTR[style=\bf]
\bTD Header A \eTD
\bTD Header B \eTD
  \eTR
\eTABLEhead
\bTABLEbody
  \dorecurse{5}{
\bTR
  \bTD A \eTD
  \bTD B \eTD
\eTR
  }
\eTABLEbody
\eTABLE
}

\stoptext
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] natural table splitting bug

2007-10-26 Thread Peter Rolf
Hi Michael,

Santy, Michael schrieb:
 In our XML-ConTeXt-PDF workflow, we've encountered a few intermittent
 problems when using split natural tables.  I'm not able to post the
 original documents in which the problems are manifesting, but below is a
 document that reproduces one of the problems.  The first page of the
 document is full of text, pushing a split natural table with five rows
 and a header to the top of the second page.  However, only the first row
 appears on the second page, and the rest of the table is continued on
 the third page. 
 
 I'm using a stock ConTeXt 9/28 distribution, but this problem can also
 be reproduced on live.contextgarden.net.
 
 Can someone please tell me what I'm doing wrong or help me debug this
 problem?  These natural table bugs are the only thing stopping us from
 deploying our ConTeXt workflow.
 
 Cheers,
 Mike Santy
 
 
 \setuppapersize[letter][letter]
 
 \showframe
 
 \starttext
 
 \def\blah{

the 'error' is already on the first page (text expands over it's lower
border).

Simply try

  \def\blah{%

and see what happens. Spurious spaces can be cruel :)


Best wishes, Peter

   Now is the time for all good men to come to the aid of their %
   country.  The quick brown fox jumped over the lazy dog.
 }
 \dorecurse{28}{\blah}
 
 \placetable[split]{Broken Split Table}{
 \setupTABLE[split=repeat]
 \bTABLE
 \bTABLEhead
   \bTR[style=\bf]
 \bTD Header A \eTD
 \bTD Header B \eTD
   \eTR
 \eTABLEhead
 \bTABLEbody
   \dorecurse{5}{
 \bTR
   \bTD A \eTD
   \bTD B \eTD
 \eTR
   }
 \eTABLEbody
 \eTABLE
 }
 
 \stoptext
 
 
 
 
 ___
 If your question is of interest to others as well, please add an entry to the 
 Wiki!
 
 maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
 webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
 archive  : https://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net
 ___

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] split rotated TABLE

2007-05-31 Thread Henning Hraban Ramm
This was asked, but not answered before...

I've a big TABLE that needs to be rotated to fit width, but must  
break over two or three pages.
Caption should stay horizontally (but that's not important).

I tried several attempts, some didn't display anything, none breaks  
the table, e.g.:

\placetable[here,90][tab:religionen]{Götter}%
{\framed[width=\textheight, height=\textwidth]{\getbuffer[tab- 
religionen]}}
% rotation included in the placetable parameters; with page instead  
of here it didn't display anything.

% another failed attempt:
\rotate[width=\textheight, height=\textwidth, rotation=90]{%
\placetable[here][tab:religionen]{Götter}{\getbuffer[tab-religionen]}%
}

As you can guess, the whole table is in a buffer:

\startbuffer[tab-religionen]
\bTABLE[split=repeat]
\bTABLEhead
\bTR[bottomframe=on]\bTH Land \eTH\bTH Aspekt \eTH\bTH Aspekt \eTH 
\bTH Aspekt \eTH\bTH Aspekt \eTH\bTH Aspekt \eTH\bTH Aspekt \eTH\bTH  
Aspekt \eTH\bTH Aspekt  \eTH\eTR
\eTABLEhead
\bTABLEbody
...

\bTABLE[width=\textheight] sets the width of the first column to  
\textheight - WHY?


Greetlings from Lake Constance!
Hraban
---
http://www.fiee.net/texnique/
http://wiki.contextgarden.net
https://www.cacert.org (I'm an assurer)

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] split rotated TABLE

2007-05-31 Thread Wolfgang Schuster
On Thu, 31 May 2007 16:58:11 +0200
Henning Hraban Ramm [EMAIL PROTECTED] wrote:

 This was asked, but not answered before...

Hi Hraban,

I can currently solve a few of your problem but not all at the moment,
spliting tables seems to be only implemented for tables with normal
orientation and not for rotated ones.

 I've a big TABLE that needs to be rotated to fit width, but must  
 break over two or three pages.
 Caption should stay horizontally (but that's not important).

Setting  the column width but my solution below produce a big offset
(difference between textheight and textwidth) at the bottom.

I have to look also how one place the caption below the table and not
on the right side.

 I tried several attempts, some didn't display anything, none breaks  
 the table, e.g.:
 
 \placetable[here,90][tab:religionen]{Götter}%
 {\framed[width=\textheight, height=\textwidth]{\getbuffer[tab- 
 religionen]}}
 % rotation included in the placetable parameters; with page instead  
 of here it didn't display anything.

Text in frame will never be broken, it is more or less a clever \vbox
with a few positioning commands. Each TABLE cell is also a \framed box
and caanot be broken. 

 % another failed attempt:
 \rotate[width=\textheight, height=\textwidth, rotation=90]{%
 \placetable[here][tab:religionen]{Götter}{\getbuffer[tab-religionen]}%
 }
 
 As you can guess, the whole table is in a buffer:
 
 \startbuffer[tab-religionen]
 \bTABLE[split=repeat]
 \bTABLEhead
 \bTR[bottomframe=on]\bTH Land \eTH\bTH Aspekt \eTH\bTH Aspekt \eTH 
 \bTH Aspekt \eTH\bTH Aspekt \eTH\bTH Aspekt \eTH\bTH Aspekt \eTH\bTH  
 Aspekt \eTH\bTH Aspekt\eTH\eTR
 \eTABLEhead
 \bTABLEbody
 ...
 
 \bTABLE[width=\textheight] sets the width of the first column to  
 \textheight - WHY?

width is the width from one cell in a TABLE, it is a abbreviation for
\framed[width=...], you are looking for textwidth=...

 Greetlings from Lake Constance!
 Hraban

You can start with my example below as a workaround til table
splitting a corrected in main files. 

\showframe

\starttext

\dorecurse{10}{\input knuth\relax}

\start

\textheight\textwidth

\page

\placetable
  [90,split]
  [tab:religionen]
  {Götter}
  {\bTABLE[width=5cm]
   \dorecurse{100}{\bTR\bTD Text\eTD\eTR}
   \eTABLE}

\stop

\dorecurse{10}{\input knuth\relax}

\stoptext


Greetings from Ingolstadt

Wolfgang
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Headers for natural tables.

2007-03-06 Thread Wolfgang Schuster
On Mon,  5 Mar 2007 11:24:23 -0800
JOHN CULLETON [EMAIL PROTECTED] wrote:

 I hve determined by trial and error that the multiline feature [nr=2] of 
 Natural Tables does not work well, if at all, in the TABLEhead area. But the 
 TABLEhead area is necessary for readable split tables. Currently I use single 
 lines in the header area and suppress some of the rules to create a multiline 
 effect thus: 

Hi John,

 
 \bTABLE [option=stretch,split=repeat]
 \setupTABLE[r][1][height=0cm,width=0cm,frame=off]
 \setupTABLE[c][1][width=1.7in]
 \setupTABLE[r][2][bottomframe=off]
 \setupTABLE[r][3][topframe=off]
 \bTABLEhead
 \bTR  %dummy row
 \bTH \eTH
 \bTH \eTH
 \bTH \eTH
 \eTR
 \bTR %first visible row
 \bTH  
 {\bf Investment} \eTH

\bTH .. \eTH is only a abbreviation for \bTD[style=bold] ... \eTD, this
means your \bf is not neccessary.

 \bTH 
 {\bf Portfolio } \eTH
 \bTH 
 {\bf Average Stock } \eTH
 \eTR
 \bTR
 \bTH  
 {\bf Category} \eTH
 \bTH 
 {\bf Allocation} \eTH
 \bTH 
 {\bf  Market Exposure} \eTH
 \eTR
 \eTABLEhead
 ...
 This example also uses the (apparently) obligatory dummy row as described by 
 others.
 
 Natural Tables have been around for a while. It is unfortunate that no one 
 has come up with a real manual for these tables. All that exists are learn 
 by example documents, which do not describe limitations such as the one I 
 worked around in the above code. 
 
 
 John Culleton
 

I rewrote your example in a better way

\starttext

\bTABLE [option=stretch,split=repeat]
\setupTABLE[c][first][width=1.7in]
\setupTABLE[r][first][style=bold]
\bTABLEhead
  \bTR
\bTD Investment\\ Category \eTD
\bTD Portfolio\\ Allocation \eTD
\bTD Average Stock\\ Market Exposure \eTD
  \eTR
\eTABLEhead
\bTABLEbody
  \dorecurse{100}{\bTR\bTD text \eTD\bTD text \eTD\bTD text \eTD\eTR}
\eTABLEbody
\eTABLE

\stoptext

Wolfgang
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Headers for natural tables.

2007-03-05 Thread JOHN CULLETON
I hve determined by trial and error that the multiline feature [nr=2] of 
Natural Tables does not work well, if at all, in the TABLEhead area. But the 
TABLEhead area is necessary for readable split tables. Currently I use single 
lines in the header area and suppress some of the rules to create a multiline 
effect thus: 

\bTABLE [option=stretch,split=repeat]
\setupTABLE[r][1][height=0cm,width=0cm,frame=off]
\setupTABLE[c][1][width=1.7in]
\setupTABLE[r][2][bottomframe=off]
\setupTABLE[r][3][topframe=off]
\bTABLEhead
\bTR  %dummy row
\bTH \eTH
\bTH \eTH
\bTH \eTH
\eTR
\bTR %first visible row
\bTH  
{\bf Investment} \eTH
\bTH 
{\bf Portfolio } \eTH
\bTH 
{\bf Average Stock } \eTH
\eTR
\bTR
\bTH  
{\bf Category} \eTH
\bTH 
{\bf Allocation} \eTH
\bTH 
{\bf  Market Exposure} \eTH
\eTR
\eTABLEhead
...
This example also uses the (apparently) obligatory dummy row as described by 
others.

Natural Tables have been around for a while. It is unfortunate that no one has 
come up with a real manual for these tables. All that exists are learn by 
example documents, which do not describe limitations such as the one I worked 
around in the above code. 


John Culleton


_
Need personalized email and website? Look no further. It's easy
with Doteasy $0 Web Hosting! Learn more at www.doteasy.com
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Natural table header limitation.

2007-02-25 Thread Peter Rolf
JOHN CULLETON wrote:
 The fancy tricks one can to with Natural Tables seem to work within 
 the body of the table where I don't need them but fail in the header 
 area where I do need them.
 
 This example, takein from the wiki, works (of course.)
 
 \setupTABLE[row][odd][background=color,backgroundcolor=red, 
 width=.2\textwidth]
 \bTABLE[split=yes]
 \bTR \bTD[nr=3] 1 \eTD \bTD[nc=2] 2/3 \eTD \bTD[nr=3] 4 \eTD \eTR
 \bTR \bTD 2 \eTD \bTD 3 \eTD \eTR
 \bTR \bTD 2 \eTD \bTD 3 \eTD \eTR
 \bTR \bTD[nc=3] 1/2/3 \eTD \bTD 4 \eTD \eTR
 \bTR \bTD 1 \eTD \bTD 2 \eTD \bTD 3 \eTD \bTD 4 \eTD \eTR
 \eTABLE
 
 But if I convert the above data items to header items the run fails. 
 Specifically the following fails:
 \setupTABLE[row][odd][background=color,backgroundcolor=red, 
 width=.2\textwidth]
 \bTABLE[split=yes]
 \bTABLEhead
 \bTR \bTH[nr=3] 1 \eTH \bTH[nc=2] 2/3 \eTH \bTH[nr=3] 4 \eTH \eTR
 \bTR \bTH 2 \eTH \bTH 3 \eTH \eTR
 \bTR \bTH 2 \eTH \bTH 3 \eTH \eTR
 \bTR \bTH[nc=3] 1/2/3 \eTH \bTH 4 \eTH \eTR
 \bTR \bTH 1 \eTH \bTH 2 \eTH \bTH 3 \eTH \bTH 4 \eTH \eTR
 \eTABlehead
  
size matters ;)


Best, Peter

 \eTABLE
 
 What did I miss?
 Here is the error message:
 bTR \bTH [nr=3] 1 \eTH \bTH [nc=2] 2/3 \eTH \bTH [nr=3] 4 \eTH \eTR 
 \ETC.
 ! File ended while scanning use of \doTABLEhead.
 inserted text
 \par
 * tabletest.tex
   emergencyend
 ? 
 -
 
 
 

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Limitation on natural tables.

2007-02-25 Thread Wolfgang Schuster
On Sat, 24 Feb 2007 19:11:58 -0500
John R. Culleton [EMAIL PROTECTED] wrote:

 The fancy tricks one can to with Natural Tables seem to work within 
 the body of the table where I don't need them but fail in the header 
 area where I do need them.
 
 This example, takein from the wiki, works (of course.)
 
 \setupTABLE[row][odd][background=color,backgroundcolor=red, 
 width=.2\textwidth]
 \bTABLE[split=yes]
 \bTR \bTD[nr=3] 1 \eTD \bTD[nc=2] 2/3 \eTD \bTD[nr=3] 4 \eTD \eTR
 \bTR \bTD 2 \eTD \bTD 3 \eTD \eTR
 \bTR \bTD 2 \eTD \bTD 3 \eTD \eTR
 \bTR \bTD[nc=3] 1/2/3 \eTD \bTD 4 \eTD \eTR
 \bTR \bTD 1 \eTD \bTD 2 \eTD \bTD 3 \eTD \bTD 4 \eTD \eTR
 \eTABLE
 
 But if I convert the above data items to header items the run fails. 
 Specifically the following fails:
 \setupTABLE[row][odd][background=color,backgroundcolor=red, 
 width=.2\textwidth]
 \bTABLE[split=yes]
 \bTABLEhead
 \bTR \bTH[nr=3] 1 \eTH \bTH[nc=2] 2/3 \eTH \bTH[nr=3] 4 \eTH \eTR
 \bTR \bTH 2 \eTH \bTH 3 \eTH \eTR
 \bTR \bTH 2 \eTH \bTH 3 \eTH \eTR
 \bTR \bTH[nc=3] 1/2/3 \eTH \bTH 4 \eTH \eTR
 \bTR \bTH 1 \eTH \bTH 2 \eTH \bTH 3 \eTH \bTH 4 \eTH \eTR
 \eTABlehead

Hi John,

there is a typo in your file. It should be \eTABLEhead and not
\eTablehead (TABLE is always written uppercase).

BTW there is a parameter style that can be used to switch to another
font for the whole table or for the cells of your choice instead of
the \bTH ... \eTH cells.

Wolfgang

 \eTABLE
 
 What did I miss?
 Here is the error message:
 bTR \bTH [nr=3] 1 \eTH \bTH [nc=2] 2/3 \eTH \bTH [nr=3] 4 \eTH \eTR 
 \ETC.
 ! File ended while scanning use of \doTABLEhead.
 inserted text
 \par
 * tabletest.tex
   emergencyend
 ? 
 -
 
 
 
 -- 
 John Culleton
 Able Indexing and Typesetting
 Precision typesetting (tm) at reasonable cost.
 Satisfaction guaranteed. 
 http://wexfordpress.com
 
 ___
 ntg-context mailing list
 ntg-context@ntg.nl
 http://www.ntg.nl/mailman/listinfo/ntg-context
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Natural table header limitation.

2007-02-24 Thread JOHN CULLETON
The fancy tricks one can to with Natural Tables seem to work within 
the body of the table where I don't need them but fail in the header 
area where I do need them.

This example, takein from the wiki, works (of course.)

\setupTABLE[row][odd][background=color,backgroundcolor=red, 
width=.2\textwidth]
\bTABLE[split=yes]
\bTR \bTD[nr=3] 1 \eTD \bTD[nc=2] 2/3 \eTD \bTD[nr=3] 4 \eTD \eTR
\bTR \bTD 2 \eTD \bTD 3 \eTD \eTR
\bTR \bTD 2 \eTD \bTD 3 \eTD \eTR
\bTR \bTD[nc=3] 1/2/3 \eTD \bTD 4 \eTD \eTR
\bTR \bTD 1 \eTD \bTD 2 \eTD \bTD 3 \eTD \bTD 4 \eTD \eTR
\eTABLE

But if I convert the above data items to header items the run fails. 
Specifically the following fails:
\setupTABLE[row][odd][background=color,backgroundcolor=red, 
width=.2\textwidth]
\bTABLE[split=yes]
\bTABLEhead
\bTR \bTH[nr=3] 1 \eTH \bTH[nc=2] 2/3 \eTH \bTH[nr=3] 4 \eTH \eTR
\bTR \bTH 2 \eTH \bTH 3 \eTH \eTR
\bTR \bTH 2 \eTH \bTH 3 \eTH \eTR
\bTR \bTH[nc=3] 1/2/3 \eTH \bTH 4 \eTH \eTR
\bTR \bTH 1 \eTH \bTH 2 \eTH \bTH 3 \eTH \bTH 4 \eTH \eTR
\eTABlehead
\eTABLE

What did I miss?
Here is the error message:
bTR \bTH [nr=3] 1 \eTH \bTH [nc=2] 2/3 \eTH \bTH [nr=3] 4 \eTH \eTR 
\ETC.
! File ended while scanning use of \doTABLEhead.
inserted text
\par
* tabletest.tex
  emergencyend
? 
-



-- 
John Culleton


_
Need personalized email and website? Look no further. It's easy
with Doteasy $0 Web Hosting! Learn more at www.doteasy.com
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Limitation on natural tables.

2007-02-24 Thread John R. Culleton
The fancy tricks one can to with Natural Tables seem to work within 
the body of the table where I don't need them but fail in the header 
area where I do need them.

This example, takein from the wiki, works (of course.)

\setupTABLE[row][odd][background=color,backgroundcolor=red, 
width=.2\textwidth]
\bTABLE[split=yes]
\bTR \bTD[nr=3] 1 \eTD \bTD[nc=2] 2/3 \eTD \bTD[nr=3] 4 \eTD \eTR
\bTR \bTD 2 \eTD \bTD 3 \eTD \eTR
\bTR \bTD 2 \eTD \bTD 3 \eTD \eTR
\bTR \bTD[nc=3] 1/2/3 \eTD \bTD 4 \eTD \eTR
\bTR \bTD 1 \eTD \bTD 2 \eTD \bTD 3 \eTD \bTD 4 \eTD \eTR
\eTABLE

But if I convert the above data items to header items the run fails. 
Specifically the following fails:
\setupTABLE[row][odd][background=color,backgroundcolor=red, 
width=.2\textwidth]
\bTABLE[split=yes]
\bTABLEhead
\bTR \bTH[nr=3] 1 \eTH \bTH[nc=2] 2/3 \eTH \bTH[nr=3] 4 \eTH \eTR
\bTR \bTH 2 \eTH \bTH 3 \eTH \eTR
\bTR \bTH 2 \eTH \bTH 3 \eTH \eTR
\bTR \bTH[nc=3] 1/2/3 \eTH \bTH 4 \eTH \eTR
\bTR \bTH 1 \eTH \bTH 2 \eTH \bTH 3 \eTH \bTH 4 \eTH \eTR
\eTABlehead
\eTABLE

What did I miss?
Here is the error message:
bTR \bTH [nr=3] 1 \eTH \bTH [nc=2] 2/3 \eTH \bTH [nr=3] 4 \eTH \eTR 
\ETC.
! File ended while scanning use of \doTABLEhead.
inserted text
\par
* tabletest.tex
  emergencyend
? 
-



-- 
John Culleton
Able Indexing and Typesetting
Precision typesetting (tm) at reasonable cost.
Satisfaction guaranteed. 
http://wexfordpress.com

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Natural table header mystery.

2007-02-21 Thread Wolfgang Schuster

Hi John,

2007/2/20, John R. Culleton [EMAIL PROTECTED]:


The table runs ok with the headers omitted. There are 8 columns. But
when I add these headers it gives me an error. Here are the headers:

-
\bTABLEhead
\bTR
\bTD \eTD \bTD \eTD \bTD \eTD \bTD \eTD
\bTD \eTD \bTD \eTD \bTD \eTD \bTD \eTD
\eTR



what do you want with this empty row

\bTR %% ROW 1

\bTD



delete this \bTD, there is the \eTD missing and it created a 9th column

\bTD[nc=2,nr=3]  BUY SIGNAL  \eTD

\bTD [nc=2 nr=3]   SELL SIGNAL  \eTD
\bTD [nr=3]   \eTD
\bTD  [nr=3]\$100,000  \eTD
\bTD  [nc=2,nr=3]FULLY INVESTED AT ALL TIMES (BUY \ HOLD)  \eTD



if you need a different height for your second row use the table parameters
\setupTABLE[r][2][height=xxx] or in the second row diretly
\bTR[height=xxx] \bTD ... \eTD \eTR

\eTR

\eTABLEhead
-
And here is the error message, relating to a nonexistent (in my
code) } character.


! Argument of \parseTD has an extra }.
inserted text
   \par
to be read again
  }
\handleTBLcell ...\bTBLCELL \TBLcharalign {#2}{#4}
 \eTBLCELL \inTBLcell
{#1}{...
inserted text ...ow \begintblrow \makeTBL {2}{1}
 \nexttblcol \makeTBL
{2}{2...

\endTBL ...x {\trialtypesettingtrue \the \tbltoks
 }\settbldis
\maximumcol {\...

\eTABLE ...}}\eTBL }\removeunwantedspaces \endTBL
 \stopTBLprocessing
\fi \eg...
l.1197 \eTABLE
-
I could reproduce the entire table but it is hundreds of lines.



you can use long examples with lots of dummy rows in the following way

\bTABLE
\dorecurse{100}{\bTR\bTD text \eTD\eTR}
\eTABLE

Wolfgang
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Natural table header mystery.

2007-02-20 Thread Peter Rolf
Hi John,

John R. Culleton wrote:
 The table runs ok with the headers omitted. There are 8 columns. But 
 when I add these headers it gives me an error. Here are the headers:
 -
 \bTABLEhead
 \bTR
 \bTD \eTD \bTD \eTD \bTD \eTD \bTD \eTD 
 \bTD \eTD \bTD \eTD \bTD \eTD \bTD \eTD 
 \eTR
 \bTR %% ROW 1
 \bTD
 \bTD[nc=2,nr=3]  BUY SIGNAL  \eTD
 \bTD [nc=2 nr=3]   SELL SIGNAL  \eTD
 \bTD [nr=3]   \eTD
 \bTD  [nr=3]\$100,000  \eTD
 \bTD  [nc=2,nr=3]FULLY INVESTED AT ALL TIMES (BUY \ HOLD)  \eTD
 \eTR
 \eTABLEhead

see

http://wiki.contextgarden.net/TABLE#Multipage_TABLEs

Every head column is enclosed by a \bTH .. \eTH pair.


Greetings, Peter

 -
 And here is the error message, relating to a nonexistent (in my 
 code) } character.
 
 ! Argument of \parseTD has an extra }.
 inserted text
 \par
 to be read again
}
 \handleTBLcell ...\bTBLCELL \TBLcharalign {#2}{#4}
   \eTBLCELL \inTBLcell 
 {#1}{...
 inserted text ...ow \begintblrow \makeTBL {2}{1}
   \nexttblcol \makeTBL 
 {2}{2...
 
 \endTBL ...x {\trialtypesettingtrue \the \tbltoks
   }\settbldis 
 \maximumcol {\...
 
 \eTABLE ...}}\eTBL }\removeunwantedspaces \endTBL
   \stopTBLprocessing 
 \fi \eg...
 l.1197 \eTABLE
 -
 I could reproduce the entire table but it is hundreds of lines. 
 
 
 

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] rotate a TABLE

2007-01-14 Thread Gerhard Kugler
On Sat, Jan 13, 2007 at 12:02:43PM +0100, Henning Hraban Ramm wrote:
 
 What's wrong with \rotate{your table} ?

Thanks Henning.

But now I still have a problem. The TABLE covers a whole page. This
page should habe a colored background (grey). I get the background,
but shifted. It begins (vertically) a line before the table and ends a
line before the end of the table.

\startbackground
\rotate[rotation=270]{
\setupTABLE[width=\textheight, height=\textwidth]
\setupTABLE[r][each][height=0.13\textwidth]
\setupTABLE[r][1,2][align=lohi, height=0.06\textwidth]
\setupTABLE[c][1,2,3,4][width=0.15\textheight]
\setupTABLE[c][5][width=0.4\textheight]
\bTABLE
\bTABLEhead
\bTR
   \bTH[nc=5] \midaligned{Übung: Einschätzung der eigenen Erfahrung: Prüfen, 
was wirkungsvoll ist} \eTH
\eTR
\eTABLEhead
\switchtobodyfont[small]
\bTABLEbody
\bTR
.
\bTR
   \bTD[m=5] \eTD
\eTR
\eTABLEbody
\eTABLE
}
\stopbackground


Gerhard

-- 
Gerhard Kugler
Psychotherapeut
http://www.psychotherapie-kugler.de
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] rotate a TABLE

2007-01-14 Thread Mojca Miklavec
On 1/14/07, Gerhard Kugler wrote:
 On Sat, Jan 13, 2007 at 12:02:43PM +0100, Henning Hraban Ramm wrote:
 
  What's wrong with \rotate{your table} ?

 Thanks Henning.

 But now I still have a problem. The TABLE covers a whole page. This
 page should habe a colored background (grey). I get the background,
 but shifted. It begins (vertically) a line before the table and ends a
 line before the end of the table.

 \startbackground
 \rotate[rotation=270]{

It helps if you place a '%' at the end, so
\rotate[rotation=270]{%
and similar to the rest of lines which don't end with a command

 \setupTABLE[width=\textheight, height=\textwidth]
 \setupTABLE[r][each][height=0.13\textwidth]
 \setupTABLE[r][1,2][align=lohi, height=0.06\textwidth]
 \setupTABLE[c][1,2,3,4][width=0.15\textheight]
 \setupTABLE[c][5][width=0.4\textheight]
 \bTABLE
 \bTABLEhead
 \bTR
\bTH[nc=5] \midaligned{Übung: Einschätzung der eigenen Erfahrung: Prüfen, 
 was wirkungsvoll ist} \eTH
 \eTR
 \eTABLEhead
 \switchtobodyfont[small]
 \bTABLEbody
 \bTR
 .

this \bTR hopefully doesn't end here?

 \bTR
\bTD[m=5] \eTD
 \eTR
 \eTABLEbody
 \eTABLE
 }
 \stopbackground

It might look like a bug (it depends, if you have whitespace, then
the table will be shifted one line down, I have no idea how the
background should look like in such cases), but perhaps something like
\setupTABLE[c][each][background=screen] (or
background=color,backgroundcolor=...)
can help you?

Mojca
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] rotate a TABLE

2007-01-14 Thread Peter Rolf
Hi Gerhard,

Gerhard Kugler wrote:
 On Sat, Jan 13, 2007 at 12:02:43PM +0100, Henning Hraban Ramm wrote:
 What's wrong with \rotate{your table} ?
 
 Thanks Henning.
 
 But now I still have a problem. The TABLE covers a whole page. This
 page should habe a colored background (grey). I get the background,
 but shifted. It begins (vertically) a line before the table and ends a
 line before the end of the table.
 
 \startbackground
 \rotate[rotation=270]{
 \setupTABLE[width=\textheight, height=\textwidth]
 \setupTABLE[r][each][height=0.13\textwidth]
 \setupTABLE[r][1,2][align=lohi, height=0.06\textwidth]
 \setupTABLE[c][1,2,3,4][width=0.15\textheight]
 \setupTABLE[c][5][width=0.4\textheight]

The shift is caused by the \setupTABLE commands (ends with ], so the
line break becomes active and adds one space). You can add a comment
symbol at the end of every such line or move the whole setup part out of
the rotate macro. I also used \framed here, as \st(art|op)background
still has some spurious space at the end of the table.

% - - - - - - - - - -
\setupoutput[pdftex]
\setupcolors[state=start]

\starttext

\setupTABLE[width=\textheight, height=\textwidth]
\setupTABLE[r][each][height=0.13\textwidth]
\setupTABLE[r][1,2][align=lohi, height=0.06\textwidth]
\setupTABLE[c][1,2,3,4][width=0.15\textheight]
\setupTABLE[c][5][width=0.4\textheight]

\rotate[rotation=270]
{\framed[offset=overlay,frame=off,background=color,backgroundcolor=lightgray]\bgroup
%\startbackground
\bTABLE
\bTABLEhead
\bTR
   \bTH[nc=5] \midaligned{Übung: Einschätzung der eigenen Erfahrung:
Prüfen, was wirkungsvoll ist} \eTH
\eTR
\eTABLEhead
\switchtobodyfont[small]
\bTABLEbody
\bTR
   \bTD[m=5] \eTD
\eTR
\eTABLEbody
\eTABLE
%\stopbackground
\egroup % \framed
}

\stoptext


Greetings, Peter

 \bTABLE
 \bTABLEhead
 \bTR
\bTH[nc=5] \midaligned{Übung: Einschätzung der eigenen Erfahrung: Prüfen, 
 was wirkungsvoll ist} \eTH
 \eTR
 \eTABLEhead
 \switchtobodyfont[small]
 \bTABLEbody
 \bTR
 .
 \bTR
\bTD[m=5] \eTD
 \eTR
 \eTABLEbody
 \eTABLE
 }
 \stopbackground
 
 
 Gerhard
 

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Templates and official documents

2006-09-16 Thread Willi Egger

Hi Jorge,

In order to fit a table on one page one can put the table into a buffer 
and issue the \placetable command, which enables you tou provide a 
height. In fact you include the table as a float.
Because the TeacherDate line occurs on each page, this can be put 
into a footerline.


About your question concerning the amplification of the interlinespace I 
have no appropriate answer. I do not know whether you have comman= 
option where you could give instructions like \setupinterlinespace.


Kind regards

Willi

batela wrote:

Hi Willi

Tanks a lot for your suggestions, but I need some additional 
assistance. With the code in attach my  final document have 4 pages, 
but I need to fit all information in only 2 pages. In each page I need 
to include the logo, the unit name, the school name, the table, the 
teacher name and the date.   If the table is to large, then the table 
will be splited.


I have an additional question for you: are there a way to amplified 
the interline space only in the columns 3,4 and 5 of the table?


 Thanks alot
Jorge

Em 15/09/2006, às 5:00, Willi Egger escreveu:


Hi Jorge,

May be you want much more, but based on your information you could do
something like this:

setuppapersize[A4,landscape][A4,landscape]
\setupcolors[state=start]

\setuplayout
[tospace = 2cm,
backspace=2.5cm,
headerdistance=3\bodyfontsize,
margin=2cm,
width=fit]

\definelogo[Schoollogo]
[top]
[leftmargin]

[command={\framedtext[width=\marginwidth,background=color,backgroundcolor=red]{School 


logo}},state=start]

\setupheadertexts[\hfill{\bfa This is our School Name}\hfill]

\starttext
\placelogos
\startalignment[middle]
\cap{unit}: (changing each page)
\stopalignment
\blank

\bTABLE
\setupTABLE[column][1][width=.9\textwidth]
\bTR
\bTD a table with several columns and several rows \eTD
\eTR
\dorecurse{10}{\bTR \bTD more rows \eTD \eTR}
\eTABLE
\vfill
\starttabulate[|l|lw(5cm)|l|]
\NC Teacher name\EQ \NC Date\EQ\NR
\stoptabulate
\stoptext


Willi

batela wrote:

Dear Sirs

I'm a teacher in a secondary school and I need to prepare some
planifications for my class. Until now Word can do the job but I'm
think that ConTexT can do better. The scheme of the layout of my
document is:

|--- 


- |
| logo School Name
|
|
 |
| UNIT: (changing in each page)   |
|
  |
|  |---|
  |
|  |   a table with several coluns|
 |
|  |  and several rows
| |
|  |---|
  |
|
  |
|  Teacher name: Date:
   |
|_|


The paper are in landscape orientation and in each page I need to
represent several elements, like: logo, school name, space for the unit
designation, teacher name, date and signatures.

My main question is: is there any way to prepare this kind of documents
in Context? Examples are welcome.

Thanks a lot

Have a nice day

jorge

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context



Um Abraço,

Jorge Magalhães


___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context
  
\language[pt]
\enableregime[latin11]
% \enableregime[windows]
\loadmapfile[context-base]
\setupcolors[state=start]
\definelogo[Schoollogo]
[top]
[leftmargin]

[command={\framedtext[width=\marginwidth,background=color,backgroundcolor=red]{Schoollogo}},state=start]


\definefont [PrimeiraColuna][Serif at 9pt]
\definefont [PrimeiraLinha][SerifBold at 10pt]
%\usetypescript [serif] [hanging] [thanh]
%\setupencoding [default=texnansi]
%\setupbodyfont [cmr,11pt]
\setupalign [hanging]
\setuppapersize[A4,landscape][A4,landscape]

\setuplayout
[tospace = 2cm,
backspace=2.5cm,
headerdistance=3\bodyfontsize,
footer=1.5\bodyfontsize,
margin=2cm,
width=fit]



\setupTABLE[r][first][style=\PrimeiraLinha,bottomframe=on,rulethickness=.05em]
\setupTABLE[column][1][style=\PrimeiraColuna,align={right,lohi},width=6cm]
\setupTABLE[column][2][align={lohi}, width=5.5cm]
\setupTABLE[column][3][align={lohi}, width=5cm]
\setupTABLE[column][4,5][width=3.0cm, align={middle, middle}]
\setupTABLE[column][6][width=3cm, align={middle, middle}]

\startbuffer[cabeca]
\bTABLEhead
\bTR
\bTD[style=\bf,align={middle, middle}] COMPETÊNCIAS (o aluno deve 
se capaz

[NTG-context] spaceinbetween (TABLE)

2006-09-13 Thread Peter Rolf
Hi,

the TABLE paramter 'spaceinbetween' doesn't work, if you use it
combinations with split=repeat. This is not a beta only problem, as the
verson from 08.08.2006 shows the same behaviour.

Greetings, Peter
\starttext

\bTABLE
 [spaceinbetween=3mm,
  columndistance=3mm,
  split=repeat,% works without split=repeat
 ]
%
\bTABLEhead
\bTR
\bTH head1 \eTH
\bTH head2 \eTH
\eTR
\eTABLEhead
%
\bTABLEbody
%
\dorecurse{15}{%
\bTR
\bTC body \eTC
\bTC body \eTC
\eTR
}
%
\eTABLEbody
\eTABLE

\stoptext
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] table splitting in columns

2006-06-27 Thread Henning Hraban Ramm
this used to work but doesn't since the (my) last update:

\starttext
\setupTABLE[split=repeat, frame=off]
\setupTABLE[c][1][align=right]
\setupTABLE[c][2][align=left, style=bf, width=4em]

\startcolumns[n=2, balance=no]

\bTABLE
\bTABLEhead
\bTR\bTD\bf Verzeichnis \eTD\bTD\hbox{Dateien}\eTD\eTR
\eTABLEhead
\bTABLEbody
\dorecurse{100}{\bTR\bTD Folder\eTD\bTD 1\eTD\eTR}
\eTABLEbody
\eTABLE

\stopcolumns

\stoptext

Instead of a table that flows in columns, it breaks only in pages.

Greetlings, Hraban
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] table splitting in columns

2006-06-27 Thread Hans Hagen
Henning Hraban Ramm wrote:
 this used to work but doesn't since the (my) last update:

 \starttext
 \setupTABLE[split=repeat, frame=off]
 \setupTABLE[c][1][align=right]
 \setupTABLE[c][2][align=left, style=bf, width=4em]

 \startcolumns[n=2, balance=no]

 \bTABLE
 \bTABLEhead
 \bTR\bTD\bf Verzeichnis \eTD\bTD\hbox{Dateien}\eTD\eTR
 \eTABLEhead
 \bTABLEbody
 \dorecurse{100}{\bTR\bTD Folder\eTD\bTD 1\eTD\eTR}
 \eTABLEbody
 \eTABLE

 \stopcolumns

 \stoptext

 Instead of a table that flows in columns, it breaks only in pages.
   
ok, i managed to fix that 

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
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] table splitting in columns

2006-06-27 Thread Henning Hraban Ramm
this used to work but doesn't since the (my) last update:

\starttext
\setupTABLE[split=repeat, frame=off]
\setupTABLE[c][1][align=right]
\setupTABLE[c][2][align=left, style=bf, width=4em]

\startcolumns[n=2, balance=no]

\bTABLE
\bTABLEhead
\bTR\bTD\bf Verzeichnis \eTD\bTD\hbox{Dateien}\eTD\eTR
\eTABLEhead
\bTABLEbody
\dorecurse{100}{\bTR\bTD Folder\eTD\bTD 1\eTD\eTR}
\eTABLEbody
\eTABLE

\stopcolumns

\stoptext

Instead of a table that flows in columns, it breaks only in pages.

Greetlings, Hraban
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Split Table Desperation - again!

2006-06-21 Thread Johannes Graumann
Hello,

While the recent modifications to the split table mechanisms provided by
Hans help me out with my most annoying monster table using the XML mapping
code below (see
http://www.idyll.org:8081/JohSite/context/p46-50_split_working.pdf/view for
the typeset table; clearly to much whitespace, but everything is typeset
and page boundaries are honored) and several other -smaller- tables in the
same tome (see
http://www.idyll.org:8081/JohSite/context/p45_unsplit_working.pdf/view for
a typeset example), one medium-sized table that clearly should not be split
gets split none the less (see
http://www.idyll.org:8081/JohSite/context/p162-163_unnecessary_split.pdf/view) 
...
and I have no idea why.

Puzzled and helpless, Joh

XML mapping code:

% 'table' - table definition
\defineXMLnested
  [table]
  [lines=auto]
  {
\defineXMLsave[floattitle]
\defineXMLsave[caption]
\defineXMLsave[header]
\defineXMLsave[body]
\defineXMLsave[footer]
  }
  {
\splitfloat[lines=\XMLop{lines}]
  {
\expanded{%
  \placetable
[\XMLpar{table}{location}{}]
[\XMLpar{table}{label}{unknown}]
{\select{caption}{\XMLflush{floattitle}
{{\bf\XMLflush{floattitle}} \XMLflush{caption}}}
}
  }
  {
\setupTABLE[row][1][topframe=on]
\setupTABLE[row][last][bottomframe=on]
\bTABLE[frame=off,split=repeat,splitmethod=b,style={\switchtobodyfont[small]\setupinterlinespace[line=2.8ex]}]
  \bTABLEhead\XMLflush{header}\eTABLEhead
  \bTABLEbody\XMLflush{body}\eTABLEbody
  \bTABLEfoot\XMLflush{footer}\eTABLEfoot
\eTABLE
  }
  }

% 'td' - table cell definition defaulting to single row/column, automatic
width determination, left alignment
\defineXMLnested
  [td]
  [rows=1,cols=1,width=,bottomframe=,topframe=,align=right]
  {
\doifelse{\XMLop{width}}{}%
  {
\doifelse{\XMLop{bottomframe}}{}%
  {
\doifelse{\XMLop{topframe}}{}%
 
{\expanded{\bTD[align=\XMLop{align},nr=\XMLop{rows},nc=\XMLop{cols}]}}
 
{\expanded{\bTD[align=\XMLop{align},topframe=\XMLop{topframe},nr=\XMLop{rows},nc=\XMLop{cols}]}}
  }
  {
\doifelse{\XMLop{topframe}}{}%
 
{\expanded{\bTD[align=\XMLop{align},nr=\XMLop{rows},nc=\XMLop{cols},bottomframe=\XMLop{bottomframe}]}}
 
{\expanded{\bTD[align=\XMLop{align},nr=\XMLop{rows},nc=\XMLop{cols},bottomframe=\XMLop{bottomframe},topframe=\XMLop{topframe}]}}
  }
  }
  {
\doifelse{\XMLop{bottomframe}}{}%
  {
\doifelse{\XMLop{topframe}}{}%
 
{\expanded{\bTD[align=\XMLop{align},nr=\XMLop{rows},nc=\XMLop{cols},width=\XMLop{width}]}}
 
{\expanded{\bTD[align=\XMLop{align},nr=\XMLop{rows},nc=\XMLop{cols},width=\XMLop{width},topframe=\XMLop{topframe}]}}
  }
  {
\doifelse{\XMLop{topframe}}{}%
 
{\expanded{\bTD[align=\XMLop{align},nr=\XMLop{rows},nc=\XMLop{cols},width=\XMLop{width},bottomframe=\XMLop{bottomframe}]}}
 
{\expanded{\bTD[align=\XMLop{align},nr=\XMLop{rows},nc=\XMLop{cols},width=\XMLop{width},bottomframe=\XMLop{bottomframe},topframe=\XMLop{topframe}]}}
  }
  }
  }
  {\par\eTD}

% 'tr' - table row definition, defaulting to no bottomframe
\defineXMLnested
  [tr]
  [bottomframe=,rulethickness=0.5pt]
  {\doifelse{\XMLop{bottomframe}}{}%
{\expanded{\bTR}}%
   
{\expanded{\bTR[bottomframe=\XMLop{bottomframe},rulethickness=\XMLop{rulethickness}]}}
  }
  {\eTR}


___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Bad Split TABLEs

2006-06-12 Thread Johannes Graumann
 to numerous baits would enable us to 
cull nonspecific contaminants by comparing protein identifications across 
multiple experiments. Third, we wanted to test whether it will be feasible for 
an investigator in a cell biology laboratory to work at the scale needed to 
dissect a biological pathway or process by systematic application of MudPIT to 
a few dozen gene products. To address these questions, we screened for new 
protein--protein interactions in a test set of 25 gene products involved in 
transcription and progression through mitosis. Table x.x summarizes the results 
and gives an overview of potential new interactors. The complete
  data set may be found in the supporting online material.\par
  \splitfloat[lines=8]
{
  \placetable
[top]
{
  \select{caption}
{Potential New Interactors for a Test Set of HPM Tagged Proteins.}
{{\bf Potential New Interactors for a Test Set of HPM Tagged 
Proteins.} Samples were prepared and analyzed as described in Graumann et al 
(2004). Column ``Known interactors---Total'' lists the number of 
physical/genetic interactions reported for the bait in the combined 
GRID/MIPS/YPD databases. ``Known interactors---Recovered'' represents the 
number of known physical/genetic interactors experimentally retrieved in this 
study. Partners marked ``\,*\,'' are reported to interact physically as well as 
genetically. Column ``Potential new interactors'' contains all gene products 
identified by TAP--MudPIT, which are not listed as known interactors and are 
recovered in association with less than 20\% of the baits analyzed (n=22).}
}
}
{
  \setupTABLE[row][1][topframe=on]
  \setupTABLE[row][last][bottomframe=on]
  
\bTABLE[frame=off,split=repeat,splitmethod=b,style={\switchtobodyfont[small]\setupinterlinespace[line=2.8ex]}]
\bTABLEhead
  \bTR
\bTD[nr=3,nc=2,bottomframe=on] Bait\eTD
\bTD[nc=5,bottomframe=on] Known interactors\eTD
\bTD\eTD
\bTD[nr=3,bottomframe=on] Potential new interactors\eTD
\eTR\bTR
\bTD[bottomframe=on] Total\eTD
\bTD\eTD
\bTD[nc=3,bottomframe=on] Recovered\eTD
  \eTR
  \bTR[bottomframe=on]
\bTD phys./gen.\eTD
\bTD[width=0.5em]\eTD
\bTD phys.\eTD
\bTD[width=0.5em]\eTD
\bTD genet.\eTD
\bTD[width=0.5em]\eTD
  \eTR
\eTABLEhead
\bTABLEbody
  \bTR
\bTD Bim1p--HPM\eTD
\bTD\eTD
\bTD 6/57\eTD
\bTD\eTD
\bTD 1\eTD
\bTD\eTD
\bTD ---\eTD
\bTD\eTD
\bTD Rpb2p, Rpl12A/Bp, Rpl22Ap, Rps25A/Bp, Rps29Ap, Rps5p, 
YGR161C--Cp\eTD
\eTR\bTR
\bTD Cdc20p--HPM\eTD
\bTD\eTD
\bTD12/3 \eTD
\bTD\eTD
\bTD 6\eTD
\bTD\eTD
\bTD ---\eTD
\bTD\eTD
\bTD Bub3p, Cct4p, Cct6p, Cct7p, Cct8p, Hef3p, Ilv6p, Pnc1p, 
Rfa1p\eTD
  \eTR
  \bTR
\bTD Chk1p--HPM\eTD
\bTD\eTD
\bTD 16/0\eTD
\bTD\eTD
\bTD---\eTD
\bTD\eTD
\bTD---\eTD
\bTD\eTD
\bTD Act1p, Car2p, Gpd2p, Hht1p, Hht2p, Htb2p, Htb1p, Htz1p, 
Pnc1p\eTD
  \eTR
  \bTR
\bTD Cla4p--HPM\eTD
\bTD\eTD
\bTD 15/77\eTD
\bTD\eTD
\bTD ---\eTD
\bTD\eTD
\bTD Rpl17Bp,\crlf Rpl17Ap,\crlf Rpl19Bp,\crlf Rpl19Ap\eTD
\bTD\eTD
\bTD Pbp1p, Pre8p, Rpl36Ap, Rpl36Bp, Rpl7Ap, Rpl7Bp, Rpp2Ap, Rps2p, 
Sec23p, Skm1p, YBR225Wp, Yhb1p\eTD
  \eTR
  \bTR[bottomframe=on]
\bTD Dbf2p--HPM\eTD
\bTD\eTD
\bTD 27/9\eTD
\bTD\eTD
\bTD 3\eTD
\bTD\eTD
\bTD Dbf20p,\crlf Mob1p*\eTD
\bTD\eTD
\bTD Adh5p, Caf20p, Car2p, Cdc33p, Emi2p, Gfa1p, Gly1p, Gpd2p, 
Hsp42p, Ilv6p, Pnc1p, Pro1p, Rib4p, Sec23p, Shm2p, Snf1p, Trp3p, Tub2p\eTD
  \eTR
  \bTR[topframe=on]
\bTD Gcn5p--HPM\eTD
\bTD\eTD
\bTD 99/12\eTD
\bTD\eTD
\bTD 18\eTD
\bTD\eTD
\bTD Ngg1p*\eTD
\bTD\eTD
\bTD Ade3p, Eft2p, Eft1p, Gfa1p, Glc7p, Msn4p, Ppz2p, Rpl16Ap, 
Rpp2Ap, Rpp2Bp, Rps25Ap, Rps25Bp, Rps29Bp, Sds22p, Sod2p, Tfc1p, Trp3p, Tub2p, 
Ura7p, YCR082Wp, Yhb1p, Ypi1p, YPL047Wp, YPL137Cp, Ysh1p\eTD
  \eTR
  \bTR
\bTD Glc7p--HPM\eTD
\bTD\eTD
\bTD 177/9\eTD
\bTD\eTD
\bTD 28\eTD
\bTD\eTD
\bTD Ppz2p*,\crlf Ppz1p*,br/Reg1p*\eTD
\bTD\eTD
\bTD Abf1p, Ade16p, Ade17p, Ahp1p, Bmh1p, Bmh2p, Ccr4p, Cka2p, 
Eno1p, Fun21p

[NTG-context] More on split TABLES: Numbering Scheme and other things

2006-05-05 Thread Johannes Graumann
Hello,

I'm using the split-TABLE patch below (send - how can it be different - by
Hans) along with the also appended table definition (to read out XML code).
I have two problems here:
1) as posted earlier, the page just before a split TABLE overflows on the
bottom (see
http://www.idyll.org:8081/JohSite/context/page-overflow-preceeding-a-split-table).
2) I also wonder whether the table numbering scheme this is producing may be
changeable: instead of '1.1a', '1.2b' (currently for two parts of a split
TABLE) the more intuitive '1.1a', '1.1b'

Can anybody give me a helping hand for fixing this?

Thanks, Joh

Table definition:
\defineXMLnested
  [table]
  {
\defineXMLsave[floattitle]
\defineXMLsave[caption]
\defineXMLsave[header]
\defineXMLsave[body]
\defineXMLsave[footer]
  }
  {
\splitfloat
  {
\expanded{%
  \placetable
[\XMLpar{table}{location}{here}]
[\XMLpar{table}{label}{unknown}]
{\select{figurecaption}{\XMLflush{floattitle}
{{\bf\XMLflush{floattitle}} \XMLflush{caption}}}
%{\XMLflush{caption}}
 }
  }
  {
\setupTABLE[row][1][topframe=on]
\setupTABLE[row][last][bottomframe=on]
\bTABLE[frame=off,split=repeat,splitmethod=b,style={\switchtobodyfont[small]\setupinterlinespace[line=2.8ex]}]
  \bTABLEhead\XMLflush{header}\eTABLEhead
  \bTABLEbody\XMLflush{body}\eTABLEbody
  \bTABLEfoot\XMLflush{footer}\eTABLEfoot
\eTABLE
  }
  }


Split TABLE patch:
% Fixing multipage table according to Hans Hagen:
\unprotect
% in core-ntb : we check the flag 
\def\splittblbox#1%
  {\ifinsidesplitfloat
 \donetrue
   \else\ifinsidefloat
 \donefalse
   \else
 \donetrue
   \fi\fi
   \ifdone
 \executeifdefined{splittblbox\tbltblsplitmethod}\splittblboxa{#1}%
   \else
 \notsplittblbox{#1}%
   \fi}
% in page-flt : we add a flag 
\newif\ifinsidesplitfloat % will become chardef
\def\dosplitfloat[#1]#2% nog dubbele refs
  {\ifinsidecolumns% tzt ook nog figuren splitten
 % not yet supported
   \else
 \bgroup
 \insidefloattrue
 \insidesplitfloattrue
 \getparameters[\??si][#1]%
 \resetnumber[\??si]%
 \def\floatcaptionsuffix{\convertednumber[\??si]}%
 \TABLEcaptionheight\@@silines\lineheight % brrr
 \simplifypagebreak % \page becomes \goodbreak
 \dowithnextbox
   {\forgetall
\dontcomplain
\doloop
  {\setbox2\vsplit\nextbox to \lineheight
   \setbox2\vbox{\unvbox2}
   \ifdim\ht2\lineheight
 \incrementnumber[\??si]%
 \ifcase\rawnumber[\??si]\or \ifdim\nextboxht=\zeropoint
   \let\floatcaptionsuffix\empty
 \fi \fi
 \bgroup
 #2{\unvbox2}
 \egroup
 \ifdim\nextboxht\zeropoint
   \page
   \decrementnumber[\floatcaptionnumber]%
 \fi
   \fi
   \ifdim\nextboxht\zeropoint\else
 \expandafter\exitloop
   \fi}%
\egroup}
 \vbox
   \fi}
\protect
% beware: you need to set the splitmethod to b (boxed split) 

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] some basic TABLE questions

2006-05-03 Thread Karsten Heymann
Hi Willi,

sorry for the late reply, was a bit ill

Willi Egger wrote:
 \setupbackgrounds[text][state=repeat,background=screen,backgroundscreen=.8]

I'll try that, but the frame coloring is just for debugging. My
intention was to control the exact aligning of the table on the page.

 bTABLE breaks over pages if you use [split=repeat] together with a\ 
 bTABLEhead...\eTABLEhead.

 Using the \rotate command prevents breaking, Possibly you better use
 \setuppapersize[a4,landscape][a4,landscape], which of course rotates 
 the whole layout including headers and footers.

I didn't think of that, I'll try it out.

 I am afraid, that once you include the table into a \placefigure 
 environment, breaking is prevented.

Is there a way to add a caption without \placetable then?

 I was able to break a long table with a merged cell as you have it in 
 the first column. However there is possibly a bug, because this column 
 has no bottomframe.
 In order to place the LOW TECH text correctly you might use a \framed 
 command within the table
 \bTD[nr=7,align=lohi] \rotate[rotation=90]{\framed[frame=off, 
 offset=.5em,align=center,width=3cm]{Low Tech}}\eTD

I'll try that too.

Thanks alot,
Karsten
-- 
|  ~ Karsten Heymann ~  | Christian-Albrecht-Universität zu Kiel |
| Fon: +49 431 880-1186 |Netzwerkteam des Ökologiezentrum|
| Fax: +49 431 880-4083 | http://www.ecology.uni-kiel.de |
| - Selbständiger EDV-Dienstleister im Auftrag des ÖZK - |




signature.asc
Description: OpenPGP digital signature
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] some basic TABLE questions

2006-04-27 Thread Willi Egger
Hi Karsten,

I hope to be able to give at least partial answers

Instead of using a \framed construct I would suggest to use a background:

\setupbackgrounds[text][state=repeat,background=screen,backgroundscreen=.8]

bTABLE breaks over pages if you use [split=repeat] together with a\ 
bTABLEhead...\eTABLEhead.
Using the \rotate command prevents breaking, Possibly you better use
\setuppapersize[a4,landscape][a4,landscape], which of course rotates 
the whole layout including headers and footers.
I am afraid, that once you include the table into a \placefigure 
environment, breaking is prevented.
I was able to break a long table with a merged cell as you have it in 
the first column. However there is possibly a bug, because this column 
has no bottomframe.
In order to place the LOW TECH text correctly you might use a \framed 
command within the table
\bTD[nr=7,align=lohi] \rotate[rotation=90]{\framed[frame=off, 
offset=.5em,align=center,width=3cm]{Low Tech}}\eTD

AFAIK \placetable or \placefigure accepts a single caption only and will 
not break over pages.

Kind regards
Willi

Karsten Heymann wrote:

Hello,

it would be very kind if someone could answer the following questions
about the possibilities of TABLE:

- there some semi-automatic way of splitting tables on multiple pages if
  those tables are in landscape mode (which I achieve by putting them
  into a \rotating{}-Command)?
- How do I add a caption to (portrait) multipage TABLEs? \placefigure
  obviously doesn't work.

Any help would be very much appreciated!

Yours,
Karsten
  



___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context
  

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] TABLE 'last line' tag?

2006-04-21 Thread nico
On Thu, 20 Apr 2006 17:27:50 -0700, Johannes Graumann  
[EMAIL PROTECTED] wrote:

 nico wrote:

 Why don't you test if the attribute is set before applying it to the TR?
 You see the problem on the last row, but the fact is that you force the
 bottomframe clear for every row (which is dirty IMHO).
 It's not that easy, since the bottomframe - once set - is persistent ...  
 so
 every row underneath my header (e.g.) will have 'bottomframe=on' set.

No, the options are local to the current level where it is set. If  
bottomframe is on for one row, it won't set bottomframe to the next rows.  
In the following example, only two rows (the header and another one in the  
body) have local bottomframe on, and the last row bottomframe is done with  
table setup:

\starttext
\setupTABLE[frame=off]
\setupTABLE[row][last][rulethickness=0.90pt,bottomframe=on]
\bTABLE
\bTABLEhead
\bTR[bottomframe=on]\bTH a \eTH\bTH b \eTH\eTR
\eTABLEhead
\bTABLEbody
\bTR\bTD bla \eTD\bTD bla \eTD\eTR
\bTR\bTD bla \eTD\bTD bla \eTD\eTR
\bTR\bTD bla \eTD\bTD bla \eTD\eTR
\bTR[bottomframe=on]\bTD bla \eTD\bTD bla \eTD\eTR
\bTR\bTD bla \eTD\bTD bla \eTD\eTR
\bTR\bTD bla \eTD\bTD bla \eTD\eTR
\eTABLEbody
\eTABLE
\stoptext

You can also put bottomframe only for a cell with  
bTD[bottomframe=on]...\eTD.

Regards,
BG
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] TABLE 'last line' tag?

2006-04-21 Thread Hans Hagen
nico wrote:
 On Thu, 20 Apr 2006 17:27:50 -0700, Johannes Graumann  
 [EMAIL PROTECTED] wrote:

   
 nico wrote:

 
 Why don't you test if the attribute is set before applying it to the TR?
 You see the problem on the last row, but the fact is that you force the
 bottomframe clear for every row (which is dirty IMHO).
   
 It's not that easy, since the bottomframe - once set - is persistent ...  
 so
 every row underneath my header (e.g.) will have 'bottomframe=on' set.
 

 No, the options are local to the current level where it is set. If  
 bottomframe is on for one row, it won't set bottomframe to the next rows.  
 In the following example, only two rows (the header and another one in the  
 body) have local bottomframe on, and the last row bottomframe is done with  
 table setup:

 \starttext
 \setupTABLE[frame=off]
 \setupTABLE[row][last][rulethickness=0.90pt,bottomframe=on]
 \bTABLE
 \bTABLEhead
 \bTR[bottomframe=on]\bTH a \eTH\bTH b \eTH\eTR
 \eTABLEhead
 \bTABLEbody
 \bTR\bTD bla \eTD\bTD bla \eTD\eTR
 \bTR\bTD bla \eTD\bTD bla \eTD\eTR
 \bTR\bTD bla \eTD\bTD bla \eTD\eTR
 \bTR[bottomframe=on]\bTD bla \eTD\bTD bla \eTD\eTR
 \bTR\bTD bla \eTD\bTD bla \eTD\eTR
 \bTR\bTD bla \eTD\bTD bla \eTD\eTR
 \eTABLEbody
 \eTABLE
 \stoptext

 You can also put bottomframe only for a cell with  
 bTD[bottomframe=on]...\eTD.
   

the following patch will permit negative numbers (remove empty lines due 
to mail mess up)

\def\setupTBLcell#1#2% cell over col over row
  {\setupTBLsection % already forgotten
\edef\positiverow{\number#1}%
\edef\positivecol{\number#2}%
\scratchcounter-\maximumrow\advance\scratchcounter#1\advance\scratchcounter\minusone
\edef\negativerow{\number\scratchcounter}%
\scratchcounter-\maximumcol\advance\scratchcounter#2\advance\scratchcounter\minusone
\edef\negativecol{\number\scratchcounter}%
   \getvalue{\@@tblprefix\v!each\v!each}%
   \getvalue{\@@tblprefix\c!y\v!each}%
   \getvalue{\@@tblprefix\c!x\v!each}%
   \getvalue{\@@tblprefix\c!y\v!oddeven\positiverow}%
   \getvalue{\@@tblprefix\c!x\v!oddeven\positivecol}%
   \getvalue{\@@tblprefix\c!x\v!oddeven\positivecol\c!y\v!oddeven\positiverow}%
   \ifnum\positiverow=\plusone
 \getvalue{\@@tblprefix\c!y\v!first}%
 \executeifdefined{\@@tblprefix\c!x\positivecol\c!y\v!first}\donothing
   \fi
   \ifnum\positivecol=\plusone
 \getvalue{\@@tblprefix\c!x\v!first}%
 \executeifdefined{\@@tblprefix\c!x\v!first\c!y\positiverow}\donothing
   \fi
   \ifnum\positiverow=\maximumrow\relax
 \getvalue{\@@tblprefix\c!y\v!last}%
 \executeifdefined{\@@tblprefix\c!x\positivecol\c!y\v!last}\donothing
   \fi
   \ifnum\positivecol=\maximumcol\relax
 \getvalue{\@@tblprefix\c!x\v!last}%
 \executeifdefined{\@@tblprefix\c!x\v!last\c!y\positiverow}\donothing
   \fi
   \ifnum\positiverow=\maximumrow\relax\ifnum\positivecol=\maximumcol\relax
 \getvalue{\@@tblprefix\c!x\v!last\c!y\v!last}%
   \fi\fi
   \ifnum\positiverow=\plusone \ifnum\positivecol=\plusone
 \getvalue{\@@tblprefix\c!x\v!first\c!y\v!first}%
   \fi\fi
   \ifnum#1\noftblhdnxlines\else
 \executeifdefined{\@@tblprefix\v!header\v!each}\donothing
 \executeifdefined{\@@tblprefix\v!header\positivecol}\donothing
   \fi
   \executeifdefined{\@@tblprefix\c!y\positiverow}\donothing
\executeifdefined{\@@tblprefix\c!y\negativerow}\donothing
   \getvalue{\@@tbl\@@tbl\c!extras}\letvalue{\@@tbl\@@tbl\c!extras}\relax %
\executeifdefined{\@@tblprefix\c!x\positivecol}\donothing
\executeifdefined{\@@tblprefix\c!x\negativecol}\donothing
   \getvalue{\@@tbl\@@tbl\c!extras}\letvalue{\@@tbl\@@tbl\c!extras}\relax %
\executeifdefined{\@@tblprefix\c!x\positivecol\c!y\positiverow}\donothing
\executeifdefined{\@@tblprefix\c!x\negativecol\c!y\negativerow}\donothing
 \global\letcscsname\@@tblsplitafter\csname\@@tbl\@@tbl\c!after\endcsname
   \relax}

\setupcolors[state=start]

\setupTABLE[r]  [2][color=red]
\setupTABLE[r] [-2][color=red]
\setupTABLE[c]  [2][color=green]
\setupTABLE[c] [-2][color=green]
\setupTABLE[4]  [4][color=blue]
\setupTABLE[-4][-4][color=blue]

\bTABLE
\dorecurse{10}{\bTR \dorecurse{6}{\bTD xxx \eTD} \eTR}
\eTABLE

\stoptext


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

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] TABLE: 'distance' override?

2006-04-20 Thread Johannes Graumann
Hello,

In my quest for tables similar to what the 'booktabs' package in LaTeX
produces, I have run into a problem: something
like '\bTABLE[distance=7.5pt]' will give me the sought for gaps in
horizontal lines, but I have trouble implementing an uninterrupted topframe
for the first and bottomframe for the last row. Is there any way of
overriding the 'distance' parameter locally, so that for example the
topframe of the first (header) row is uninterrupted, while the bottomframe
comes with the 'distance' dictated gaps? For clarification see the attached
file. While the gaps are desired for 'bottomframe' of the header row(s),
the 'topframe' should be continuous. It would be even more marvelous if I
could modify bottomframe- and topframe-rule thickness independently ... 

A recent proposal on this list to achieve the desired effect involved
putting the whole table into a frame and displaying it's top- and
bottomframe. However, that doesn't work for tables to be split over
multiple pages and I'm hunting for the most generic of all mechanisms ...

Thanks for any thoughts on this,

Joh\setupcaption[table][location=top]
% Fixing multipage table according to Hans Hagen:
\unprotect
% in core-ntb : we check the flag 
\def\splittblbox#1%
  {\ifinsidesplitfloat
 \donetrue
   \else\ifinsidefloat
 \donefalse
   \else
 \donetrue
   \fi\fi
   \ifdone
 \executeifdefined{splittblbox\tbltblsplitmethod}\splittblboxa{#1}%
   \else
 \notsplittblbox{#1}%
   \fi}
% in page-flt : we add a flag 
\newif\ifinsidesplitfloat % will become chardef
\def\dosplitfloat[#1]#2% nog dubbele refs
  {\ifinsidecolumns% tzt ook nog figuren splitten
 % not yet supported
   \else
 \bgroup
 \insidefloattrue
 \insidesplitfloattrue
 \getparameters[\??si][#1]%
 \resetnumber[\??si]%
 \def\floatcaptionsuffix{\convertednumber[\??si]}%
 \TABLEcaptionheight\@@silines\lineheight % brrr
 \simplifypagebreak % \page becomes \goodbreak
 \dowithnextbox
   {\forgetall
\dontcomplain
\doloop
  {\setbox2\vsplit\nextbox to \lineheight
   \setbox2\vbox{\unvbox2}
   \ifdim\ht2\lineheight
 \incrementnumber[\??si]%
 \ifcase\rawnumber[\??si]\or \ifdim\nextboxht=\zeropoint
   \let\floatcaptionsuffix\empty
 \fi \fi
 \bgroup
 #2{\unvbox2}
 \egroup
 \ifdim\nextboxht\zeropoint
   \page
   \decrementnumber[\floatcaptionnumber]%
 \fi
   \fi
   \ifdim\nextboxht\zeropoint\else
 \expandafter\exitloop
   \fi}%
\egroup}
 \vbox
   \fi}
\protect
% beware: you need to set the splitmethod to b (boxed split) 

\defineXMLnested
  [splittable]
  {
\defineXMLsave[caption]
\defineXMLsave[header]
\defineXMLsave[body]
\defineXMLsave[footer]
  }
  {
\splitfloat
  
{\placetable[\XMLpar{table}{location}{here}][\XMLpar{table}{label}{unknown}]{\XMLflush{caption}}}
  {
\setupTABLE[row][1][rulethickness=0.90pt,topframe=on]
\setupTABLE[row][-1][rulethickness=0.90pt,bottomframe=on]

\bTABLE[frame=off,split=repeat,splitmethod=b,distance=7.5pt,style={\switchtobodyfont[small]\setupinterlinespace[line=2.8ex]}]
  \bTABLEhead\XMLflush{header}\eTABLEhead
  \bTABLEbody\XMLflush{body}\eTABLEbody
  \bTABLEfoot\XMLflush{footer}\eTABLEfoot
\eTABLE
  }
  }
\defineXMLnested
  [tr]
  [bottomframe=off,rulethickness=0.3pt]
  
{\expanded{\bTR[bottomframe=\XMLop{bottomframe},rulethickness=\XMLop{rulethickness}]}}
  {\eTR}

\defineXMLnested
  [td]
  [rows=1,cols=1]
  {\expanded{\bTD[nr=\XMLop{rows},nc=\XMLop{cols}]}}
  {\par\eTD}

\starttext
  \startXMLdata
splittable
  caption
F FF F  F F F 
  FF FF FFF   FFF  FF F FF 
FFF   FF   FF FFF 
 FF FFF  FFF F FFF F FF   F F 
FF F   FFF  FFF  F F FFF  
F FF F FFF  FFF  FFF  
F FF  FF FFF F  
FFF FF F FFF FFF F FFF FF F.
  /caption
  header
tr bottomframe=ontd rows=2YYY/tdtd cols=3YYY/tdtd 
rows=2YYY/tdtd rows=2YYY/tdtd rows=2YYY/td/trtr 
bottomframe=ontdYYY/tdtdYYY/tdtdYYY/td/tr
  /header
  body

trtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/td/tr

trtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/td/tr

trtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/td/tr

trtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/td/tr

trtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/td/tr

trtdXXX/tdtdXXX

Re: [NTG-context] emacs lisp for context in AucTeX

2006-04-20 Thread Johan Sandblom
Thank you for this. I have written the following much more amateurish
emacs lisp code in order to make it easier to enter natural tables and
flowcharts. Perhaps someone may find it useful or can suggest
improvements. I also added some keybindings for them.

Johan

(defun context-insert-nattab (rows columns)
  ;; Johan Sandblom 060128
  Insert a TABLE skeleton
  (interactive nNumber of rows: \nnNumber of columns: \n)
  (newline)
  (insert \\bTABLE\n\\setupTABLE\[\]\n)
  ;; First a TABLE header
  (insert \\bTABLEhead\n\\bTR\\bTH \\eTH\n)
  (let ((column 1))
(while ( column (- columns 1))
  (insert \\bTH \\eTH\n)
  (setq column (1+ column
  (insert \\bTH \\eTH\\eTR\n\\eTABLEhead\n\\bTABLEbody\n)
  ;; The rows and columns
  (let ((row 1))
(while (= row rows)
  (insert \\bTR\\bTD \\eTD\n)
  ;; The let expression makes sure that each loop starts at the
  ;; right place
  (let ((column 1))
(while ( column (- columns 1))
  (insert \\bTD \\eTD\n)
  (setq column (1+ column)))
(insert \\bTD \\eTD\\eTR\n)
(setq row (1+ row
(insert \\eTABLEbody\n\\eTABLE\n)))

(defun context-insert-nattab-row (columns)
 Insert a row in a TABLE
 (interactive nNumber of columns: \n)
 (newline)
 (insert \\bTR\\bTD \\eTD\n)
 (let ((column 1))
   (while ( column (- columns 1))
 (insert \\bTD \\eTD\n)
 (setq column (1+ column)))
   (insert \\bTD \\eTD\\eTR\n)))

(defun context-insert-nattab-column (optional arg)
 Insert a column in a TABLE
 (interactive P)
 (insert \\bTD \\eTD)
 (indent-for-tab-command)
 (newline)
 (backward-char 5))

(defun context-insert-FLOW-cell (n)
 ;; Johan Sandblom 060128
 Insert a FLOWchart cell
 (interactive nNumber of cells: \n)
 (newline)
 (let ((x 1))
   (while (= x n)
 (insert \\startFLOWcell\n)
 (insert   \\name  {}\n)
 (insert   \\location  {}\n)
 (insert   \\shape {action}\n)
 (insert   \\text  {}\n)
 (insert   \\connection[rl]{}\n)
 (insert \\stopFLOWcell\n)
 (setq x (1+ x)

(add-hook 'ConTeXt-mode-hook
 '(lambda ()
(local-set-key \C-c\C-fc 'context-insert-FLOW-cells)
(local-set-key \C-cnr 'context-insert-nattab-row)
(local-set-key \C-cnc 'context-insert-nattab-column)
(local-set-key \C-cnn 'context-insert-nattab)
(local-set-key $ 'start-context-math)))

2006/4/20, Sanjoy Mahajan [EMAIL PROTECTED]:
 I wrote the following emacs lisp for my .emacs and pass it on (no
 copyright) in case others find it useful.  I used variants for a decade
 with the old tex mode, but just rewrote it for auctex and for context's
 display math syntax (which deprecates $$...$$).

 The purpose:

 1. If you type {, [, or (, the appropriate right delimiter is inserted
for you and the insertion point is placed between them.  So I never
get unbalanced XYZ errors.  If you think it's a misfeature, delete
the last three local-set-key's in the TeX-mode-hook.

 2. Same feature if you type $ for inline math: you get $insertion point
here$.  The old tex-mode code would do the same on typing a second $,
so you'd get $$insertion point here$$ for tex's display math.

The code below will also do that, except in context mode.

 3. In context mode, typing the second $ will gobble up preceding
whitespace and then insert
 \placeformula\startformula
 place insertion point here
 \stopformula

 The whitespace-deletion code in start-context-math is a bit pathetic and
 any improvements are welcome.  I couldn't get re-search-backward to work
 for me because it wouldn't match greedily (so it would gobble up one
 space but not all of them, for example), so instead it just looks one
 character at a time and deletes what it should.

 -Sanjoy


 (defun insert-balanced (left right)
   Make a left, right delmiter pair and be poised to type inside of them.
   (interactive)
   (insert left)
   (save-excursion
 (insert right)))

 (defun start-context-math ()
   (interactive)
   (let* ((start (max (point-min) (- (point) 1)))
  (stop  (min (point-max) (+ (point) 1
 ; if in the middle of a $$, turn inline math into context display math
 (if (equal $$ (buffer-substring-no-properties start stop))
 (progn
   (delete-region start stop);get rid of the $$
   ; delete preceding spaces, if any
   (while (and ( (point-min) (point))
   (equal (buffer-substring-no-properties (- (point) 1)
  (point))
   ))
 (backward-delete-char 1))
   ; delete a preceding newline, if any
   (if (equal (buffer-substring-no-properties (- (point) 1)
  (point))
  \n)
 (backward-delete-char 1))
   ; place
   (insert \n\\placeformula

Re: [NTG-context] emacs lisp for context in AucTeX

2006-04-20 Thread Sanjoy Mahajan
Great.  Mojca suggested that I wikify my Emacs lisp.  It's now at
http://wiki.contextgarden.net/Text_editor.  Following that method ('a
method is a trick I use twice.' --Polya), I've put your elisp there too
-- hope that's okay.  I removed the

(local-set-key $ 'start-context-math)

so that your code can stand alone (in case people want one or the
other).

I had to change a few things at the end (some maybe because I'm using
GNU Emacs rather than XEmacs, not sure).  Below is the diff and I've
attached the resulting version.  Most of the trouble was in the
keybindings:

(local-set-key \C-c\C-fc 'context-insert-FLOW-cells)

doesn't work because C-c C-f is already defined as TeX-font, so it can't
be a prefix as well.  So I chose \C-cnF.  Also the function name
needed an s at the end.  These two:

(local-set-key \C-cnn 'context-insert-nattab)
(local-set-key \C-cnr 'context-insert-nattab-row)

have a related problem, in that \C-cn is not a prefix yet, so \C-cnn
and \C-cnr are not valid sequences.  So I changed the first use of
\C-cn as a prefix to use define-key(), which seems to make a
prefix-map automatically as I eventually learnt by inspecting tex.el.
So:

(define-key (current-local-map) \C-cnF 'context-insert-FLOW-cells)
Then the following local-set-key's work.  As I say, this is on Emacs
21.4, and the tricks may be different on XEmacs.

-Sanjoy

--- a/tables.el 2006-04-20 10:46:16.0 -0400
+++ b/tables.el 2006-04-20 10:43:41.0 -0400
@@ -1,5 +1,5 @@
 (defun context-insert-nattab (rows columns)
-  ;; Johan Sandblom 060128
+  ;; Johan Sandblom 2006-01-28
   Insert a TABLE skeleton
   (interactive nNumber of rows: \nnNumber of columns: \n)
   (newline)
@@ -44,8 +44,8 @@
  (newline)
  (backward-char 5))
 
-(defun context-insert-FLOW-cell (n)
- ;; Johan Sandblom 060128
+(defun context-insert-FLOW-cells (n)
+ ;; Johan Sandblom 2006-01-28
  Insert a FLOWchart cell
  (interactive nNumber of cells: \n)
  (newline)
@@ -62,8 +62,7 @@
 
 (add-hook 'ConTeXt-mode-hook
  '(lambda ()
-   (local-set-key \C-c\C-fc 'context-insert-FLOW-cells)
+   (define-key (current-local-map) \C-cnF 'context-insert-FLOW-cells)
(local-set-key \C-cnr 'context-insert-nattab-row)
(local-set-key \C-cnc 'context-insert-nattab-column)
-   (local-set-key \C-cnn 'context-insert-nattab)
-(local-set-key $ 'start-context-math)))
+   (local-set-key \C-cnn 'context-insert-nattab)))

(defun context-insert-nattab (rows columns)
  ;; Johan Sandblom 2006-01-28
  Insert a TABLE skeleton
  (interactive nNumber of rows: \nnNumber of columns: \n)
  (newline)
  (insert \\bTABLE\n\\setupTABLE\[\]\n)
  ;; First a TABLE header
  (insert \\bTABLEhead\n\\bTR\\bTH \\eTH\n)
  (let ((column 1))
(while ( column (- columns 1))
  (insert \\bTH \\eTH\n)
  (setq column (1+ column
  (insert \\bTH \\eTH\\eTR\n\\eTABLEhead\n\\bTABLEbody\n)
  ;; The rows and columns
  (let ((row 1))
(while (= row rows)
  (insert \\bTR\\bTD \\eTD\n)
  ;; The let expression makes sure that each loop starts at the
  ;; right place
  (let ((column 1))
(while ( column (- columns 1))
  (insert \\bTD \\eTD\n)
  (setq column (1+ column)))
(insert \\bTD \\eTD\\eTR\n)
(setq row (1+ row
(insert \\eTABLEbody\n\\eTABLE\n)))

(defun context-insert-nattab-row (columns)
 Insert a row in a TABLE
 (interactive nNumber of columns: \n)
 (newline)
 (insert \\bTR\\bTD \\eTD\n)
 (let ((column 1))
   (while ( column (- columns 1))
 (insert \\bTD \\eTD\n)
 (setq column (1+ column)))
   (insert \\bTD \\eTD\\eTR\n)))

(defun context-insert-nattab-column (optional arg)
 Insert a column in a TABLE
 (interactive P)
 (insert \\bTD \\eTD)
 (indent-for-tab-command)
 (newline)
 (backward-char 5))

(defun context-insert-FLOW-cells (n)
 ;; Johan Sandblom 2006-01-28
 Insert a FLOWchart cell
 (interactive nNumber of cells: \n)
 (newline)
 (let ((x 1))
   (while (= x n)
 (insert \\startFLOWcell\n)
 (insert   \\name  {}\n)
 (insert   \\location  {}\n)
 (insert   \\shape {action}\n)
 (insert   \\text  {}\n)
 (insert   \\connection[rl]{}\n)
 (insert \\stopFLOWcell\n)
 (setq x (1+ x)

(add-hook 'ConTeXt-mode-hook
 '(lambda ()
(define-key (current-local-map) \C-cnF 'context-insert-FLOW-cells)
(local-set-key \C-cnr 'context-insert-nattab-row)
(local-set-key \C-cnc 'context-insert-nattab-column)
(local-set-key \C-cnn 'context-insert-nattab)))
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \synchronizeoutput does not help here...

2006-04-20 Thread Peter Münster
On Wed, 19 Apr 2006, Hans Hagen wrote:

  \starttext
  \section{bla}
  \subsection{bla}
  \startitemize
  \dorecurse{21}{\item bla}
  \stopitemize
  \placetable{a table}{\vbox to 8cm{bla}}
 
  \section{bla}
  \subsection{bla}
  \synchronizeoutput % this does not help here...
  \bTABLE[split=repeat]
  \bTABLEhead\bTR\bTH bla\eTH\eTR\eTABLEhead
  \bTABLEbody\dorecurse{100}{\bTR\bTD bla\eTD\eTR}\eTABLEbody
  \eTABLE
  \stoptext

 it's a boundary case: when the subsection is placed, the pagetotal is 
 pretty large because the previous page is not yet flushed, so ther eis 
 no room for a table piece
 
 you can put something
 
   \strut \vskip-\lineheight \nobreak

This does not work...

 before the table, which triggers the otr
 
 or say:
 
 \setuphead[section][before={\testpage[10]\blank}]

Thanks for your fast answer, this works very well!
Cheers, Peter

-- 
http://pmrb.free.fr/contact/
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] splitting table into columns

2006-04-20 Thread Peter Münster
Hello,
how could I split a table into columns in a clean manner?

To show, what I want, I prepared the following example file:

- the first page is ok for me, you see just the issue mentioned in
  http://context.literatesolutions.com/collector/15
- the 5th page looks clean
- the 6th page looks also clean but should be balanced
- all other pages are not ok...

TIA for any hints, Peter

\definecolumnset[example][n=3]
\starttext
\input tufte

\section{Try with columns and tables}
\startcolumns[n=3]
\starttablehead \HL \NC A \NC B \NC\SR \HL \stoptablehead
\starttabletail \HL \stoptabletail
\starttables[|l|l|]
\dorecurse{200}{\NC bla \NC bla \NC\AR}
\stoptables
\stopcolumns

\page
\input tufte
\section{Try with columnset and tables}
\startcolumnset[example]
\starttablehead \HL \NC A \NC B \NC\SR \HL \stoptablehead
\starttabletail \HL \stoptabletail
\starttables[|l|l|]
\dorecurse{200}{\NC bla \NC bla \NC\AR}
\stoptables
\stopcolumnset

\page
\input tufte
\section{Try with columns and TABLE}
\startcolumns[n=3]
\bTABLE[split=repeat]
\bTABLEhead \bTR \bTH A \eTH \bTH B \eTH \eTR \eTABLEhead
\bTABLEbody
\dorecurse{200}{\bTR \bTD bla \eTD \bTD bla \eTD \eTR}
\eTABLEbody
\eTABLE
\stopcolumns

\page
\input tufte
\section{Try with columnset and TABLE}
\startcolumnset[example]
\bTABLE[split=repeat]
\bTABLEhead \bTR \bTH A \eTH \bTH B \eTH \eTR \eTABLEhead
\bTABLEbody
\dorecurse{200}{\bTR \bTD bla \eTD \bTD bla \eTD \eTR}
\eTABLEbody
\eTABLE
\stopcolumnset
\stoptext

-- 
http://pmrb.free.fr/contact/
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] TABLE 'last line' tag?

2006-04-20 Thread Johannes Graumann
Figured out what's going on and would appreciate some advice on the issue:

My actual code interprets XML and reads:

\defineXMLnested
  [splittable]
  {
\defineXMLsave[caption]
\defineXMLsave[header]
\defineXMLsave[body]
\defineXMLsave[footer]
  }
  {
\splitfloat
  {\placetable[\XMLpar{table}{location}{here}][\XMLpar{table}{label
{unknown}]{\XMLflush{caption}}}
  {
\setupTABLE[row][1][rulethickness=0.30pt,topframe=on]
\setupTABLE[row][last][rulethickness=0.30pt,bottomframe=on]
   
\bTABLE[frame=off,split=repeat,splitmethod=b,distance=7.5pt,style={\switchtobodyfont[small]\setupinterlinespace[line=2.8ex]}]
  \bTABLEhead\XMLflush{header}\eTABLEhead
  \bTABLEbody\XMLflush{body}\eTABLEbody
  \bTABLEfoot\XMLflush{footer}\eTABLEfoot
\eTABLE
  }
  }

\defineXMLnested
  [tr]
  [bottomframe=]
  {\expanded{\bTR[bottomframe=\XMLop{bottomframe}]}}
  {\eTR}

What's happening here is that the the 'tr' bottomframe statement (which I
need for formating) overrides the '\setupTABLE[row]' bit. Is there any way
to make 'tr's bottomframe-statement be ineffectual in case of being the
last raw?

Joh

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] \synchronizeoutput does not help here...

2006-04-19 Thread Peter Münster
Hello,
unfortunately, \synchronizeoutput does not help here.

I also tried things like \placetable[bottom] but no luck...

Could you help?

\starttext
\section{bla}
\subsection{bla}
\startitemize
\dorecurse{21}{\item bla}
\stopitemize
\placetable{a table}{\vbox to 8cm{bla}}

\section{bla}
\subsection{bla}
\synchronizeoutput % this does not help here...
\bTABLE[split=repeat]
\bTABLEhead\bTR\bTH bla\eTH\eTR\eTABLEhead
\bTABLEbody\dorecurse{100}{\bTR\bTD bla\eTD\eTR}\eTABLEbody
\eTABLE
\stoptext

Cheers, Peter

-- 
http://pmrb.free.fr/contact/
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \synchronizeoutput does not help here...

2006-04-19 Thread Hans Hagen
� wrote:
 Hello,
 unfortunately, \synchronizeoutput does not help here.

 I also tried things like \placetable[bottom] but no luck...

 Could you help?

 \starttext
 \section{bla}
 \subsection{bla}
 \startitemize
 \dorecurse{21}{\item bla}
 \stopitemize
 \placetable{a table}{\vbox to 8cm{bla}}

 \section{bla}
 \subsection{bla}
 \synchronizeoutput % this does not help here...
 \bTABLE[split=repeat]
 \bTABLEhead\bTR\bTH bla\eTH\eTR\eTABLEhead
 \bTABLEbody\dorecurse{100}{\bTR\bTD bla\eTD\eTR}\eTABLEbody
 \eTABLE
 \stoptext

 Cheers, Peter

   
it's a boundary case: when the subsection is placed, the pagetotal is 
pretty large because the previous page is not yet flushed, so ther eis 
no room for a table piece

you can put something

  \strut \vskip-\lineheight \nobreak

before the table, which triggers the otr

or say:

\setuphead[section][before={\testpage[10]\blank}]

which also does some testing (force page break when less that 10 lines) 
and is cleaner

-- 

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

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Multi-page table and lengthy caption

2006-04-19 Thread Johannes Graumann
Hello,

In my field lengthy table captions are common. The attached example shows
two problems I have with the multi-page tabeling I made work with the help
of the included patch from Hans:
1) the table splitting does not calculate the right height for the caption -
the table is too long for the page.
2) captions of this caliber should only appear together with the first part
of the table and should be replaced with 'continued' or nothing when
appearing with further parts.

I would greatly appreciate any advice on how to fix/achieve these two
issues.

Thanks, Joh

\setupcaption[table][location=top]
% Fixing multipage table according to Hans Hagen:
\unprotect
% in core-ntb : we check the flag 
\def\splittblbox#1%
  {\ifinsidesplitfloat
 \donetrue
   \else\ifinsidefloat
 \donefalse
   \else
 \donetrue
   \fi\fi
   \ifdone
 \executeifdefined{splittblbox\tbltblsplitmethod}\splittblboxa{#1}%
   \else
 \notsplittblbox{#1}%
   \fi}
% in page-flt : we add a flag 
\newif\ifinsidesplitfloat % will become chardef
\def\dosplitfloat[#1]#2% nog dubbele refs
  {\ifinsidecolumns% tzt ook nog figuren splitten
 % not yet supported
   \else
 \bgroup
 \insidefloattrue
 \insidesplitfloattrue
 \getparameters[\??si][#1]%
 \resetnumber[\??si]%
 \def\floatcaptionsuffix{\convertednumber[\??si]}%
 \TABLEcaptionheight\@@silines\lineheight % brrr
 \simplifypagebreak % \page becomes \goodbreak
 \dowithnextbox
   {\forgetall
\dontcomplain
\doloop
  {\setbox2\vsplit\nextbox to \lineheight
   \setbox2\vbox{\unvbox2}
   \ifdim\ht2\lineheight
 \incrementnumber[\??si]%
 \ifcase\rawnumber[\??si]\or \ifdim\nextboxht=\zeropoint
   \let\floatcaptionsuffix\empty
 \fi \fi
 \bgroup
 #2{\unvbox2}
 \egroup
 \ifdim\nextboxht\zeropoint
   \page
   \decrementnumber[\floatcaptionnumber]%
 \fi
   \fi
   \ifdim\nextboxht\zeropoint\else
 \expandafter\exitloop
   \fi}%
\egroup}
 \vbox
   \fi}
\protect
% beware: you need to set the splitmethod to b (boxed split) 

\defineXMLnested
  [splittable]
  {
\defineXMLsave[caption]
\defineXMLsave[header]
\defineXMLsave[body]
\defineXMLsave[footer]
  }
  {
\splitfloat
  
{\placetable[\XMLpar{table}{location}{here}][\XMLpar{table}{label}{unknown}]{\XMLflush{caption}}}
  {
\setupTABLE[row][1][rulethickness=0.90pt,topframe=on]
\setupTABLE[row][-1][rulethickness=0.90pt,bottomframe=on]

\bTABLE[frame=off,split=repeat,splitmethod=b,distance=7.5pt,style={\switchtobodyfont[small]\setupinterlinespace[line=2.8ex]}]
  \bTABLEhead\XMLflush{header}\eTABLEhead
  \bTABLEbody\XMLflush{body}\eTABLEbody
  \bTABLEfoot\XMLflush{footer}\eTABLEfoot
\eTABLE
  }
  }
\defineXMLnested
  [tr]
  [bottomframe=off,rulethickness=0.3pt]
  
{\expanded{\bTR[bottomframe=\XMLop{bottomframe},rulethickness=\XMLop{rulethickness}]}}
  {\eTR}

\defineXMLnested
  [td]
  [rows=1,cols=1]
  {\expanded{\bTD[nr=\XMLop{rows},nc=\XMLop{cols}]}}
  {\par\eTD}

\starttext
  \startXMLdata
splittable
  caption
F FF F  F F F 
  FF FF FFF   FFF  FF F FF 
FFF   FF   FF FFF 
 FF FFF  FFF F FFF F FF   F F 
FF F   FFF  FFF  F F FFF  
F FF F FFF  FFF  FFF  
F FF  FF FFF F  
FFF FF F FFF FFF F FFF FF F.
  /caption
  header
tr bottomframe=ontd rows=2YYY/tdtd cols=3YYY/tdtd 
rows=2YYY/tdtd rows=2YYY/tdtd rows=2YYY/td/trtr 
bottomframe=ontdYYY/tdtdYYY/tdtdYYY/td/tr
  /header
  body

trtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/td/tr

trtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/td/tr

trtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/td/tr

trtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/td/tr

trtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/td/tr

trtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/td/tr

trtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/td/tr

trtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/td/tr

trtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/td/tr

trtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/td/tr

trtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/td/tr

trtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/td/tr

trtdXXX/tdtdXXX/tdtdXXX/tdtdXXX/tdtdXXX

Re: [NTG-context] XML and Multipage table

2006-04-13 Thread Hans Hagen
Johannes Graumann wrote:
 Hello,

 Does anybody have an insight into why a table created with the following
 mapping rule for XML code does not present it's caption and is not split?

 Thanks Joh

 \defineXMLnested
   [table]
   {\bgroup
\defineXMLsave[caption]
\defineXMLsave[header]
\defineXMLsave[body]
%\defineXMLnested[header]{\bTABLEhead} {\eTABLEhead}
%\defineXMLnested[body]  {\bTABLEbody} {\eTABLEbody}
\placetable
   [\XMLpar{table}{location}{here}]
   [\XMLpar{table}{label}{unknown}]
   {\XMLflush{caption}}
   \bgroup
  
 \setupTABLE[frame=off,split=repeat,style={\switchtobodyfont[small]\setupinterlinespace[line=2.8ex]}]

 \framed[frame=off,topframe=on,bottomframe=on,offset=none,rulethickness=0.75pt]
 \bgroup \bTABLE[distance=7.5pt]
 \bTABLEhead
   \XMLflush{header}
 \eTABLEhead
 \bTABLEbody
   \XMLflush{body}
 \eTABLEbody
 \bTABLEfoot\eTABLEfoot
 }
   {\eTABLE
\egroup
\egroup
\egroup}
   
first of all, putting a \framed around it makes it unsplittable; best use the 
framed options that come with the floats 

second, there's a problem in signaling the splitter, which demands a patch

\unprotect

% in core-ntb : we check the flag 

\def\splittblbox#1%
  {\ifinsidesplitfloat
 \donetrue
   \else\ifinsidefloat
 \donefalse
   \else
 \donetrue
   \fi\fi
   \ifdone
 \executeifdefined{splittblbox\tbltblsplitmethod}\splittblboxa{#1}%
   \else
 \notsplittblbox{#1}%
   \fi}

% in page-flt : we add a flag 

\newif\ifinsidesplitfloat % will become chardef

\def\dosplitfloat[#1]#2% nog dubbele refs
  {\ifinsidecolumns% tzt ook nog figuren splitten
 % not yet supported
   \else
 \bgroup
 \insidefloattrue
 \insidesplitfloattrue
 \getparameters[\??si][#1]%
 \resetnumber[\??si]%
 \def\floatcaptionsuffix{\convertednumber[\??si]}%
 \TABLEcaptionheight\@@silines\lineheight % brrr
 \simplifypagebreak % \page becomes \goodbreak
 \dowithnextbox
   {\forgetall
\dontcomplain
\doloop
  {\setbox2\vsplit\nextbox to \lineheight
   \setbox2\vbox{\unvbox2}
   \ifdim\ht2\lineheight
 \incrementnumber[\??si]%
 \ifcase\rawnumber[\??si]\or \ifdim\nextboxht=\zeropoint
   \let\floatcaptionsuffix\empty
 \fi \fi
 \bgroup
 #2{\unvbox2}
 \egroup
 \ifdim\nextboxht\zeropoint
   \page
   \decrementnumber[\floatcaptionnumber]%
 \fi
   \fi
   \ifdim\nextboxht\zeropoint\else
 \expandafter\exitloop
   \fi}%
\egroup}
 \vbox
   \fi}

% beware: you need to set the splitmethod to b (boxed split) 

\starttext

\splitfloat
  {\placetable{test}}
  {\bTABLE[split=repeat,splitmethod=b]
 \dorecurse{100}{\bTR \bTD test \eTD \eTR}
   \eTABLE}

\stoptext

this whole splitting has to be revised (although a two way singaling is not 
that trivial here) 

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
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] XML and Multipage table

2006-04-12 Thread Johannes Graumann
Hello,

Does anybody have an insight into why a table created with the following
mapping rule for XML code does not present it's caption and is not split?

Thanks Joh

\defineXMLnested
  [table]
  {\bgroup
   \defineXMLsave[caption]
   \defineXMLsave[header]
   \defineXMLsave[body]
   %\defineXMLnested[header]{\bTABLEhead} {\eTABLEhead}
   %\defineXMLnested[body]  {\bTABLEbody} {\eTABLEbody}
   \placetable
  [\XMLpar{table}{location}{here}]
  [\XMLpar{table}{label}{unknown}]
  {\XMLflush{caption}}
  \bgroup
 
\setupTABLE[frame=off,split=repeat,style={\switchtobodyfont[small]\setupinterlinespace[line=2.8ex]}]
   
\framed[frame=off,topframe=on,bottomframe=on,offset=none,rulethickness=0.75pt]
\bgroup \bTABLE[distance=7.5pt]
\bTABLEhead
  \XMLflush{header}
\eTABLEhead
\bTABLEbody
  \XMLflush{body}
\eTABLEbody
\bTABLEfoot\eTABLEfoot
}
  {\eTABLE
   \egroup
   \egroup
   \egroup}

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] XML and table interpretation

2006-04-10 Thread Johannes Graumann
Hans,

With your help, I got this to work:

\defineXMLnested
[table]
{
\bgroup
\defineXMLsave[caption]
\defineXMLsave[header]
\defineXMLsave[body]
}
{
\placetable
[\XMLpar{table}{location}{here}]
[\XMLpar{table}{label}{unknown}]
{\XMLflush{caption}}
{
\ix\setupinterlinespace[reset,small]
\framed[frame=off,topframe=on,bottomframe=on,offset=none,rulethickness=1pt]
\bgroup
\setupTABLE[frame=off,split=repeat,splitmethod=a]
\expanded{\bTABLE[distance=10pt]\XMLflush{header}\XMLflush{body}}\eTABLE
\egroup
\x}
\egroup
}

\defineXMLnested 
[tr]
[bottomframe=off,rulethickness=0.3pt]
{\expanded{\bTR[bottomframe=\XMLop{bottomframe},rulethickness=\XMLop{rulethickness}]}}
{\eTR}

\defineXMLnested
[td]
[rows=1,cols=1]
{\bTD[nr=\XMLop{rows},nc=\XMLop{cols}]}
{\eTD}

But my endless quest for perfection would prefer something like
\expanded{\bTABLE[distance=10pt]\bTABLEhead\XMLflush{header}\eTABLEhead\bTABLEbody\XMLflush{body}\eTABLEbody}\eTABLE
, so I can read in a table like this AND have it spread over multiple pages:
table label=Name
 caption
  Semething
 /caption
 header
  tr bottomframe=ontd rows=2Gene product/tdtd cols=3HPM  
  tag/tdtd rows=2TAP tag/tdtd rows=2mod. TAP tag/tdtd  
  rows=2Frequ. in ref. set/td/tr
  tr
bottomframe=ontdExp.thinspace;1/tdtdExp.thinspace;2/tdtdExp.thinspace;3/td/tr
 /header
 body
  trtdGcn5p/tdtd41thinspace;(41)/tdtd25thinspace;  
  (25)/tdtd65thinspace;(65)/tdtd19thinspace;
  (19)/tdtd21thinspace;(21)/tdtd4.55percent;/td/tr
 /body
/table

The error I get when trying this is:
! Argument of \dotripletestemptyx has an extra }.
inserted text
\par
to be read again
   }
\expanded ...long \xdef \@@expanded {\noexpand #1}
  \@@expanded
\dogetgrouped ...ody \XMLflush {body}\eTABLEbody }
  \eTABLE \egroup \x }
\egroup
l.417   /table

After searching the archives I was wondering whether the multipage aspect is
doable at all with 'TABLE' and if yes how.

Thanks for any further input,

Joh

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] XML and table interpretation

2006-04-10 Thread Hans Hagen
Johannes Graumann wrote:
 Hans,

 With your help, I got this to work:

 \defineXMLnested
 [table]
 {
 \bgroup
 \defineXMLsave[caption]
 \defineXMLsave[header]
   
maybe :

\defineXMLnested[header]
  {\bTABLEhead}
 {\eTABLEhead}

 \defineXMLsave[body]
   
 }
 {
 \placetable
 [\XMLpar{table}{location}{here}]
 [\XMLpar{table}{label}{unknown}]
 {\XMLflush{caption}}
 {
 \ix\setupinterlinespace[reset,small]
 \framed[frame=off,topframe=on,bottomframe=on,offset=none,rulethickness=1pt]
 \bgroup
 \setupTABLE[frame=off,split=repeat,splitmethod=a]
 \expanded{\bTABLE[distance=10pt]\XMLflush{header}\XMLflush{body}}\eTABLE
 \egroup
 \x}
 \egroup
 }

 \defineXMLnested 
 [tr]
 [bottomframe=off,rulethickness=0.3pt]
 {\expanded{\bTR[bottomframe=\XMLop{bottomframe},rulethickness=\XMLop{rulethickness}]}}
 {\eTR}

 \defineXMLnested
 [td]
 [rows=1,cols=1]
 {\bTD[nr=\XMLop{rows},nc=\XMLop{cols}]}
 {\eTD}

 But my endless quest for perfection would prefer something like
 \expanded{\bTABLE[distance=10pt]\bTABLEhead\XMLflush{header}\eTABLEhead\bTABLEbody\XMLflush{body}\eTABLEbody}\eTABLE
 , so I can read in a table like this AND have it spread over multiple pages:
 table label=Name
  caption
   Semething
  /caption
  header
   tr bottomframe=ontd rows=2Gene product/tdtd cols=3HPM  
   tag/tdtd rows=2TAP tag/tdtd rows=2mod. TAP tag/tdtd  
   rows=2Frequ. in ref. set/td/tr
   tr
 bottomframe=ontdExp.thinspace;1/tdtdExp.thinspace;2/tdtdExp.thinspace;3/td/tr
  /header
  body
   trtdGcn5p/tdtd41thinspace;(41)/tdtd25thinspace;  
   (25)/tdtd65thinspace;(65)/tdtd19thinspace;
   (19)/tdtd21thinspace;(21)/tdtd4.55percent;/td/tr
  /body
 /table

 The error I get when trying this is:
 ! Argument of \dotripletestemptyx has an extra }.
 inserted text
 \par
 to be read again
}
 \expanded ...long \xdef \@@expanded {\noexpand #1}
   \@@expanded
 \dogetgrouped ...ody \XMLflush {body}\eTABLEbody }
   \eTABLE \egroup \x }
 \egroup
 l.417   /table

 After searching the archives I was wondering whether the multipage aspect is
 doable at all with 'TABLE' and if yes how.

 Thanks for any further input,

 Joh

 ___
 ntg-context mailing list
 ntg-context@ntg.nl
 http://www.ntg.nl/mailman/listinfo/ntg-context
   


-- 

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

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] XML and table interpretation

2006-04-10 Thread Hans Hagen
Johannes Graumann wrote:
 Hans,

 With your help, I got this to work:

 \defineXMLnested
 [table]
 {
 \bgroup
 \defineXMLsave[caption]
 \defineXMLsave[header]
 \defineXMLsave[body]
 }
 {
 \placetable
 [\XMLpar{table}{location}{here}]
 [\XMLpar{table}{label}{unknown}]
 {\XMLflush{caption}}
 {
 \ix\setupinterlinespace[reset,small]
 \framed[frame=off,topframe=on,bottomframe=on,offset=none,rulethickness=1pt]
 \bgroup
 \setupTABLE[frame=off,split=repeat,splitmethod=a]
 \expanded{\bTABLE[distance=10pt]\XMLflush{header}\XMLflush{body}}\eTABLE
 \egroup
 \x}
 \egroup
 }

 \defineXMLnested 
 [tr]
 [bottomframe=off,rulethickness=0.3pt]
 {\expanded{\bTR[bottomframe=\XMLop{bottomframe},rulethickness=\XMLop{rulethickness}]}}
 {\eTR}

 \defineXMLnested
 [td]
 [rows=1,cols=1]
 {\bTD[nr=\XMLop{rows},nc=\XMLop{cols}]}
 {\eTD}

 But my endless quest for perfection would prefer something like
 \expanded{\bTABLE[distance=10pt]\bTABLEhead\XMLflush{header}\eTABLEhead\bTABLEbody\XMLflush{body}\eTABLEbody}\eTABLE
 , so I can read in a table like this AND have it spread over multiple pages:
 table label=Name
  caption
   Semething
  /caption
  header
   tr bottomframe=ontd rows=2Gene product/tdtd cols=3HPM  
   tag/tdtd rows=2TAP tag/tdtd rows=2mod. TAP tag/tdtd  
   rows=2Frequ. in ref. set/td/tr
   tr
 bottomframe=ontdExp.thinspace;1/tdtdExp.thinspace;2/tdtdExp.thinspace;3/td/tr
  /header
  body
   trtdGcn5p/tdtd41thinspace;(41)/tdtd25thinspace;  
   (25)/tdtd65thinspace;(65)/tdtd19thinspace;
   (19)/tdtd21thinspace;(21)/tdtd4.55percent;/td/tr
  /body
 /table

 The error I get when trying this is:
 ! Argument of \dotripletestemptyx has an extra }.
 inserted text
 \par
 to be read again
}
 \expanded ...long \xdef \@@expanded {\noexpand #1}
   \@@expanded
 \dogetgrouped ...ody \XMLflush {body}\eTABLEbody }
   \eTABLE \egroup \x }
 \egroup
 l.417   /table

 After searching the archives I was wondering whether the multipage aspect is
 doable at all with 'TABLE' and if yes how.

 Thanks for any further input,
   
\defineXMLnested
  [tr]
  [bottomframe=off,rulethickness=0.3pt]
  
{\expanded{\bTR[bottomframe=\XMLop{bottomframe},rulethickness=\XMLop{rulethickness}]}}
  {\eTR}

\defineXMLnested
  [td]
  [rows=1,cols=1]
  {\expanded{\bTD[nr=\XMLop{rows},nc=\XMLop{cols}]}}
  {\eTD}

\defineXMLnested
  [table]
  {\bgroup
   \defineXMLsave[caption]
   \defineXMLnested[header]{\bTABLEhead} {\eTABLEhead}
   \defineXMLnested[body]  {\bTABLEbody} {\eTABLEbody}
   \placetable
  [\XMLpar{table}{location}{here}]
  [\XMLpar{table}{label}{unknown}]
  {\XMLflush{caption}}
  \bgroup
  \setupTABLE[frame=off,split=repeat,splitmethod=a]
  \ix\setupinterlinespace[reset,small]
  \framed
[frame=off,topframe=on,bottomframe=on,offset=none,rulethickness=1pt]
\bgroup \bTABLE[distance=10pt]}
  {\eTABLE
   \egroup
   \egroup
   \egroup}



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

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] TABLE starts to late...

2006-04-10 Thread Peter Münster
Hello,
I have a problem with TABLE:

\starttext
\section{bla}
\subsection{bla}
\placefigure{bla}{\vbox to 16cm{bla}}
\section{bla}
\subsection{bla} % Table should begin here, but does not!
\bTABLE[split=repeat]
\bTABLEhead \bTR \bTH bla\eTH \eTR \eTABLEhead
\bTABLEbody \dorecurse{100}{\bTR\bTD bla\eTD \eTR} \eTABLEbody
\eTABLE
\stoptext

Could someone help please?
Cheers, Peter

-- 
http://pmrb.free.fr/contact/
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] TABLE starts to late...

2006-04-10 Thread Hans Hagen
� wrote:
 Hello,
 I have a problem with TABLE:

 \starttext
 \section{bla}
 \subsection{bla}
 \placefigure{bla}{\vbox to 16cm{bla}}
 \section{bla}
 \subsection{bla} % Table should begin here, but does not!
 \bTABLE[split=repeat]
 \bTABLEhead \bTR \bTH bla\eTH \eTR \eTABLEhead
 \bTABLEbody \dorecurse{100}{\bTR\bTD bla\eTD \eTR} \eTABLEbody
 \eTABLE
 \stoptext

 Could someone help please?
   
\synchronizeoutput

\bTABLE[split=repeat]
\bTABLEhead \bTR \bTH bla\eTH \eTR \eTABLEhead
\bTABLEbody \dorecurse{100}{\bTR\bTD bla\eTD \eTR} \eTABLEbody
\eTABLE

although \synchronizeoutput may mess up spacing 

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
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] XML and table interpretation

2006-04-10 Thread Johannes Graumann
Hans Hagen wrote:
 \defineXMLnested
   [tr]
   [bottomframe=off,rulethickness=0.3pt]
  
{\expanded{\bTR[bottomframe=\XMLop{bottomframe},rulethickness=\XMLop{rulethickness}]}}
   {\eTR}
 
 \defineXMLnested
   [td]
   [rows=1,cols=1]
   {\expanded{\bTD[nr=\XMLop{rows},nc=\XMLop{cols}]}}
   {\eTD}
 
 \defineXMLnested
   [table]
   {\bgroup
\defineXMLsave[caption]
\defineXMLnested[header]{\bTABLEhead} {\eTABLEhead}
\defineXMLnested[body]  {\bTABLEbody} {\eTABLEbody}
\placetable
   [\XMLpar{table}{location}{here}]
   [\XMLpar{table}{label}{unknown}]
   {\XMLflush{caption}}
   \bgroup
   \setupTABLE[frame=off,split=repeat,splitmethod=a]
   \ix\setupinterlinespace[reset,small]
   \framed
 [frame=off,topframe=on,bottomframe=on,offset=none,rulethickness=1pt]
 \bgroup \bTABLE[distance=10pt]}
   {\eTABLE
\egroup
\egroup
\egroup}
Great! No more errors! But with this solution the caption disappears ...
strange. Also: breaking the table across pages doesn't work
despite 'split=repeat,splitmethod=a' - do I have to call a split explicitly
somewhere?

Joh

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Multi-page tables

2006-03-08 Thread Randall Skelton
Hi all,

I'm having a bit of trouble getting multiple page tables to work when
also using \placetable for captions.  Essentially, I want:
  (1) Captions and the ability to reference with \in[].
  (2) Alignment within a cell at a decimal point.
  (3) Span multiple pages with header/footer.

I think I would prefer to use the standard 'TABLES' method but it
looks like item 2 is only supported in natural tables?

Below are two examples.  I don't get page breaks in either case and
the table runs off the bottom of pages 2 and 3.

Thanks,
Randall

\definepapersize
  [width=8.5in,
   height=11in]

\setupcaption[table]
  [location=top]

\starttext

\section{Testing}
This is a silly table test.

\placetable[page][tbl:sample]
  {Sample table caption goes here}
  {\start
   \switchtobodyfont[small]
   \starttablehead
   \HL
   \VL command  \NC meaning  \NC $\lambda$ (deg.) \VL\SR
   \HL
   \stoptablehead
   \starttabletail
   \HL
   \stoptabletail
   \starttables[|c|l|c|]
   \VL \tex{NC}\NC next column \NC1.15 \VL\FR
   \VL \tex{HL}\NC horizontal line \NC   10.20 \VL\MR
   \VL \tex{VL}\NC vertical line   \NC  -14.30 \VL\MR
   \VL \tex{NR}\NC next row\NC -100.00 \VL\MR
   \VL \tex{SR}\NC single row  \NC2.35 \VL\MR
   \VL \tex{FR}\NC first row   \NC  159.00 \VL\MR
   \VL \tex{MR}\NC middle row  \NC   -1.00 \VL\MR
   \VL \tex{LR}\NC last row\NCnr   \VL\MR
   \VL \tex{NC}\NC next column \NC1.15 \VL\MR
   \VL \tex{HL}\NC horizontal line \NC   10.20 \VL\MR
   \VL \tex{VL}\NC vertical line   \NC  -14.30 \VL\MR
   \VL \tex{NR}\NC next row\NC -100.00 \VL\MR
   \VL \tex{SR}\NC single row  \NC2.35 \VL\MR
   \VL \tex{FR}\NC first row   \NC  159.00 \VL\MR
   \VL \tex{MR}\NC middle row  \NC   -1.00 \VL\MR
   \VL \tex{LR}\NC last row\NCnr   \VL\MR
   \VL \tex{NC}\NC next column \NC1.15 \VL\MR
   \VL \tex{HL}\NC horizontal line \NC   10.20 \VL\MR
   \VL \tex{VL}\NC vertical line   \NC  -14.30 \VL\MR
   \VL \tex{NR}\NC next row\NC -100.00 \VL\MR
   \VL \tex{SR}\NC single row  \NC2.35 \VL\MR
   \VL \tex{FR}\NC first row   \NC  159.00 \VL\MR
   \VL \tex{MR}\NC middle row  \NC   -1.00 \VL\MR
   \VL \tex{LR}\NC last row\NCnr   \VL\MR
   \VL \tex{NC}\NC next column \NC1.15 \VL\MR
   \VL \tex{HL}\NC horizontal line \NC   10.20 \VL\MR
   \VL \tex{VL}\NC vertical line   \NC  -14.30 \VL\MR
   \VL \tex{NR}\NC next row\NC -100.00 \VL\MR
   \VL \tex{SR}\NC single row  \NC2.35 \VL\MR
   \VL \tex{FR}\NC first row   \NC  159.00 \VL\MR
   \VL \tex{MR}\NC middle row  \NC   -1.00 \VL\MR
   \VL \tex{LR}\NC last row\NCnr   \VL\MR
   \VL \tex{NC}\NC next column \NC1.15 \VL\MR
   \VL \tex{HL}\NC horizontal line \NC   10.20 \VL\MR
   \VL \tex{VL}\NC vertical line   \NC  -14.30 \VL\MR
   \VL \tex{NR}\NC next row\NC -100.00 \VL\MR
   \VL \tex{SR}\NC single row  \NC2.35 \VL\MR
   \VL \tex{FR}\NC first row   \NC  159.00 \VL\MR
   \VL \tex{MR}\NC middle row  \NC   -1.00 \VL\MR
   \VL \tex{LR}\NC last row\NCnr   \VL\MR
   \VL \tex{NC}\NC next column \NC1.15 \VL\MR
   \VL \tex{HL}\NC horizontal line \NC   10.20 \VL\MR
   \VL \tex{VL}\NC vertical line   \NC  -14.30 \VL\MR
   \VL \tex{NR}\NC next row\NC -100.00 \VL\MR
   \VL \tex{SR}\NC single row  \NC2.35 \VL\MR
   \VL \tex{FR}\NC first row   \NC  159.00 \VL\MR
   \VL \tex{MR}\NC middle row  \NC   -1.00 \VL\MR
   \VL \tex{LR}\NC last row\NCnr   \VL\LR
   \stoptables
   \stop}

\section{Natural Testing}
This is a silly natural table test.

\placetable[page][tbl:naturalSample]
  {Sample table caption goes here}
  {\start
   \switchtobodyfont[small]
   \bTABLE[split=repeat,
   splitmethod=a]
  % Outside border
  \setupTABLE[frame=off]
  \setupTABLE[column][first][leftframe=on]
  \setupTABLE[column][last][rightframe=on]
  \setupTABLE[row][first][topframe=on]
  \setupTABLE[row][last][bottomframe=on]
  % Heading line bottom rule
  \setupTABLE[row][first][bottomframe=on]
  % Alignment
  \setupTABLE[column][1][width=2.5cm,align=middle]
  \setupTABLE[column][2][width=2.5cm,align=right]
  
\setupTABLE[column][3][width=2.5cm,alignmentcharacter={.},aligncharacter=yes,align=middle]
  % Header
  \bTABLEhead
\bTR\bTD command \eTD\bTD meaning \eTD\bTD $\lambda$ (deg.) \eTD\eTR
  \eTABLEhead
  % Body
  \bTABLEbody
\bTR\bTD \tex{NC}\eTD\bTD next column \eTD\bTD1.15 \eTD\eTR
\bTR\bTD \tex{HL}\eTD\bTD horizontal line \eTD\bTD   10.20 \eTD\eTR
\bTR\bTD \tex{VL}\eTD\bTD vertical line   \eTD\bTD  -14.30 \eTD\eTR
\bTR\bTD \tex{NR}\eTD\bTD next row

[NTG-context] multipage table in columns

2005-08-09 Thread Eckhart Guthöhrlein
Hi all,

I have to build a table which should split over several columns
(probably two) and, if necessary, across pages.
I have tried this with

\starttext
\startcolumns[n=3]
\setupTABLE[split=yes]
\bTABLE
\bTABLEhead
\bTR \bTD Head \eTD \bTD Head~2 \eTD \eTR
\eTABLEhead
\bTABLEbody
\bTR \bTD once \eTD \bTD once~2 \eTD \eTR
\dorecurse{120}{%
\bTR \bTD test \eTD \bTD test~2 \eTD \eTR
}
\eTABLEbody
\bTABLEfoot
\bTR \bTD low \eTD \bTD low~2 \eTD \eTR
\eTABLEfoot
\eTABLE
\stopcolumns
\stoptext

This does something at least similar to what I had in mind :-)
Problems:

- As soon a page break is involved, the balancing algorithm gets totally
confused. For example, the code above gives me three pages, with a
single cell on the second one. The head is repeated only on the third
page.

- How can I make a column break trigger head repetition instead of a
page break?

- How to get the footer repeated at the end of each column, too?

Furthermore, there are some old messages concerning captions for
multipage tables, but I could not find a satisfactory answer. How can I
get a caption on the first page and something like Table x cont. on
the following ones?

Thanks,
-- 
Eckhart
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] confused on which table

2005-04-11 Thread Hans Hagen
Paul Tremblay wrote:
On Sun, Apr 10, 2005 at 11:23:33PM +0200, Henning Hraban Ramm wrote:
There's those few samples at
http://www.contextgarden.net/Linetable
and some remarks the source at
http://source.contextgarden.net/core-ltb.tex

I've seen these, but the information isn't really enough to get me
started. If someone could help me out, I'd be willing to try to
document them.

Hm, perhaps...
in http://source.contextgarden.net/core-ntb.tex
there's TABLE(head|foot|body|next) and (b|e)TH, maybe that does what 
you need (didn't try)


I tried:
\bTABLEhead
...
\eTABLEhead
\bTABLEbody
\eTABLEbody
This only puts the heading at the top of the first page. There may be
some option to set in \setupTABLE.
compare the settngs
split=yes
split=repeat
there is also
\bTABLEnext
\eTABLEnext
for following pages
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
-
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] paragraphs in starttables

2005-02-16 Thread Peter Münster
On Wed, 16 Feb 2005, Hans Hagen wrote:

  Without success means: I don't get anything similar to \starttablehead or
  \starttabletail
  
  The head and the foot appear, but not on each page. I think, I just don't
  know how to use all these commands the right way...
 
 split=repeat

Hello Hans,
thank you, this enables repetition of the heads. Unfortunately, the footer
does not get repeated. Here a minimal example:

\starttext

\bTABLE[split=repeat]

\bTABLEhead
\bTR \bTD top of the page \eTD \eTR
\eTABLEhead

\bTABLEfoot
\bTR \bTD bottom of the page \eTD \eTR
\eTABLEfoot

\bTABLEbody
\dorecurse{150}{\bTR \bTD the body \eTD \eTR}
\eTABLEbody

\eTABLE

\stoptext

Could you help again?
Cheers, Peter

-- 
http://pmrb.free.fr/contact/
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] paragraphs in starttables

2005-02-15 Thread Peter Münster
On Tue, 15 Feb 2005, Hans Hagen wrote:

 bTABle ... it can split if you say
 
 \setupTABLE[split=yes] % splitmethod=a|b
 
 you can make head, foot and body sections as well as define alternative
 headers for the split off parts

Ok, I'm going to try bTABLE. How can I define header and tail for each
page? Is there any reference for this table type, I only found enattab.pdf
with some examples.
Here is some code, that I tried, but without success:

\starttext

\bTABLE[split=yes,splitmethod=a] % splitmethod=b gives an error

\bTABLEhead
\bTR \bTD top of the page \eTD \eTR
\eTABLEhead

\bTABLEfoot
\bTR \bTD bottom of the page \eTD \eTR
\eTABLEfoot

\bTABLEnext
\bTR \bTD next one \eTD \eTR
\eTABLEnext

\bTABLEbody
\dorecurse{50}{\bTR \bTD the body \eTD \eTR}
\eTABLEbody

\eTABLE

\stoptext

TIA for any help.
Greetings, Peter

-- 
http://pmrb.free.fr/contact/
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Re: mag-0008

2004-12-15 Thread Hans Hagen
=default,level=1]
  {\initializefox
\expanded{\definehead[fx:head:\foxlabel][section=section-\foxlevel,incrementnumber=no]}%
   \expanded{\setuphead[fx:head:\foxlabel][\foxarguments,alternative=command]}}
\defineXMLcommand
  [fx:setuphead] [fox] [label=default]
  {\initializefox
   \expanded{\setuphead[fx:head:\foxlabel][\foxarguments,alternative=command]}}
\defineXMLenvironmentsave
  [fx:head] [fox] [label=default]
  {\bgroup}
  {\initializefox
   \expanded{\setuphead[fx:head:\foxlabel][\foxarguments,alternative=command]}%
   \getvalue{fx:head:\foxlabel}{\vbox{\forgetall\XMLflush{fx:head}}}%
   \egroup}
% page
\defineXMLcommand
  [fx:page] [fox] [command=yes]
  {\initializefox
   \expanded{\page[\foxcommand]}}
% tabulate / todo: in context preamble also definable this way, then direct map
\setuptabulate[before=,after=]
\startsetups fox:tabulate
\defineXMLenvironment
[fx:preamble]
{\scratchtoks\emptytoks}
{\appendetoks|\to\scratchtoks}
\defineXMLpickup
[fx:tbody]
{\expanded{\starttabulate[\the\scratchtoks]}}
{\stoptabulate}
\defineXMLcommand
[fx:e] [fox] [width=,align=,type=line,style=] % line|paragraph
{\initializefox
 \appendetoks|\to\scratchtoks
 \doifelse{\foxtype}{paragraph}{\appendetoks 
p\to\scratchtoks}{\appendetoks w\to\scratchtoks}%
 \doifsomething{\foxwidth}{\appendetoks(\foxwidth)\to\scratchtoks}%
 \appendetoks\XMLval{fox:tab:style}{\foxstyle}{}\to\scratchtoks
 \appendetoks\XMLval{fox:tab:align}{\foxalign}{}\to\scratchtoks}

\defineXMLenvironment [fx:r]  {}{\NC \NR}
\defineXMLenvironment [fx:c]  {\NC} {}
\defineXMLenvironment [fx:tr] {}{\NC \NR}
\defineXMLenvironment [fx:td] {\NC} {}
\stopsetups
\mapXMLvalue {fox:tab:align} {flushleft}  {l}
\mapXMLvalue {fox:tab:align} {flushright} {r}
\mapXMLvalue {fox:tab:align} {center} {c}
\mapXMLvalue {fox:tab:style} {italic} {I}
\mapXMLvalue {fox:tab:style} {bold}   {B}
\mapXMLvalue {fox:tab:style} {slanted}{S}
\defineXMLenvironment
  [fx:tabulate] [fox] []
  {}
  {}
\defineXMLenvironment
  [fx:tabulate] [fox] []
  {\bgroup
   \directsetup{fox:tabulate}}
  {\egroup}
% itemize
\defineXMLcommand
  [fx:defineitemize] [fox] [label=default] % maybe also \defineitemgroup as 
synonym
  {\initializefox
   \expanded{\defineitemgroup[\foxlabel]}%
   \expanded{\setupitemgroup[\foxlabel][\foxarguments]}}
\defineXMLcommand
  [fx:setupitemize] [fox] [label=default]
  {\initializefox
   \expanded{\setupitemgroup[\foxlabel][\foxarguments]}}
\defineXMLenvironment
  [fx:itemize] [fox] [label=default]
  {\initializefox
   \expanded{\startitemgroup[\foxlabel]}\ignorespaces}
  {\stopitemgroup}
\defineXMLenvironment
  [fx:item] [fox] [type=normal,symbol=]
  {\initializefox
   \XMLval{fox:item:type}{\foxtype}{normal}}
  {\par}
\mapXMLvalue {fox:item:type} {normal} {\item}
\mapXMLvalue {fox:item:type} {margin} {\mar{\foxsymbol}}
\mapXMLvalue {fox:item:type} {symbol} {\sym{\foxsymbol}}
% table
% first last odd even row column header each n m
\startsetups fox:table
\defineXMLprocess
[fx:preamble]
\defineXMLcommand [fx:c] [fox] [r=each]
{\initializefox\expanded{\setupTABLE[r][\foxr][\foxarguments]}}
\defineXMLcommand
[fx:r] [fox] [c=each]
{\initializefox\expanded{\setupTABLE[c][\foxc][\foxarguments]}}
\defineXMLcommand
[fx:h] [fox] [c=each]
{\initializefox\expanded{\setupTABLE[header][\foxc][\foxarguments]}}
\defineXMLcommand
[fx:e] [fox] [type=,c=each,r=each]
{\initializefox
 \doifelse{\foxtype}{row}
   {\expanded{\setupTABLE[r][\foxr][\foxarguments]}}
   {\doifelse{\foxtype}{column}
  {\expanded{\setupTABLE[c][\foxc][\foxarguments]}}
  {\expanded{\setupTABLE[\foxc][\foxr][\foxarguments]
\defineXMLnested [fx:thead] [fox] [] 
{\expanded{\bTABLEhead[\foxarguments]}} {\eTABLEhead}
\defineXMLnested [fx:tfoot] [fox] [] 
{\expanded{\bTABLEfoot[\foxarguments]}} {\eTABLEfoot}
\defineXMLnested [fx:tnext] [fox] [] 
{\expanded{\bTABLEnext[\foxarguments]}} {\eTABLEnext}
\defineXMLnested [fx:tbody] [fox] [] 
{\expanded{\bTABLEbody[\foxarguments]}} {\eTABLEbody}
\defineXMLnested [fx:tr][fox] [] {\expanded{\bTR[\foxarguments]}} 
  {\eTR}
\defineXMLnested [fx:td][fox] [] {\expanded{\bTD[\foxarguments]}} 
  {\eTD}

\stopsetups
\defineXMLnested
  [fx:table] [fox] []
  {\bgroup
   \directsetup{fox:table}
   \expanded{\bTABLE[\foxarguments]}}
  {\eTABLE
   \egroup}
% misc
\defineXMLenvironment
  [fx:narrower] [fox] [left=0em,right=0em]
  {\expanded{\setupnarrower[\foxarguments]}%
   \startnarrower[middle]}
  {\stopnarrower}
\defineXMLenvironment
  [fx:text] [fox] []
  {\starttext}
  {\stoptext}
% paragraphs
\newcount \paragraphdepth
\defineXMLenvironment
[fx:p] [fox] [strut=no]
{\advance\paragraphdepth\plusone
 \initializefox
 \doifelse{\foxstrut}{yes}
   {\setvalue

[NTG-context] \bTABLE[split=yes]

2004-06-01 Thread Nigel King
All,
I thought the following long table would split but it doesn't seem to 
using the current beta. Am I missing something?

\starttext
This is a test of the \type{\TABLE} environment.
\bTABLE[split=yes]
\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{30}{\bTR \bTD[nr=3] left \eTD\bTD right \eTD \eTR
\bTR\bTD right \eTD \eTR
\bTR[after={\page[yes]}]\bTD right \eTD \eTR}
\eTABLEbody
\eTABLE
\stoptext
TIA
--
Nigel
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \bTABLE[split=yes]

2004-06-01 Thread Hans Hagen
At 16:50 01/06/2004, you wrote:
All,
I thought the following long table would split but it doesn't seem to 
using the current beta. Am I missing something?

\starttext
This is a test of the \type{\TABLE} environment.
\bTABLE[split=yes]
\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{30}{\bTR \bTD[nr=3] left \eTD\bTD right \eTD \eTR
\bTR\bTD right \eTD \eTR
\bTR[after={\page[yes]}]\bTD right \eTD \eTR}
\eTABLEbody
\eTABLE
\stoptext
split=repeat
splitmethod=a|b
i still need to fix break prevention within a rowspan
Hans
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] repeated headers in the TABLE environment

2003-10-16 Thread Lutz Haseloff
Henning Hraban Ramm schrieb:

Am Mittwoch, 15.10.03, um 10:36 Uhr (Europe/Zurich) schrieb Lutz 
Haseloff:

how can i get repeated headers for a splitted
TABLE?
I tried to define \setupTABLE[split=yes]
and have \bTH \eTH in my header row.


\bTABLEhead
(header)
\eTABLEhead
\bTABLEtail
(footer)
\eTABLEtail
\bTABLE[split=repeat] % otherwise you don't get repeated headers; 
footers are never repeated

Grüßlis vom Hraban!
I tried:
--
\setupTABLE[split=repeat]
\starttext
\bTABLE
\bTABLEhead
\bTR\bTD \bf Header \eTD \bTD \bf Header \eTD\bTD \bf Header \eTD\bTD 
\bf Header\eTD\eTR
\eTABLEhead
\dorecurse{40}{\bTR\bTD Test\eTD \bTD period \eTD\bTD period \eTD\bTD 
period \eTD\eTR}
\eTABLE
\stoptext
--

but the header is set at the foot of the table and only once.

Greetings Lutz

___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] repeated headers in the TABLE environment

2003-10-16 Thread Henning Hraban Ramm
Am Donnerstag, 16.10.03, um 09:19 Uhr (Europe/Zurich) schrieb Lutz 
Haseloff:
--
\setupTABLE[split=repeat]
\starttext
\bTABLE
\bTABLEhead
\bTR\bTD \bf Header \eTD \bTD \bf Header \eTD\bTD \bf Header \eTD\bTD 
\bf Header\eTD\eTR
\eTABLEhead
\dorecurse{40}{\bTR\bTD Test\eTD \bTD period \eTD\bTD period \eTD\bTD 
period \eTD\eTR}
\eTABLE
\stoptext
--
but the header is set at the foot of the table and only once.
You're right, I didn't test it.
Hans wrote in April it would work;
TABLEtail is even completely unknown.
Grüßlis vom Hraban!
--
http://www.fiee.net/texnique/
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] repeated headers in the TABLE environment

2003-10-16 Thread Lutz Haseloff
Henning Hraban Ramm schrieb:

Am Donnerstag, 16.10.03, um 09:19 Uhr (Europe/Zurich) schrieb Lutz 
Haseloff:

--
\setupTABLE[split=repeat]
\starttext
\bTABLE
\bTABLEhead
\bTR\bTD \bf Header \eTD \bTD \bf Header \eTD\bTD \bf Header \eTD\bTD 
\bf Header\eTD\eTR
\eTABLEhead
\dorecurse{40}{\bTR\bTD Test\eTD \bTD period \eTD\bTD period \eTD\bTD 
period \eTD\eTR}
\eTABLE
\stoptext
--
but the header is set at the foot of the table and only once.


You're right, I didn't test it.
Hans wrote in April it would work;
TABLEtail is even completely unknown.
Grüßlis vom Hraban!
Finally i found it in cont-new.tex

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

now it works fine

Greetings Lutz

___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] repeated headers in the TABLE environment

2003-10-15 Thread Henning Hraban Ramm
Am Mittwoch, 15.10.03, um 10:36 Uhr (Europe/Zurich) schrieb Lutz 
Haseloff:

how can i get repeated headers for a splitted
TABLE?
I tried to define \setupTABLE[split=yes]
and have \bTH \eTH in my header row.
\bTABLEhead
(header)
\eTABLEhead
\bTABLEtail
(footer)
\eTABLEtail
\bTABLE[split=repeat] % otherwise you don't get repeated headers; 
footers are never repeated

Grüßlis vom Hraban!
--
http://www.fiee.net/texnique/
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


<    1   2