ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* xtables setup
@ 2018-07-29  9:28 Henning Hraban Ramm
  2018-07-29 11:19 ` Hans Hagen
  2018-07-29 15:30 ` Pablo Rodriguez
  0 siblings, 2 replies; 6+ messages in thread
From: Henning Hraban Ramm @ 2018-07-29  9:28 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hello again,
I’m trying xtables for the first time.

Is it possible to setup defined rows/columns like with natural tables, e.g. for a header, like in my example?
The commented lines below are wrong. Is there another way?


\definextable[headtable] % table with repeated head

\setupxtable[headtable][
  option={stretch,width},
  frame=off,
  split=repeat,
  header=repeat,
]

% like in natural tables - doesn’t work...
%\setupxtable[headtable][r][first][topframe=on,before={\blank[small]}]
%\setupxtable[headtable][r][1][topframe=on,bottomframe=on,style={\ss\bf}]
%\setupxtable[headtable][r][last][bottomframe=on]

\starttext

\startxtable[headtable]
\startxtablehead
\startxrow
\startxcell Level \stopxcell\startxcell numbered \stopxcell\startxcell unnumbered \stopxcell
\stopxrow
\stopxtablehead
\startxtablebody
\startxrow\startxcell 0\stopxcell\startxcell part\stopxcell\startxcell —\stopxcell\stopxrow
\startxrow\startxcell 1\stopxcell\startxcell chapter\stopxcell\startxcell title\stopxcell\stopxrow
\startxrow\startxcell 2\stopxcell\startxcell section\stopxcell\startxcell subject\stopxcell\stopxrow
\startxrow\startxcell 3\stopxcell\startxcell subsection\stopxcell\startxcell subsubject\stopxcell\stopxrow
\startxrow\startxcell 4\stopxcell\startxcell subsubsection\stopxcell\startxcell subsubsubject\stopxcell\stopxrow
\stopxtablebody
\stopxtable

\stoptext



Greetlings, Hraban
---
https://www.fiee.net
http://wiki.contextgarden.net
https://www.dreiviertelhaus.de
GPG Key ID 1C9B22FD

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

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

* Re: xtables setup
  2018-07-29  9:28 xtables setup Henning Hraban Ramm
@ 2018-07-29 11:19 ` Hans Hagen
  2018-07-29 11:32   ` Henning Hraban Ramm
  2018-07-29 15:46   ` Pablo Rodriguez
  2018-07-29 15:30 ` Pablo Rodriguez
  1 sibling, 2 replies; 6+ messages in thread
From: Hans Hagen @ 2018-07-29 11:19 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Henning Hraban Ramm

On 7/29/2018 11:28 AM, Henning Hraban Ramm wrote:
> Hello again,
> I’m trying xtables for the first time.
> 
> Is it possible to setup defined rows/columns like with natural tables, e.g. for a header, like in my example?
> The commented lines below are wrong. Is there another way?
Did you read the manual?

Hans


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

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

* Re: xtables setup
  2018-07-29 11:19 ` Hans Hagen
@ 2018-07-29 11:32   ` Henning Hraban Ramm
  2018-07-29 15:46   ` Pablo Rodriguez
  1 sibling, 0 replies; 6+ messages in thread
From: Henning Hraban Ramm @ 2018-07-29 11:32 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Am 2018-07-29 um 13:19 schrieb Hans Hagen <j.hagen@xs4all.nl>:

> On 7/29/2018 11:28 AM, Henning Hraban Ramm wrote:
>> Hello again,
>> I’m trying xtables for the first time.
>> Is it possible to setup defined rows/columns like with natural tables, e.g. for a header, like in my example?
>> The commented lines below are wrong. Is there another way?
> Did you read the manual?

Yes, but I found only how to format each item (cell, row, column, group) within the table, not in advance, except as styles.
But I don’t want to format e.g. each header cell of each table with a style if all tables should look the same.

Looks like I’ll better stick to natural tables.

Greetlings, Hraban
---
https://www.fiee.net
http://wiki.contextgarden.net
https://www.dreiviertelhaus.de
GPG Key ID 1C9B22FD

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

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

* Re: xtables setup
  2018-07-29  9:28 xtables setup Henning Hraban Ramm
  2018-07-29 11:19 ` Hans Hagen
@ 2018-07-29 15:30 ` Pablo Rodriguez
  2018-07-29 15:49   ` Henning Hraban Ramm
  1 sibling, 1 reply; 6+ messages in thread
From: Pablo Rodriguez @ 2018-07-29 15:30 UTC (permalink / raw)
  To: ntg-context

On 07/29/2018 11:28 AM, Henning Hraban Ramm wrote:
> Hello again,
> I’m trying xtables for the first time.
> 
> Is it possible to setup defined rows/columns like with natural tables, e.g. for a header, like in my example?
> The commented lines below are wrong. Is there another way?

Hi Hraban,

I never used natural tables.

The right approach would be:

    \setupxtable[headtable]
        [bottomframe={\ifnum\currentxtablerow = 6 on\fi},
         topframe={\ifcase\currentxtablerow\or on\or on\else off\fi}]

I hope it helps,

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
___________________________________________________________________________________

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

* Re: xtables setup
  2018-07-29 11:19 ` Hans Hagen
  2018-07-29 11:32   ` Henning Hraban Ramm
@ 2018-07-29 15:46   ` Pablo Rodriguez
  1 sibling, 0 replies; 6+ messages in thread
From: Pablo Rodriguez @ 2018-07-29 15:46 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 07/29/2018 01:19 PM, Hans Hagen wrote:
> On 7/29/2018 11:28 AM, Henning Hraban Ramm wrote:
>> Hello again,
>> I’m trying xtables for the first time.
>>
>> Is it possible to setup defined rows/columns like with natural tables, e.g. for a header, like in my example?
>> The commented lines below are wrong. Is there another way?
> 
> Did you read the manual?

Hans,

would it be possible that we have \totalxtablerows and
\totalxtablecolumns that outputs the total number of rows and columns?

This would be helpful when formatting xtables. Of course, final names
may (and probably should) differ.

Many thanks for your help,

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
___________________________________________________________________________________

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

* Re: xtables setup
  2018-07-29 15:30 ` Pablo Rodriguez
@ 2018-07-29 15:49   ` Henning Hraban Ramm
  0 siblings, 0 replies; 6+ messages in thread
From: Henning Hraban Ramm @ 2018-07-29 15:49 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Am 2018-07-29 um 17:30 schrieb Pablo Rodriguez <oinos@gmx.es>:

> On 07/29/2018 11:28 AM, Henning Hraban Ramm wrote:
>> Hello again,
>> I’m trying xtables for the first time.
>> 
>> Is it possible to setup defined rows/columns like with natural tables, e.g. for a header, like in my example?
>> The commented lines below are wrong. Is there another way?
> 
> Hi Hraban,
> 
> I never used natural tables.
> 
> The right approach would be:
> 
>    \setupxtable[headtable]
>        [bottomframe={\ifnum\currentxtablerow = 6 on\fi},
>         topframe={\ifcase\currentxtablerow\or on\or on\else off\fi}]
> 
> I hope it helps,

Thank you, this is interesting.


Greetlings, Hraban
---
https://www.fiee.net
http://wiki.contextgarden.net
https://www.dreiviertelhaus.de
GPG Key ID 1C9B22FD

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

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

end of thread, other threads:[~2018-07-29 15:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-29  9:28 xtables setup Henning Hraban Ramm
2018-07-29 11:19 ` Hans Hagen
2018-07-29 11:32   ` Henning Hraban Ramm
2018-07-29 15:46   ` Pablo Rodriguez
2018-07-29 15:30 ` Pablo Rodriguez
2018-07-29 15:49   ` Henning Hraban Ramm

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