Re: [NTG-context] Linetables

2014-09-26 Thread Willi Egger
Hi Herbert,

Thanks for your answer! Indeed it works….

Kind regards

Willi
On 23 sep. 2014, at 19:54, Herbert Voss herbert.v...@fu-berlin.de wrote:

 Am 23.09.2014 um 10:59 schrieb Willi Egger:
 
 I would like to use the line table environment. - In order to get started I 
 copied the code from the wiki. After it did not work with the dorecurse 
 commands I simplified the code to
 
 \starttext
 \setuplinetable[n=6,lines=40]
 
 \setuplinetable[c][1]   [width=2cm,background=color,backgroundcolor=red]
 \setuplinetable[c][4]   [width=3cm,background=color,backgroundcolor=yellow]
 \setuplinetable[c][6]   [width=3cm,background=color,backgroundcolor=magenta]
 \setuplinetable[r][odd] [background=color,backgroundcolor=gray]
 \setuplinetable[r][even][background=color,backgroundcolor=green]
 
 it is a problem with reading the parameter [c]. Use l or r instead and
 it will work:
 
 
 
 \starttext
 \setuplinetable[n=6,lines=40]
 
 \setuplinetable[l][1]   [width=2cm,background=color,backgroundcolor=red]
 \setuplinetable[l][4]   [width=3cm,background=color,backgroundcolor=yellow]
 \setuplinetable[l][6]   [width=3cm,background=color,backgroundcolor=magenta]
 \setuplinetable[r][odd] [background=color,backgroundcolor=gray]
 \setuplinetable[r][even][background=color,backgroundcolor=green]
 \showframe \showstruts
 
 \setupcolors[state=start]
 
 \startlinetable
 \NC aaa\crlf aaa \NC bb \NC c \NC d \NC  \NC ff \NC \NR
 \dorecurse{100}{\NC aaa \NC bb \NC c \NC d \NC  \NC ff \NC \NR}
 \stoplinetable
 
 \stoptext
 
 
 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
 ___

___
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] Linetables

2014-09-23 Thread Willi Egger
Good morning!

I would like to use the line table environment. - In order to get started I 
copied the code from the wiki. After it did not work with the dorecurse 
commands I simplified the code to

\starttext
\setuplinetable[n=6,lines=40]

\setuplinetable[c][1]   [width=2cm,background=color,backgroundcolor=red]
\setuplinetable[c][4]   [width=3cm,background=color,backgroundcolor=yellow]
\setuplinetable[c][6]   [width=3cm,background=color,backgroundcolor=magenta]
\setuplinetable[r][odd] [background=color,backgroundcolor=gray]
\setuplinetable[r][even][background=color,backgroundcolor=green]


\showframe \showstruts

\setupcolors[state=start]

\startlinetable
\NC aaa\crlf aaa \NC bb \NC c \NC d \NC  \NC ff} \NC \NR
\stoplinetable

\stoptext

However with and without the dorecurse commands in it i get the following error:

Missing number, treated as zero

to be read again 
d
\s!depth d-d
epth
\pack_black_rule_indeed ...\p_height \fi \s!depth 
  \ifx \p_depth \v!max \stru...
argument ...meter {x\c!depth }, \c!width =\wd \scratchbox ]
  \hskip -\wd \scratchbox \b...
\firstoftwoarguments #1#2c-#1
 
\stoplinetablecell ...ox }\fi }{\box \scratchbox }
  \fi \egroup 
...
l.48 \NC aaa\crlf aaa \NC
bb \NC c \NC d \NC  \NC ff} \NC \NR

38 \setuplinetable[c][6]   
[width=3cm,background=color,backgroundcolor=magenta]
39 \setuplinetable[r][odd] [background=color,backgroundcolor=gray]
40 \setuplinetable[r][even][background=color,backgroundcolor=green]
41 
42 
43 \showframe \showstruts
44 
45 \setupcolors[state=start]
46 
47 \startlinetable
48   \NC aaa\crlf aaa \NC bb \NC c \NC d \NC  \NC ff} \NC \NR
49 \stoplinetable
50 
51 \stoptext

I have no clue why is going wrong here…

Thank you and kind regards

Willi
___
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] Linetables

2014-09-23 Thread Herbert Voss
Am 23.09.2014 um 10:59 schrieb Willi Egger:

 I would like to use the line table environment. - In order to get started I 
 copied the code from the wiki. After it did not work with the dorecurse 
 commands I simplified the code to
 
 \starttext
 \setuplinetable[n=6,lines=40]
 
 \setuplinetable[c][1]   [width=2cm,background=color,backgroundcolor=red]
 \setuplinetable[c][4]   [width=3cm,background=color,backgroundcolor=yellow]
 \setuplinetable[c][6]   [width=3cm,background=color,backgroundcolor=magenta]
 \setuplinetable[r][odd] [background=color,backgroundcolor=gray]
 \setuplinetable[r][even][background=color,backgroundcolor=green]

it is a problem with reading the parameter [c]. Use l or r instead and
it will work:



\starttext
\setuplinetable[n=6,lines=40]

\setuplinetable[l][1]   [width=2cm,background=color,backgroundcolor=red]
\setuplinetable[l][4]   [width=3cm,background=color,backgroundcolor=yellow]
\setuplinetable[l][6]   [width=3cm,background=color,backgroundcolor=magenta]
\setuplinetable[r][odd] [background=color,backgroundcolor=gray]
\setuplinetable[r][even][background=color,backgroundcolor=green]
\showframe \showstruts

\setupcolors[state=start]

\startlinetable
\NC aaa\crlf aaa \NC bb \NC c \NC d \NC  \NC ff \NC \NR
\dorecurse{100}{\NC aaa \NC bb \NC c \NC d \NC  \NC ff \NC \NR}
\stoplinetable

\stoptext


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] linetables broken?

2010-02-22 Thread Hans Hagen

On 21-2-2010 23:46, Wolfgang Schuster wrote:

Am 21.02.10 23:42, schrieb Hans Hagen:

Does that mean nothing is broken, but linetables need to be processed
in buffers?

indeed, as they are processed in several passes

But why can't tabulate grab the content, was this a memory problem in
MkII? TABLE and tabulate use also several passes and don't need this.


linetables were writen for a project where tables could span 100 pages 
or more with tables being split in spreads and pages so indeed memory 
becomes an issue then


some day i might write a variant in lua

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
-
___
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] linetables broken?

2010-02-21 Thread Thomas A. Schmitz
Hi all, 

when I played a bit with linetables today, I found out that something's broken 
here. Minimal example (simplified from tabl-ltb.mkiv):


\starttext


\startlinetable
\NC[background=color,backgroundcolor=darkred] xxx
 \NC yy \NC d \NC  \NC ff \NC \NR
\stoplinetable

\stoptext

I get 
! Missing number, treated as zero.
to be read again 
   d
\!!depth -d
epth
\domakeblackrule ...!!height \@@bjheight \!!depth 
  \@@bjdepth \stopcolor 
\complexblackrule ...[\??bj ][#1]\domakeblackrule 
  \egroup 
argument ...depth }, \c!width =\wd \scratchbox ]
  \hskip -\wd \scratchbox \b...
\firstoftwoarguments #1#2-#1
 
...
l.8  \NC
 yy \NC d \NC  \NC ff \NC \NR

All best

Thomas
___
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] linetables broken?

2010-02-21 Thread Wolfgang Schuster

Am 21.02.10 23:14, schrieb Thomas A. Schmitz:

Hi all,

when I played a bit with linetables today, I found out that something's broken 
here. Minimal example (simplified from tabl-ltb.mkiv):

\startlinetable
\NC[background=color,backgroundcolor=darkred] xxx
  \NC yy \NC d \NC  \NC ff \NC \NR
\stoplinetable
   

You can use the buffer method for linetables

\startbuffer[test]
\NC[background=color,backgroundcolor=darkred] xxx \NC yy \NC d \NC 
 \NC ff \NC\NR

\stopbuffer

\processlinetablebuffer[test]

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] linetables broken?

2010-02-21 Thread Thomas A. Schmitz

On Feb 21, 2010, at 11:31 PM, Wolfgang Schuster wrote:

 You can use the buffer method for linetables
 
 \startbuffer[test]
 \NC[background=color,backgroundcolor=darkred] xxx \NC yy \NC d \NC  
 \NC ff \NC\NR
 \stopbuffer
 
 \processlinetablebuffer[test]
 
 Wolfgang

Wolfgang, thank you, this does work! Does that mean nothing is broken, but 
linetables need to be processed in buffers? 

All best

Thomas
___
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] linetables broken?

2010-02-21 Thread Hans Hagen

On 21-2-2010 23:34, Thomas A. Schmitz wrote:


On Feb 21, 2010, at 11:31 PM, Wolfgang Schuster wrote:


You can use the buffer method for linetables

\startbuffer[test]
\NC[background=color,backgroundcolor=darkred] xxx \NC yy \NC d \NC  \NC 
ff \NC\NR
\stopbuffer

\processlinetablebuffer[test]

Wolfgang


Wolfgang, thank you, this does work! Does that mean nothing is broken, but 
linetables need to be processed in buffers?


indeed, as they are processed in several passes

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
-
___
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] linetables broken?

2010-02-21 Thread Wolfgang Schuster

Am 21.02.10 23:42, schrieb Hans Hagen:
Does that mean nothing is broken, but linetables need to be processed 
in buffers?


indeed, as they are processed in several passes
But why can't tabulate grab the content, was this a memory problem in 
MkII? TABLE and tabulate use also several passes and don't need this.


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] Linetables ROW alignment

2007-07-17 Thread Hans Hagen
Giuseppe Bilotta wrote:
 Hello all again,
 
 I'm using linetables, because despite their lack of
 documentation they've been rather easy to set up to achieve
 the effects I needed (colors, alignment, etc).
 
 I have a small problem with the title row though, because I
 would like its entries to be all typeset centered (whereas
 the rest of columns has them partly left and partly right
 aligned) but apparently there is no (easy) way to override
 alignment in a single row. In particular,
 
 \setuplinetable[r][1][align=middle]
 
 doesn't work, even though all other specifications (color,
 background, style) work as expected.
 
 I think that if a row alignment is required, it should be
 applied and take precedente over column alignment. Any
 suggestions?

i recently made some extensions, remind me when i'm back from tug 2007

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


[NTG-context] Linetables ROW alignment

2007-07-14 Thread Giuseppe Bilotta
Hello all again,

I'm using linetables, because despite their lack of
documentation they've been rather easy to set up to achieve
the effects I needed (colors, alignment, etc).

I have a small problem with the title row though, because I
would like its entries to be all typeset centered (whereas
the rest of columns has them partly left and partly right
aligned) but apparently there is no (easy) way to override
alignment in a single row. In particular,

\setuplinetable[r][1][align=middle]

doesn't work, even though all other specifications (color,
background, style) work as expected.

I think that if a row alignment is required, it should be
applied and take precedente over column alignment. Any
suggestions?

-- 
Giuseppe Oblomov Bilotta

P.S. Looking at core-ltb.tex I've found that \BH and \EH are
mapped to \linetableBR and \linetableER. Is this
intentional, or a cut-n-paste error? The way it is now,
\linetableBH and \linetableEH are never triggered ...

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