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] \writetolist not writing the number to the TOC

2023-03-27 Thread Willi Egger via ntg-context
Thank you Hans,

that is, what I need. It was even easy to implement in the layout-file only :-) 
because these sections where already under a “mysection” head.

Kind regards

Willi

> On 27 Mar 2023, at 15:52, Hans Hagen via ntg-context  
> wrote:
> 
> On 3/26/2023 3:10 PM, Willi Egger via ntg-context wrote:
>> Hello Hraban,
>> thank you. I missed this point. However, adding a dot behind the number does 
>> not appear to solve the problem. The title’s text still starts at the left 
>> margin which looks very odd.
>> Kind regards
>> Willi
>>> On 26 Mar 2023, at 12:51, Henning Hraban Ramm via ntg-context 
>>>  wrote:
>>> 
>>> Am 25.03.23 um 23:05 schrieb Willi Egger via ntg-context:
 Good evening!
 I have a setup in which I need to send info to the TOC:
 Consider the following example:
 \starttext
 \starttitle[title=Contents]
   \placelist[chapter][criterium=all]
 \stoptitle
 \startchapter[title=Mychapter]
   \input knuth
   \startsubject[title=Subject will be in TOC]
 \writetolist[chapter]{1}{I am in TOC!}
 \input ward
   \stopsubject
 \stopchapter
 \stoptext
 According to the Wiki I should get te number (1) in the TOC. Instead the 
 text starts at the height of the chapter-numbering and is not carrying the 
 given number.
 Am I doing something wrong?
>>> 
>>> The wiki says:
>>> 
>>> “The default table of contents is combined list. To write to it one has to 
>>> choose the level to which it should be inserted: 
>>> \writetolist[chapter]{1.}{Chapter list entry A},
>>> \writetolist[section]{1.1}{Section list entry A}, etc.”
>>> 
>>> https://wiki.contextgarden.net/Command/writetolist
>>> 
>>> So maybe you need a dot?
>>> 
>>> Otherwise I don’t know.
> \definehead[xsubject][section][number=no]
> 
> \setuplist[xsubject][margin=2em]
> 
> \starttext
>\starttitle[title=Contents]
>  \placelist[chapter,xsubject][criterium=all]
>\stoptitle
>\startchapter[title=Mychapter]
>  \input knuth
>  \startxsubject[title=Subject will be in TOC1] \input ward \stopxsubject
>  \startxsubject[title=Subject will be in TOC2] \input ward \stopxsubject
>\stopchapter
> \stoptext
> 
> 
> 
> -
>  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 / 
> 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
> ___

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


Re: [NTG-context] \writetolist not writing the number to the TOC

2023-03-27 Thread Hans Hagen via ntg-context

On 3/26/2023 3:10 PM, Willi Egger via ntg-context wrote:

Hello Hraban,

thank you. I missed this point. However, adding a dot behind the number does 
not appear to solve the problem. The title’s text still starts at the left 
margin which looks very odd.

Kind regards
Willi


On 26 Mar 2023, at 12:51, Henning Hraban Ramm via ntg-context 
 wrote:

Am 25.03.23 um 23:05 schrieb Willi Egger via ntg-context:

Good evening!
I have a setup in which I need to send info to the TOC:
Consider the following example:
\starttext
\starttitle[title=Contents]
   \placelist[chapter][criterium=all]
\stoptitle
\startchapter[title=Mychapter]
   \input knuth
   \startsubject[title=Subject will be in TOC]
 \writetolist[chapter]{1}{I am in TOC!}
 \input ward
   \stopsubject
\stopchapter
\stoptext
According to the Wiki I should get te number (1) in the TOC. Instead the text 
starts at the height of the chapter-numbering and is not carrying the given 
number.
Am I doing something wrong?


The wiki says:

“The default table of contents is combined list. To write to it one has to 
choose the level to which it should be inserted: 
\writetolist[chapter]{1.}{Chapter list entry A},
\writetolist[section]{1.1}{Section list entry A}, etc.”

https://wiki.contextgarden.net/Command/writetolist

So maybe you need a dot?

Otherwise I don’t know.

\definehead[xsubject][section][number=no]

\setuplist[xsubject][margin=2em]

\starttext
\starttitle[title=Contents]
  \placelist[chapter,xsubject][criterium=all]
\stoptitle
\startchapter[title=Mychapter]
  \input knuth
  \startxsubject[title=Subject will be in TOC1] \input ward 
\stopxsubject
  \startxsubject[title=Subject will be in TOC2] \input ward 
\stopxsubject

\stopchapter
\stoptext



-
  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 / 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] registered function call [1160]:...live/2023/texmf-dist/tex/context/base/mkiv/l-sandbox.lua:87: cannot open /.: Permission denied - Alpine Linux

2023-03-27 Thread Hans Hagen via ntg-context

On 3/27/2023 3:31 PM, Carlos via ntg-context wrote:


mkiv lua stats  > loaded fonts: 4 files: latinmodern-math.otf, 
lmroman10-regular.otf, lucidabrightregular.ttf, lucidasansregular.ttf


i admit never having seen lucida ttf files (but when opentype ttf files 
are used with an afm file present then no map files are needed at all 
because we're in wide font mode and encidings are ignored)



mkiv lua stats  > font engine: otf 3.133, afm 1.513, tfm 1.000, 12 instances, 5 
shared in backend, 3 common vectors, 2 common hashes, load time 16.898 seconds
mkiv lua stats  > math tweaking time: 0.102 seconds, 12 math goodie tables
mkiv lua stats  > font embedding time: 0.004 seconds, 2 fonts


i assume that you don't get this 16 seconds load time each run

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 / 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] registered function call [1160]:...live/2023/texmf-dist/tex/context/base/mkiv/l-sandbox.lua:87: cannot open /.: Permission denied - Alpine Linux

2023-03-27 Thread Carlos via ntg-context
On Sat, Mar 25, 2023 at 09:26:36PM +0100, Hans Hagen via ntg-context wrote:
> On 3/25/2023 8:55 PM, Carlos via ntg-context wrote:
> > Hello list:
> > 
> > This is under a fresh TeXLive installation. Sort as to put aside any 
> > texlive prepackaged issues.
> > 
> > And the followign lines is the output of the error I've been having with 
> > the call of context on a recent texlive installation by both mtxrun 
> > --generate and luatools --generate right after.
> 
> there i no need to use luatools (it's something old from the early days)
> 
> what does
> 
>   mtxrun --generate --verbose
> 
> report (whre does it fail)
> 
> > 57 \starttext
> > 58
> > 59 \usetypescriptfile[type-lucida]
> > 60 \usetypescript[Lucida][texnansi]
> > 61 >>  \setupbodyfont[MyLucida, 10pt]
> > 62
> > 63 \input zapf
> > 64
> > 65 \input tufte
> 
> fwiw, lucida type one makes no sense any more because the opentype version
> is way better (and in the updated math setup in lmtx we didn't even look at
> it)
> 
> > Is LuaLaTeX behaving the same way?
> > 
> > Answer: no.
> 
> no surprise because it doesn't use the same setup
> 
> what cache path does
> 
>   mtxrun --variables
> 
> report
> 
> Hans
> 
> 
Thanks a lot Hans! Of course your sugggestion by using otf rather than going 
through the ttf as it may be deprecated works. No doubt. 

But look at the output of only a few lines.. This is exactly what I wanted to 
see!: 

system  >6: filename=texnansi-bandh-lucida.map filetype=map 
format=map 
foundname=/usr/local/texlive/2023/texmf-local/fonts/map/pdftex/context/texnansi-bandh-lucida.map
 
fullname=/usr/local/texlive/2023/texmf-local/fonts/map/pdftex/context/texnansi-bandh-lucida.map
 usedmethod=database

system  >   13: 
filename=/usr/local/texlive/2023/texmf-local/fonts/afm/bandh/lucida/LucidaBrightDemiBold.afm
 
foundname=/usr/local/texlive/2023/texmf-local/fonts/afm/bandh/lucida/LucidaBrightDemiBold.afm
 
fullname=/usr/local/texlive/2023/texmf-local/fonts/afm/bandh/lucida/LucidaBrightDemiBold.afm
 usedmethod=direct

system  >   14: 
filename=/usr/local/texlive/2023/texmf-local/fonts/afm/bandh/lucida/LucidaBrightDemiItalic.afm
 
foundname=/usr/local/texlive/2023/texmf-local/fonts/afm/bandh/lucida/LucidaBrightDemiItalic.afm
 
fullname=/usr/local/texlive/2023/texmf-local/fonts/afm/bandh/lucida/LucidaBrightDemiItalic.afm
 usedmethod=direct

system  >   15: 
filename=/usr/local/texlive/2023/texmf-local/fonts/afm/bandh/lucida/LucidaBrightItalic.afm
 
foundname=/usr/local/texlive/2023/texmf-local/fonts/afm/bandh/lucida/LucidaBrightItalic.afm
 
fullname=/usr/local/texlive/2023/texmf-local/fonts/afm/bandh/lucida/LucidaBrightItalic.afm
 usedmethod=direct


system  >   16: 
filename=/usr/local/texlive/2023/texmf-local/fonts/afm/bandh/lucida/LucidaBrightRegular.afm
 
foundname=/usr/local/texlive/2023/texmf-local/fonts/afm/bandh/lucida/LucidaBrightRegular.afm
 
fullname=/usr/local/texlive/2023/texmf-local/fonts/afm/bandh/lucida/LucidaBrightRegular.afm
 usedmethod=direct

system  >   17: 
filename=/usr/local/texlive/2023/texmf-local/fonts/afm/bandh/lucida/LucidaSansDemiBold.afm
 
foundname=/usr/local/texlive/2023/texmf-local/fonts/afm/bandh/lucida/LucidaSansDemiBold.afm
 
fullname=/usr/local/texlive/2023/texmf-local/fonts/afm/bandh/lucida/LucidaSansDemiBold.afm
 usedmethod=direct

system  >   18: 
filename=/usr/local/texlive/2023/texmf-local/fonts/afm/bandh/lucida/LucidaSansDemiOblique.afm
 
foundname=/usr/local/texlive/2023/texmf-local/fonts/afm/bandh/lucida/LucidaSansDemiOblique.afm
 
fullname=/usr/local/texlive/2023/texmf-local/fonts/afm/bandh/lucida/LucidaSansDemiOblique.afm
 usedmethod=direct
system  >   19: 
filename=/usr/local/texlive/2023/texmf-local/fonts/afm/bandh/lucida/LucidaSansOblique.afm
 
foundname=/usr/local/texlive/2023/texmf-local/fonts/afm/bandh/lucida/LucidaSansOblique.afm
 
fullname=/usr/local/texlive/2023/texmf-local/fonts/afm/bandh/lucida/LucidaSansOblique.afm
 usedmethod=direct

system  >   20: 
filename=/usr/local/texlive/2023/texmf-local/fonts/afm/bandh/lucida/LucidaSansRegular.afm
 
foundname=/usr/local/texlive/2023/texmf-local/fonts/afm/bandh/lucida/LucidaSansRegular.afm
 
fullname=/usr/local/texlive/2023/texmf-local/fonts/afm/bandh/lucida/LucidaSansRegular.afm
 usedmethod=direct

system  >   21: 
filename=/usr/local/texlive/2023/texmf-local/fonts/afm/bandh/lucida/LucidaTypewriterBold.afm
 
foundname=/usr/local/texlive/2023/texmf-local/fonts/afm/bandh/lucida/LucidaTypewriterBold.afm
 
fullname=/usr/local/texlive/2023/texmf-local/fonts/afm/bandh/lucida/LucidaTypewriterBold.afm
 usedmethod=direct

system  >   22: 
filename=/usr/local/texlive/2023/texmf-local/fonts/afm/bandh/lucida/LucidaTypewriterBoldOblique.afm
 
foundname=/usr/local/texlive/2023/texmf-local/fonts/afm/bandh/lucida/LucidaTypewriterBoldOblique.afm