Re: [NTG-context] professional looking tables

2016-12-23 Thread Csikos Bela
Thank you for your help so far.
Now I am close to what I'd like to achieve.
I want to insert a foot on every pages except on the
last page (at the end of the table). Is it possible?

I have this simple code:

\starttext

\setupxtable[split=repeat,header=repeat,footer=repeat]

\startxtable[frame=off,topframe=on,bottomframe=on,toffset=2pt,boffset=4pt]
\startxtablehead
\startxrow[bottomframe=off,rulethickness=2pt]
\startxcell Head \stopxcell
\stopxrow
\stopxtablehead
\startxtablenext
\startxrow[topframe=off]
\startxcell Continued from previous page \stopxcell
\stopxrow
\startxrow
\startxcell Next \stopxcell
\stopxrow
\stopxtablenext
\startxtablefoot[bottomframe=off]
\startxrow
\startxcell Continued on next page \stopxcell
\stopxrow
\stopxtablefoot
\startxtablebody
\startxrow
\startxcell \input tufte \stopxcell
\stopxrow
\startxrow
\startxcell \input tufte \stopxcell
\stopxrow
\startxrow
\startxcell \input tufte \stopxcell
\stopxrow
\startxrow
\startxcell \input tufte \stopxcell
\stopxrow
\startxrow
\startxcell \input tufte \stopxcell
\stopxrow
\startxrow
\startxcell \input tufte \stopxcell
\stopxrow
\startxrow
\startxcell \input tufte \stopxcell
\stopxrow
\stopxtablebody
\stopxtable

\stoptext


Thank you,

bcsikos
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] professional looking tables

2016-12-22 Thread Aditya Mahajan

On Sun, 18 Dec 2016, Csikos Bela wrote:


Dear context users:

In latex I could make professional looking tables using booktabs module.
Using longtable package I could make nice looking multipage tables.

I see that context offers several table environments. Which one of them
is suitable for making  professional (publication quality) tables?

The requirements for such tables are the follows:

- Only horizontal rules are needed
- Ability to set the rule's thickness for top rule, bottom rule, middle rule
- Ability to set the distance between rules and table content
- Ability to set rule length shorter than cell or row width on both left and 
right sides
- Ability to set rules for spanning only some of the columns


Natural tables can give the same visual output as booktabs but the only 
way to shorten rules is to either use a "fake" column as spacer or use 
metapost to draw borders. For simple tables, you could get around this by 
being a little creative.


For example, here is the example from the booktabs package with very 
little manual tweaking.


\startsetups booktabs
  \setupTABLE[frame=off, rulethickness=0.5bp, loffset=1em]
  \setupTABLE[column][first][loffset=0em]
  \setupTABLE[row][first][topframe=on, rulethickness=1.5bp]
  \setupTABLE[row][last] [bottomframe=on, rulethickness=1bp]
\stopsetups

\starttext
\bTABLE[setups=booktabs]
  \setupTABLE[column][3][align=flushright]
  \bTR[topframe=on]
\bTD[nc=2, align=middle] Item \eTD
\bTD \eTD
  \eTR
  \bTR[bottomframe=on]
\bTD[topframe=on] Animal \eTD
\bTD[topframe=on] Description \eTD
\bTD Price (\$) \eTD
  \eTR
  \bTR
\bTD Gnat \eTD
\bTD per gram \eTD
\bTD 13.65\eTD
  \eTR
  \bTR
\bTD \eTD
\bTD each \eTD
\bTD 0.01 \eTD
  \eTR
  \bTR
\bTD Gnu \eTD
\bTD stuffed \eTD
\bTD 92.50   \eTD
  \eTR
  \bTR
\bTD Emu \eTD
\bTD stuffed \eTD
\bTD 33.33 \eTD
  \eTR
  \bTR
\bTD Armadillo \eTD
\bTD frozen\eTD
\bTD 8.99  \eTD
  \eTR
\eTABLE
\stoptext

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] professional looking tables

2016-12-22 Thread Csikos Bela
Hans Hagen írta:
>On 12/22/2016 4:02 PM, Csikos Bela wrote:
>> Pablo Rodriguez írta:
>>> On 12/18/2016 07:19 PM, Csikos Bela wrote:
 Dear context users:
 [...]
 I see that context offers several table environments. Which one of them
 is suitable for making  professional (publication quality) tables?
 [...]
 Is this feasible in current context?
>>>
>>> Dear Csikos,
>>>
>>> http://www.pragma-ade.com/general/manuals/xtables-mkiv.pdf is your
>>> friend here.
>>
>> Thank you. I started to learn xtables but I have problems. When I use
>> toffset and boffset the table is not rendered correctly. The width of the
>> columns are not correct, the defined widths are not applied to the columns.
>> See my example code below and the corresponding pdf result, xtables example 
>> 1.
>> I use context beta standalone: ConTeXt  ver: 2016.10.12 17:26 MKIV beta  
>> fmt: 2016.10.13  int: english/english.
>>
>> Code:
>>
>> \starttext
>>
>> xtables example 1
>>
>> \startxtable[frame=off,topframe=on,bottomframe=on,toffset=0.4cm,boffset=0.6cm]
>> \startxrow
>> \startxcell[width=4cm] First Column \stopxcell
>> \startxcell[width=5cm] Second Column \stopxcell
>> \startxcell[width=2cm] Third Column \stopxcell
>> \stopxrow
>> \startxrow
>> \startxcell Lorem ipsum dolor sit amet, consectetur adipiscing elit. 
>> Curabitur massa turpis, semper quis fringilla ut, viverra nec risus. 
>> \stopxcell
>> \startxcell Lorem ipsum dolor sit amet, consectetur adipiscing elit. 
>> \stopxcell
>> \startxcell Lorem ipsum \stopxcell
>> \stopxrow
>> \startxrow
>> \startxcell Pellentesque habitant morbi tristique senectus et netus 
>> \stopxcell
>> \startxcell Pellentesque habitant morbi tristique senectus et netus 
>> \stopxcell
>> \startxcell Pellentesque \stopxcell
>> \stopxrow
>> \startxrow
>> \startxcell Donec nunc lorem, sollicitudin vel sodales eget 
>> \stopxcell
>> \startxcell Donec nunc lorem, sollicitudin vel sodales eget Donec 
>> nunc lorem, sollicitudin vel sodales eget \stopxcell
>> \startxcell Donec \stopxcell
>> \stopxrow
>> \stopxtable
>>
>> \stoptext
>>
>> How can I fix this?
>
>\setupxtable[one]  [width=4cm]
>\setupxtable[two]  [width=5cm]
>\setupxtable[three][width=2cm]
>
>\startxtable[frame=off,topframe=on,bottomframe=on,toffset=0.4cm,boffset=0.6cm]
> \startxrow
> \startxcell[one]   First Column \stopxcell
> \startxcell[two]   Second Column \stopxcell
> \startxcell[three] Third Column \stopxcell
> \stopxrow
> \startxrow
> \startxcell[one]   Lorem ipsum dolor sit amet, consectetur 
>adipiscing elit. Curabitur massa turpis, semper quis fringilla ut, 
>viverra nec risus. \stopxcell
> \startxcell[two]   Lorem ipsum dolor sit amet, consectetur 
>adipiscing elit. \stopxcell
> \startxcell[three] Lorem ipsum \stopxcell
> \stopxrow
> \startxrow
> \startxcell[one]   Pellentesque habitant morbi tristique 
>senectus et netus \stopxcell
> \startxcell[two]   Pellentesque habitant morbi tristique 
>senectus et netus \stopxcell
> \startxcell[three] Pellentesque \stopxcell
> \stopxrow
> \startxrow
> \startxcell[one]   Donec nunc lorem, sollicitudin vel sodales 
>eget \stopxcell
> \startxcell[two]   Donec nunc lorem, sollicitudin vel sodales 
>eget Donec nunc lorem, sollicitudin vel sodales eget \stopxcell
> \startxcell[three] Donec \stopxcell
> \stopxrow
>\stopxtable
>

OK, this works.
Thank you for the very fast answer!

bcsikos
_
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] professional looking tables

2016-12-22 Thread Hans Hagen

On 12/22/2016 4:02 PM, Csikos Bela wrote:

Pablo Rodriguez írta:

On 12/18/2016 07:19 PM, Csikos Bela wrote:

Dear context users:
[...]
I see that context offers several table environments. Which one of them
is suitable for making  professional (publication quality) tables?
[...]
Is this feasible in current context?


Dear Csikos,

http://www.pragma-ade.com/general/manuals/xtables-mkiv.pdf is your
friend here.


Thank you. I started to learn xtables but I have problems. When I use
toffset and boffset the table is not rendered correctly. The width of the
columns are not correct, the defined widths are not applied to the columns.
See my example code below and the corresponding pdf result, xtables example 1.
I use context beta standalone: ConTeXt  ver: 2016.10.12 17:26 MKIV beta  fmt: 
2016.10.13  int: english/english.

Code:

\starttext

xtables example 1

\startxtable[frame=off,topframe=on,bottomframe=on,toffset=0.4cm,boffset=0.6cm]
\startxrow
\startxcell[width=4cm] First Column \stopxcell
\startxcell[width=5cm] Second Column \stopxcell
\startxcell[width=2cm] Third Column \stopxcell
\stopxrow
\startxrow
\startxcell Lorem ipsum dolor sit amet, consectetur adipiscing elit. 
Curabitur massa turpis, semper quis fringilla ut, viverra nec risus. \stopxcell
\startxcell Lorem ipsum dolor sit amet, consectetur adipiscing elit. 
\stopxcell
\startxcell Lorem ipsum \stopxcell
\stopxrow
\startxrow
\startxcell Pellentesque habitant morbi tristique senectus et netus 
\stopxcell
\startxcell Pellentesque habitant morbi tristique senectus et netus 
\stopxcell
\startxcell Pellentesque \stopxcell
\stopxrow
\startxrow
\startxcell Donec nunc lorem, sollicitudin vel sodales eget \stopxcell
\startxcell Donec nunc lorem, sollicitudin vel sodales eget Donec nunc 
lorem, sollicitudin vel sodales eget \stopxcell
\startxcell Donec \stopxcell
\stopxrow
\stopxtable

\stoptext

How can I fix this?


\setupxtable[one]  [width=4cm]
\setupxtable[two]  [width=5cm]
\setupxtable[three][width=2cm]

\startxtable[frame=off,topframe=on,bottomframe=on,toffset=0.4cm,boffset=0.6cm]
\startxrow
\startxcell[one]   First Column \stopxcell
\startxcell[two]   Second Column \stopxcell
\startxcell[three] Third Column \stopxcell
\stopxrow
\startxrow
\startxcell[one]   Lorem ipsum dolor sit amet, consectetur 
adipiscing elit. Curabitur massa turpis, semper quis fringilla ut, 
viverra nec risus. \stopxcell
\startxcell[two]   Lorem ipsum dolor sit amet, consectetur 
adipiscing elit. \stopxcell

\startxcell[three] Lorem ipsum \stopxcell
\stopxrow
\startxrow
\startxcell[one]   Pellentesque habitant morbi tristique 
senectus et netus \stopxcell
\startxcell[two]   Pellentesque habitant morbi tristique 
senectus et netus \stopxcell

\startxcell[three] Pellentesque \stopxcell
\stopxrow
\startxrow
\startxcell[one]   Donec nunc lorem, sollicitudin vel sodales 
eget \stopxcell
\startxcell[two]   Donec nunc lorem, sollicitudin vel sodales 
eget Donec nunc lorem, sollicitudin vel sodales eget \stopxcell

\startxcell[three] Donec \stopxcell
\stopxrow
\stopxtable


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] professional looking tables

2016-12-22 Thread Csikos Bela
Pablo Rodriguez írta:
>On 12/18/2016 07:19 PM, Csikos Bela wrote:
>> Dear context users:
>> [...]
>> I see that context offers several table environments. Which one of them
>> is suitable for making  professional (publication quality) tables?
>> [...]
>> Is this feasible in current context?
>
>Dear Csikos,
>
>http://www.pragma-ade.com/general/manuals/xtables-mkiv.pdf is your
>friend here.

Thank you. I started to learn xtables but I have problems. When I use
toffset and boffset the table is not rendered correctly. The width of the
columns are not correct, the defined widths are not applied to the columns.
See my example code below and the corresponding pdf result, xtables example 1.
I use context beta standalone: ConTeXt  ver: 2016.10.12 17:26 MKIV beta  fmt: 
2016.10.13  int: english/english.

Code:

\starttext

xtables example 1

\startxtable[frame=off,topframe=on,bottomframe=on,toffset=0.4cm,boffset=0.6cm]
\startxrow
\startxcell[width=4cm] First Column \stopxcell
\startxcell[width=5cm] Second Column \stopxcell
\startxcell[width=2cm] Third Column \stopxcell
\stopxrow
\startxrow
\startxcell Lorem ipsum dolor sit amet, consectetur adipiscing elit. 
Curabitur massa turpis, semper quis fringilla ut, viverra nec risus. \stopxcell
\startxcell Lorem ipsum dolor sit amet, consectetur adipiscing elit. 
\stopxcell
\startxcell Lorem ipsum \stopxcell
\stopxrow
\startxrow
\startxcell Pellentesque habitant morbi tristique senectus et netus 
\stopxcell
\startxcell Pellentesque habitant morbi tristique senectus et netus 
\stopxcell
\startxcell Pellentesque \stopxcell
\stopxrow
\startxrow
\startxcell Donec nunc lorem, sollicitudin vel sodales eget \stopxcell
\startxcell Donec nunc lorem, sollicitudin vel sodales eget Donec nunc 
lorem, sollicitudin vel sodales eget \stopxcell
\startxcell Donec \stopxcell
\stopxrow
\stopxtable

\stoptext

How can I fix this?

Thank you in advance,

bcsikos

xtables-example-01.pdf
Description: Adobe PDF 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] professional looking tables

2016-12-18 Thread Pablo Rodriguez
On 12/18/2016 07:19 PM, Csikos Bela wrote:
> Dear context users:
> [...]
> I see that context offers several table environments. Which one of them
> is suitable for making  professional (publication quality) tables?
> [...]
> Is this feasible in current context?

Dear Csikos,

http://www.pragma-ade.com/general/manuals/xtables-mkiv.pdf is your
friend here.

No sample, no code as reply ;-).


Pablo
-- 
http://www.ousia.tk
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___