[NTG-context] natural table oddities

2023-04-01 Thread Henning Hraban Ramm via ntg-context
[This mail sat in my drafts folder for days; wanted to research more 
first, well…]


Am 28.03.23 um 02:19 schrieb Bruce Horrocks:

If you're asking for comments with a view to making changes then...


I can’t make the changes myself, only suggest them to Hans.


On 27 Mar 2023, at 15:03, Henning Hraban Ramm via ntg-context 
 wrote:



* If I format a column, e.g. \setupTABLE[c][-1][color=red], body and foot are 
formatted, but not the same column in header. I couldn’t find how to format 
columns in header.


If you disregard the Wiki page instructions to use \bTH...\eTH then you can 
format the header using:

\bTD ... \eTD


but I'm not sure what the consequences might be, if any. You lose the default 
bold heading so maybe that's all /bTH.../eTH is adding?


Yes, I also found that out – either I sent an incomplete email, or I 
forgot to add my later “research”. 樂


TH (table header, not Taco or Tomáš ) adds a separation between header 
and body cells, but setting up "header" affects both TD and TH within 
TABLEhead.



It would be nice to have a way of specifying the header explicitly. My 
suggestion would be to have:
- \setupTABLE[r][head][...] affect just the header
- \setupTABLE[r][next][...] affect the new page header
- \setupTABLE[r][first|last|body][...] affect the first, or last, or only the 
body rows (i.e. not the header or footer)
- \setupTABLE[r][foot][...] affect just the footer

[r][last] (and [r][-1]) would represent the last body row (but not the footer 
row if one has been requested).


I agree.


## Formatting
* maxwidth doesn’t seem to have an effect, neither on the whole table nor on a 
column.
* textwidth works only for the whole table.
* width gets stretched if option=stretch; i.e. I can’t fix the width of single 
cells or columns.


For me, \setupTABLE [c] [1] [width=3cm] fixes the width of column 1 and forces 
long text to wrap.


But the width of a column is not fixed if you set option=stretch, then 
*all* columns are stretched, not only the undefined.


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

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] natural table oddities

2023-03-27 Thread Bruce Horrocks via ntg-context
If you're asking for comments with a view to making changes then...

> On 27 Mar 2023, at 15:03, Henning Hraban Ramm via ntg-context 
>  wrote:
> 
> I would be happy about some answers/comments.
> Hraban
> 
> Am 13.03.23 um 23:26 schrieb Henning Hraban Ramm:
>> Working on the documentation for “natural tables” in my book I stumbled upon 
>> a few oddities/problems:
>> ## Addressing cells:
>> * There’s \setupTABLE[header], but not "footer" (or "section"); since we 
>> have TABLEhead and TABLEfoot, IMO "head" and "foot" would make sense.

I'd be happy with that, especially as there is already headstyle and headcolor.

>> * Row 1 is the first row of TABLEbody. I couldn’t find how to address the 
>> first line of TABLEbody.
>> * If I format a column, e.g. \setupTABLE[c][-1][color=red], body and foot 
>> are formatted, but not the same column in header. I couldn’t find how to 
>> format columns in header.

If you disregard the Wiki page instructions to use \bTH...\eTH then you can 
format the header using:

  \bTABLEhead
\bTR \bTH Column 1 \eTH \bTD[color=blue] Column 2 \eTD \eTR
  \eTABLEhead

but I'm not sure what the consequences might be, if any. You lose the default 
bold heading so maybe that's all /bTH.../eTH is adding?

It would be nice to have a way of specifying the header explicitly. My 
suggestion would be to have:
- \setupTABLE[r][head][...] affect just the header
- \setupTABLE[r][next][...] affect the new page header
- \setupTABLE[r][first|last|body][...] affect the first, or last, or only the 
body rows (i.e. not the header or footer)
- \setupTABLE[r][foot][...] affect just the footer 

[r][last] (and [r][-1]) would represent the last body row (but not the footer 
row if one has been requested).

Extending to the formatting of header/footer/next etc columns is not quite so 
neat as an extra parameter is required, e.g. [c][][head][...] to reference 
column n in the header. For consistency the syntax [c][][body][...] could be 
an option.


>> * I don’t understand the addressing options "start" and "one".

Me neither. :)

>> ## Formatting
>> * maxwidth doesn’t seem to have an effect, neither on the whole table nor on 
>> a column.
>> * textwidth works only for the whole table.
>> * width gets stretched if option=stretch; i.e. I can’t fix the width of 
>> single cells or columns.

For me, \setupTABLE [c] [1] [width=3cm] fixes the width of column 1 and forces 
long text to wrap.

I'm not sure what your \textwidth comment relates to because \setupTABLE [c] 
[1] [width=.2\textwidth] works as expected for me.


>> ## Page breaking
>> * What’s the difference between split=repeat and header=repeat ?

\setupTABLE [split=repeat] % works as expected for me
\setupTABLE [header=repeat] % doesn't work for me


>> I’d like to know if there are misunderstandings / if the behavior is 
>> intentional.

—
Bruce Horrocks
Hampshire, UK

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

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] natural table oddities

2023-03-27 Thread Henning Hraban Ramm via ntg-context

I would be happy about some answers/comments.
Hraban

Am 13.03.23 um 23:26 schrieb Henning Hraban Ramm:
Working on the documentation for “natural tables” in my book I stumbled 
upon a few oddities/problems:


## Addressing cells:

* There’s \setupTABLE[header], but not "footer" (or "section"); since we 
have TABLEhead and TABLEfoot, IMO "head" and "foot" would make sense.


* Row 1 is the first row of TABLEbody. I couldn’t find how to address 
the first line of TABLEbody.


* If I format a column, e.g. \setupTABLE[c][-1][color=red], body and 
foot are formatted, but not the same column in header. I couldn’t find 
how to format columns in header.


* I don’t understand the addressing options "start" and "one".


## Formatting

* maxwidth doesn’t seem to have an effect, neither on the whole table 
nor on a column.

* textwidth works only for the whole table.
* width gets stretched if option=stretch; i.e. I can’t fix the width of 
single cells or columns.



## Page breaking

* What’s the difference between split=repeat and header=repeat ?



I’d like to know if there are misunderstandings / if the behavior is 
intentional.


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

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] natural table oddities

2023-03-14 Thread Henning Hraban Ramm via ntg-context
Working on the documentation for “natural tables” I stumbled upon a few 
oddities/problems.
I’d like to know if there are misunderstandings on my part or if the 
behavior is intentional.


BTW enattab.pdf is missing in the LMTX distribution.

## Options

* before/after/inbetween values don’t appear anywhere.
* spaceinbetween should insert between rows, but nothing happens.
* splitoffset doesn’t seem to change anything.
* What’s samepage for?


## Addressing cells

* It’s not possible to address single cells with \setupTABLE, or is it?

* There’s \setupTABLE[header], but not "footer" (or "section"); since we 
have TABLEhead and TABLEfoot, IMO "head" and "foot" would make sense.


* Row 1 is the first row of TABLEbody. I couldn’t find how to address 
the first line of TABLEbody.


* Is it possible, and how, to use odd/even only for the body?

* If I format a column, e.g. \setupTABLE[c][-1][color=red], body and 
foot are formatted, but not the same column in header. (I found out, if 
I use TD instead of TH in the header, it works.)


* I don’t understand the addressing options "start" and "one".


## Formatting

* maxwidth doesn’t seem to have an effect, neither on the whole table 
nor on a column.

* textwidth works only for the whole table.
* width gets stretched if option=stretch; i.e. you can’t fix the width 
of single cells or columns.



## Page breaking

* What’s the difference between [split=repeat] and 
[split=yes,header=repeat], i.e. which sense makes the header option)?


* Is there an option to repeat the footer (as the last line of each 
page)? (I’d imagine to use it in an invoice or similar calculation for a 
subtotal – that would imply some more magic…)



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

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___