[NTG-context] \date in LMTX

2019-08-17 Thread Aditya Mahajan

Hi,

There is a bug with \date in LMTX.

\starttext
\date[d=10]
\stoptext

does not change the date. Works okay in MKIV.

Thanks,
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] \setupcolumnsetlines does not work

2019-08-17 Thread Sytse Knypstra
Wolfgang wrote:
> The settings for the second columnset work when the first columnset goes over 
> of two or more pages. 

Thank you, now I understand the mechanism: only if the first columnset extends 
to more than one page, the next \setupcolumnsetlines will work properly. Is 
this a bug or a feature? If it is a feature, what is the idea behind it?

Sytse
___
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] \setupcolumnsetlines does not work

2019-08-17 Thread Sytse Knypstra
Thank you, Denis and Wolfgang.
Wolfgang, your sentence 
> No, you set relative numbers (I checked it) but the first columnset
> environment ends on the third page because you leave just enough
> space on the second page to fit the text which produces an empty
> third page.
is not clear to me.
If \setupcolumnsetlines has to be specified before \starttext and if the second 
parameter denotes the absolute page number of the column to be limited, then 
the following example still does not work correctly for the second page (ouput 
consists of two pages).

\definecolumnset[Two][n=2]

\setupcolumnsetlines[Two][1][1][9]

\setupcolumnsetlines[Two][2][1][9]

\starttext

   \startcolumnset[Two]

\input knuth

   \stopcolumnset

   \startcolumnset[Two]

   \input knuth

   \stopcolumnset

\stoptext

Sytse

> Op 17 augustus 2019 om 15:14 schreef Denis Maier :
> 
> 
> Ok, have tried it now. No change ...
> 
> Am Sa., 17. Aug. 2019 um 13:33 Uhr schrieb Denis Maier :
> 
> > Also, what about \setupcolumnsetlines[Two][2][1][9]?
> >
> > Denis Maier  schrieb am Sa., 17. Aug. 2019, 13:32:
> >
> >> If I am remembering correctly, the documentation has \setupcolumnsetlines
> >> before \starttext.
> >>
> >> Sytse Knypstra  schrieb am Sa., 17. Aug. 2019,
> >> 12:59:
> >>
> >>> In an effort to balance columns in a columnset layout, I found that in
> >>> the following minimal example this effect is not obtained.
> >>> After commenting out the first three lines after \starttext the result
> >>> is ok.
> >>> I am wondering what I overlooked this time.
> >>>
> >>> \definecolumnset[Two][n=2]
> >>> \starttext
> >>>\startcolumnset[Two]
> >>>   \input knuth
> >>>\stopcolumnset
> >>>\page
> >>>\setupcolumnsetlines[Two][1][1][9]
> >>>\startcolumnset[Two]
> >>>   \input knuth
> >>>\stopcolumnset
> >>> \stoptext
> >>>
> >>> Thank you for your suggestions,
> >>>
> >>> Sytse Knypstra
> >>>
> >>> ___
> >>> 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
> >>>
> >>> ___
> >>>
> >>

> Op 17 augustus 2019 om 15:50 schreef Denis Maier :
> 
> 
> This here works for the first columnset, but not for the second one:
> 
> =
> \usemodule[newcolumnsets]
> 
> \definecolumnset[One][n=2]
> 
> \setupcolumnsetlines[One][1][1][9]
> \setupcolumnsetlines[One][1][2][9]
> \setupcolumnsetlines[One][2][1][9]
> \setupcolumnsetlines[One][2][2][9]
> 
> \definecolumnset[Two][n=2]
> \setupcolumnsetlines[Two][1][1][9]
> \setupcolumnsetlines[Two][1][2][9]
> \setupcolumnsetlines[Two][2][1][9]
> \setupcolumnsetlines[Two][2][2][9]
> 
> \starttext
>\startcolumnset[One]
>   \input knuth
> 
>   \input knuth
> \stopcolumnset
> 
> \startcolumnset[Two]
>   \input knuth
> 
>   \input knuth
> \stopcolumnset
> \stoptext
> ===
> 
> Am Sa., 17. Aug. 2019 um 15:14 Uhr schrieb Denis Maier :
> 
> > Ok, have tried it now. No change ...
> >
> > Am Sa., 17. Aug. 2019 um 13:33 Uhr schrieb Denis Maier  > >:
> >
> >> Also, what about \setupcolumnsetlines[Two][2][1][9]?
> >>
> >> Denis Maier  schrieb am Sa., 17. Aug. 2019, 13:32:
> >>
> >>> If I am remembering correctly, the documentation has
> >>> \setupcolumnsetlines before \starttext.
> >>>
> >>> Sytse Knypstra  schrieb am Sa., 17. Aug. 2019,
> >>> 12:59:
> >>>
>  In an effort to balance columns in a columnset layout, I found that in
>  the following minimal example this effect is not obtained.
>  After commenting out the first three lines after \starttext the result
>  is ok.
>  I am wondering what I overlooked this time.
> 
>  \definecolumnset[Two][n=2]
>  \starttext
> \startcolumnset[Two]
>    \input knuth
> \stopcolumnset
> \page
> \setupcolumnsetlines[Two][1][1][9]
> \startcolumnset[Two]
>    \input knuth
> \stopcolumnset
>  \stoptext
> 
>  Thank you for your suggestions,
> 
>  Sytse Knypstra
> 
>  ___
>  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
> 
>  

[NTG-context] lmtx setuparranging

2019-08-17 Thread jk...@inradius.net
Booklet layout 2UP is not working with lmtx for me.

MWE: under mkiv I get all 4 booklet pages laid out for two-sided print and fold.

\setuppapersize[A5][A4,landscape]
\setuparranging[2UP,doublesided]
\starttext
\dorecurse{4}{\input tufte \blank}
\dorecurse{3}{\input bryson \blank}
\dorecurse{3}{\input ward \blank}
\stoptext

context —version:
mtx-context | main context file: 
/users/kitz/ctxmkiv/tex/texmf-context/tex/context/base/mkiv/context.mkiv
mtx-context | current version: 2019.04.25 10:36




MNWE: When I switch to lmtx, only booklet pages 1 and 4 are set and repeated on 
next page.

context —version:
mtx-context | main context file: 
/users/kitz/lmtx/tex/texmf-context/tex/context/base/mkiv/context.mkxl
mtx-context | current version: 2019.08.17 12:16

There seems to be flushing of pages going on under lmtx. Thanks for any help.

Kitz___
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] metafun 2

2019-08-17 Thread Adam Reviczky
Hi Hans, Alan,

This is really cool! Not sure how I missed this feature, works exactly for
my use-case.

Thanks a lot for pointing this out, I was able to find it in the MAPS as
well.

Cheers,
Adam

On Sat, Aug 17, 2019 at 9:52 AM Hans Hagen  wrote:

> On 8/17/2019 3:27 AM, Alan Braslau wrote:
> > We have eofill in MP (in pdf/ps in fact) and that likely will do what
> you need.
> You forgot the MWD (Minimal Working Demo):
>
> \starttext
>
> \startMPpage
> path p ; p := fullcircle scaled 1cm ;
> path q ; q := fullcircle scaled .5cm ;
>
> nofill p ;
> eofill q ;
> \stopMPpage
>
> \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 / 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] \setupcolumnsetlines does not work

2019-08-17 Thread Wolfgang Schuster

Denis Maier schrieb am 17.08.2019 um 17:49:

Ok.
With this I don't get the empty page. But the setupcolumnsetlines has 
still no effecgt for the second environment.


===

\definecolumnset[One][n=2]

\setupcolumnsetlines[One][1][1][9]

\definecolumnset[Two][n=2]

\setupcolumnsetlines[Two][1][1][5]

\starttext

\startcolumnset[One]

\input knuth

\stopcolumnset

\startcolumnset[Two]

\input knuth

\stopcolumnset

\stoptext



The settings for the second columnset work when the first columnset goes 
over of two or more pages.


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


Re: [NTG-context] \setupcolumnsetlines does not work

2019-08-17 Thread Wolfgang Schuster

Denis Maier schrieb am 17.08.2019 um 16:45:

Ok. So no need to load the module first. Good.

So the second argument is an absolute pagenumber, not relative to 
where to columnset starts... But then, this here should work:

No, you set relative numbers (I checked it) but the first columnset
environment ends on the third page because you leave just enough
space on the second page to fit the text which produces an empty
third page.

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


Re: [NTG-context] \setupcolumnsetlines does not work

2019-08-17 Thread Wolfgang Schuster

Denis Maier schrieb am 17.08.2019 um 15:50:

This here works for the first columnset, but not for the second one:

=
\usemodule[newcolumnsets]

The new code base is used by default and you don't have to load the module.

\definecolumnset[One][n=2]

\setupcolumnsetlines[One][1][1][9]
\setupcolumnsetlines[One][1][2][9]
\setupcolumnsetlines[One][2][1][9]
\setupcolumnsetlines[One][2][2][9]

\definecolumnset[Two][n=2]
\setupcolumnsetlines[Two][1][1][9]
\setupcolumnsetlines[Two][1][2][9]
\setupcolumnsetlines[Two][2][1][9]
\setupcolumnsetlines[Two][2][2][9]

The second argument expects the page number of the column where want
to change the number of lines. In your example the second environment
starts at page 3 but you change the lines only for the first and second 
page.


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


Re: [NTG-context] \setupcolumnsetlines does not work

2019-08-17 Thread Denis Maier
This here works for the first columnset, but not for the second one:

=
\usemodule[newcolumnsets]

\definecolumnset[One][n=2]

\setupcolumnsetlines[One][1][1][9]
\setupcolumnsetlines[One][1][2][9]
\setupcolumnsetlines[One][2][1][9]
\setupcolumnsetlines[One][2][2][9]

\definecolumnset[Two][n=2]
\setupcolumnsetlines[Two][1][1][9]
\setupcolumnsetlines[Two][1][2][9]
\setupcolumnsetlines[Two][2][1][9]
\setupcolumnsetlines[Two][2][2][9]

\starttext
   \startcolumnset[One]
  \input knuth

  \input knuth
\stopcolumnset

\startcolumnset[Two]
  \input knuth

  \input knuth
\stopcolumnset
\stoptext
===

Am Sa., 17. Aug. 2019 um 15:14 Uhr schrieb Denis Maier :

> Ok, have tried it now. No change ...
>
> Am Sa., 17. Aug. 2019 um 13:33 Uhr schrieb Denis Maier  >:
>
>> Also, what about \setupcolumnsetlines[Two][2][1][9]?
>>
>> Denis Maier  schrieb am Sa., 17. Aug. 2019, 13:32:
>>
>>> If I am remembering correctly, the documentation has
>>> \setupcolumnsetlines before \starttext.
>>>
>>> Sytse Knypstra  schrieb am Sa., 17. Aug. 2019,
>>> 12:59:
>>>
 In an effort to balance columns in a columnset layout, I found that in
 the following minimal example this effect is not obtained.
 After commenting out the first three lines after \starttext the result
 is ok.
 I am wondering what I overlooked this time.

 \definecolumnset[Two][n=2]
 \starttext
\startcolumnset[Two]
   \input knuth
\stopcolumnset
\page
\setupcolumnsetlines[Two][1][1][9]
\startcolumnset[Two]
   \input knuth
\stopcolumnset
 \stoptext

 Thank you for your suggestions,

 Sytse Knypstra

 ___
 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

 ___

>>>
___
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] \setupcolumnsetlines does not work

2019-08-17 Thread Denis Maier
Ok, have tried it now. No change ...

Am Sa., 17. Aug. 2019 um 13:33 Uhr schrieb Denis Maier :

> Also, what about \setupcolumnsetlines[Two][2][1][9]?
>
> Denis Maier  schrieb am Sa., 17. Aug. 2019, 13:32:
>
>> If I am remembering correctly, the documentation has \setupcolumnsetlines
>> before \starttext.
>>
>> Sytse Knypstra  schrieb am Sa., 17. Aug. 2019,
>> 12:59:
>>
>>> In an effort to balance columns in a columnset layout, I found that in
>>> the following minimal example this effect is not obtained.
>>> After commenting out the first three lines after \starttext the result
>>> is ok.
>>> I am wondering what I overlooked this time.
>>>
>>> \definecolumnset[Two][n=2]
>>> \starttext
>>>\startcolumnset[Two]
>>>   \input knuth
>>>\stopcolumnset
>>>\page
>>>\setupcolumnsetlines[Two][1][1][9]
>>>\startcolumnset[Two]
>>>   \input knuth
>>>\stopcolumnset
>>> \stoptext
>>>
>>> Thank you for your suggestions,
>>>
>>> Sytse Knypstra
>>>
>>> ___
>>> 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
>>>
>>> ___
>>>
>>
___
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
___


[NTG-context] ConTeXt Meeting 2019 registration details and tshirts

2019-08-17 Thread Taco Hoekwater
Hi all,

Because I received some email requests on whether registration is still open
for the ConTeXt meeting in Bassenge and what to do about day visits et cetera,
here is the nitty gritty on that:

* As of today, there is room left for 10 extra participants, so late 
registrations 
  are still possible. 

* Nevertheless, if you are certain you want to attend; better make sure to 
register
  shortly. You’ll be sorry if there is a sudden influx of dozens of new ConTeXt
  users from CCCamp and registrations have to be closed because of lack of room 
;)

* There are no single rooms available any more.

* Registration will be closed on Sunday September 8 even if we are not full up 
  by then, as some dinner ingredients need to be ordered in advance.

* Day visits and partial attendance are both possible, but must be announced
  before September 8 if you want to stay for dinner and/or overnight (see 
above). 
  Note further that overnight stays are subject to availability of empty beds. 

  Fees for such visits: Lunch: €10; Dinner: €30; Overnight stay: €40.

* The registration form can be used for day visits and partial attendance as
  well as for “normal” registration:

https://meeting.contextgarden.net/2019/register.shtml

  but emailing me personally works fine as well.


I hope that covers everything. Feel free to contact me directly if I forgot 
something.



Then, there is a note on T-shirts needed:

At the moment, we do not have enough registrations for a balanced budget. This 
means
we had to cancel the free conference T-shirt, sorry! 

However, all is not lost: Pavneet Arora will be producing T-shirts for those 
that are 
willing to pay cash on delivery at Bassenge. Expected price is around €15 per 
shirt. 

Because of production times, reservation is both required and urgent. The 
production 
order should be made next Monday or Tuesday at the latest, so if you want one 
(or more) 
of the T-shirts, decide quickly!

Pavneet will probably post a screenshot of the final logo design later today, 
and I 
am sure he will answer any additional questions you may have.

Best wishes,
Taco



___
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] \setupcolumnsetlines does not work

2019-08-17 Thread Denis Maier
Also, what about \setupcolumnsetlines[Two][2][1][9]?

Denis Maier  schrieb am Sa., 17. Aug. 2019, 13:32:

> If I am remembering correctly, the documentation has \setupcolumnsetlines
> before \starttext.
>
> Sytse Knypstra  schrieb am Sa., 17. Aug. 2019,
> 12:59:
>
>> In an effort to balance columns in a columnset layout, I found that in
>> the following minimal example this effect is not obtained.
>> After commenting out the first three lines after \starttext the result is
>> ok.
>> I am wondering what I overlooked this time.
>>
>> \definecolumnset[Two][n=2]
>> \starttext
>>\startcolumnset[Two]
>>   \input knuth
>>\stopcolumnset
>>\page
>>\setupcolumnsetlines[Two][1][1][9]
>>\startcolumnset[Two]
>>   \input knuth
>>\stopcolumnset
>> \stoptext
>>
>> Thank you for your suggestions,
>>
>> Sytse Knypstra
>>
>> ___
>> 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
>>
>> ___
>>
>
___
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] \setupcolumnsetlines does not work

2019-08-17 Thread Denis Maier
If I am remembering correctly, the documentation has \setupcolumnsetlines
before \starttext.

Sytse Knypstra  schrieb am Sa., 17. Aug. 2019,
12:59:

> In an effort to balance columns in a columnset layout, I found that in the
> following minimal example this effect is not obtained.
> After commenting out the first three lines after \starttext the result is
> ok.
> I am wondering what I overlooked this time.
>
> \definecolumnset[Two][n=2]
> \starttext
>\startcolumnset[Two]
>   \input knuth
>\stopcolumnset
>\page
>\setupcolumnsetlines[Two][1][1][9]
>\startcolumnset[Two]
>   \input knuth
>\stopcolumnset
> \stoptext
>
> Thank you for your suggestions,
>
> Sytse Knypstra
>
> ___
> 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
>
> ___
>
___
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
___


[NTG-context] \setupcolumnsetlines does not work

2019-08-17 Thread Sytse Knypstra
In an effort to balance columns in a columnset layout, I found that in the 
following minimal example this effect is not obtained.
After commenting out the first three lines after \starttext the result is ok.
I am wondering what I overlooked this time.

\definecolumnset[Two][n=2]

\starttext

   \startcolumnset[Two]

  \input knuth

   \stopcolumnset

   \page
   \setupcolumnsetlines[Two][1][1][9]

   \startcolumnset[Two]

  \input knuth

   \stopcolumnset

\stoptext


Thank you for your suggestions,

Sytse Knypstra
___
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] The odd semantics of \begincsname

2019-08-17 Thread Hans Hagen

On 8/17/2019 10:56 AM, Henri Menke wrote:

On 17/08/19 8:48 PM, Hans Hagen wrote:

On 8/17/2019 9:19 AM, Henri Menke wrote:

Dear list,

According to the LuaTeX documentation:

  “The \begincsname primitive is like \csname but doesn’t create a
  relaxed equivalent when there is no such name.”

I thought it would be possible to use this fact to skip the \relax-ed
definition when \def-ining a new control sequence, but the following MWE
fails with \inaccessible:

  \expandafter\gdef\csname yes\endcsname{}
  \expandafter\gdef\begincsname no\endcsname{}
  \bye

Is this a bug or is this behaviour intended?  Could this be fixed by
making manufacture_csname aware whether it is in a def_cmd context or
not?

[sorry to those who are not interested in these low level issues, just skip]

intended ... it expands to basically nothing so you get no token
representing a 'name' after the gdef .. the expansion is pushed in from
of whatever comes next (which could be another \expandafter for instance)

you suggest that if \begincsname could behave differently when it's
after a \def, \gdef, (and then quite some more definition related
commands), it could behave differently but it not an option

for instance (as mentioned) there can be more than one expansion going
on after these define commands, like expanding a macro that itself
expands to \csname so one has several \expandafters before the gdef
then); there is actually no looking back in scanning tokens unless a
token has been scanned already and looking forward would involve
expansion so a circular mess

an option could be not to push something on the save stack (a side
effect of creating the csname, which has a little impact on performance
and nesting) but removing that bit might give other side effects (e.g.
for successive reassignments inside a group, maybe even mixed local and
global); i did a quick test with that and it gives quite incompatible
output in ConTeXt so that's definitely a no-go (adding all kind fo
saveguards and checks in the engine doesn't pay off, especially not for
something that never was a problem)

some time ago i considered a convenience command \[e]defcsname, as it
saves a few tokens (no gain in performance as all the related things
still need to happen); but even that one would probably create the name
in the same way

so ... this is the way it is ... (i must admit that it never gave me any
issues so whatever triggered the question, there's probbaly a way around
it)


I can accept this answer.  Just for a little context, the question was
triggered by this:

 
https://tex.stackexchange.com/questions/504501/global-variant-of-csname-endcsname

In short: Having thousands of

 \expandafter\gdef\csname foo\endcsname{}

inside a group (as happens for xmltex), can lead to a save_stack
overflow.  One way around it is to do

 \begingroup\expandafter\endgroup\expandafter\gdef\csname foo\endcsname{}


Sure, just group. But actually, if one needs that many csnames one can 
wonder about the approach. One can bump the save stack just like one 
also might have to bump the hash (extra) size (either of them can 
overflow).


Also, probably a bit of extra grouping can happen at a different level, 
not for each csname but for in this case an xml element, which is also 
more efficient



The \expandafter inside the group will pull the evaluation of \csname
into the group which will discard the save_stack at the \endgroup, thus
avoiding the build-up.  However, this construction is a bit hard to
understand so I was wondering whether


well, instead of this:

\begingroup\expandafter\endgroup\expandafter\gdef\csname foo\endcsname{}

one can just use this:

\begingroup\expandafter\gdef\csname foo\endcsname{}\endgroup

which is less tokens, less pushing/poping and therefore a litle faster 
(but often neglectable compared to other things that tex/macros do in 
most cases) but of course it looks less 'cool' and 'expert' and creates 
less 'awe' .. so let's add another one:


{\expandafter}\expandafter\gdef\csname foo\endcsname{}

this one is performance wise close to the second case (normal grouping)
but it might look more puzzling which is why i should wrap it:

\def\defcsname {{\expandafter}\expandafter\def \csname}
\def\gdefcsname{{\expandafter}\expandafter\gdef\csname}

which then is about as efficient as the first alternative with two 
\expandafter usage using \begingroup\endgroup (okay, efficiency depends 
of course on the engine too, and probably on the cpu as well)


(you can argue that \expandafter and \noexpand and \futurelet ... were 
added to tex so that one could boost his resume ... the more you use in 
sequence the more expert you are; but you can also argue that they add 
some charm to tex, a nice playground and such)



 \expandafter\gdef\begincsname foo\endcsname{}

could be used instead to elide the save_stack (which doesn't work
because \begincsname does not actually build a \csname).
it does when it's known and then it 

Re: [NTG-context] The odd semantics of \begincsname

2019-08-17 Thread Henri Menke
On 17/08/19 8:48 PM, Hans Hagen wrote:
> On 8/17/2019 9:19 AM, Henri Menke wrote:
>> Dear list,
>>
>> According to the LuaTeX documentation:
>>
>>  “The \begincsname primitive is like \csname but doesn’t create a
>>  relaxed equivalent when there is no such name.”
>>
>> I thought it would be possible to use this fact to skip the \relax-ed
>> definition when \def-ining a new control sequence, but the following MWE
>> fails with \inaccessible:
>>
>>  \expandafter\gdef\csname yes\endcsname{}
>>  \expandafter\gdef\begincsname no\endcsname{}
>>  \bye
>>
>> Is this a bug or is this behaviour intended?  Could this be fixed by
>> making manufacture_csname aware whether it is in a def_cmd context or
>> not?
> [sorry to those who are not interested in these low level issues, just skip]
> 
> intended ... it expands to basically nothing so you get no token 
> representing a 'name' after the gdef .. the expansion is pushed in from 
> of whatever comes next (which could be another \expandafter for instance)
> 
> you suggest that if \begincsname could behave differently when it's 
> after a \def, \gdef, (and then quite some more definition related 
> commands), it could behave differently but it not an option
> 
> for instance (as mentioned) there can be more than one expansion going 
> on after these define commands, like expanding a macro that itself 
> expands to \csname so one has several \expandafters before the gdef 
> then); there is actually no looking back in scanning tokens unless a 
> token has been scanned already and looking forward would involve 
> expansion so a circular mess
> 
> an option could be not to push something on the save stack (a side 
> effect of creating the csname, which has a little impact on performance 
> and nesting) but removing that bit might give other side effects (e.g. 
> for successive reassignments inside a group, maybe even mixed local and 
> global); i did a quick test with that and it gives quite incompatible 
> output in ConTeXt so that's definitely a no-go (adding all kind fo 
> saveguards and checks in the engine doesn't pay off, especially not for 
> something that never was a problem)
> 
> some time ago i considered a convenience command \[e]defcsname, as it 
> saves a few tokens (no gain in performance as all the related things 
> still need to happen); but even that one would probably create the name 
> in the same way
> 
> so ... this is the way it is ... (i must admit that it never gave me any 
> issues so whatever triggered the question, there's probbaly a way around 
> it)

I can accept this answer.  Just for a little context, the question was
triggered by this:


https://tex.stackexchange.com/questions/504501/global-variant-of-csname-endcsname

In short: Having thousands of

\expandafter\gdef\csname foo\endcsname{}

inside a group (as happens for xmltex), can lead to a save_stack
overflow.  One way around it is to do

\begingroup\expandafter\endgroup\expandafter\gdef\csname foo\endcsname{}

The \expandafter inside the group will pull the evaluation of \csname
into the group which will discard the save_stack at the \endgroup, thus
avoiding the build-up.  However, this construction is a bit hard to
understand so I was wondering whether

\expandafter\gdef\begincsname foo\endcsname{}

could be used instead to elide the save_stack (which doesn't work
because \begincsname does not actually build a \csname).

Cheers, Henri

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


Re: [NTG-context] metafun 2

2019-08-17 Thread Hans Hagen

On 8/17/2019 3:27 AM, Alan Braslau wrote:

We have eofill in MP (in pdf/ps in fact) and that likely will do what you need.

You forgot the MWD (Minimal Working Demo):

\starttext

\startMPpage
path p ; p := fullcircle scaled 1cm ;
path q ; q := fullcircle scaled .5cm ;

nofill p ;
eofill q ;
\stopMPpage

\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 / 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] The odd semantics of \begincsname

2019-08-17 Thread Hans Hagen

On 8/17/2019 9:19 AM, Henri Menke wrote:

Dear list,

According to the LuaTeX documentation:

 “The \begincsname primitive is like \csname but doesn’t create a
 relaxed equivalent when there is no such name.”

I thought it would be possible to use this fact to skip the \relax-ed
definition when \def-ining a new control sequence, but the following MWE
fails with \inaccessible:

 \expandafter\gdef\csname yes\endcsname{}
 \expandafter\gdef\begincsname no\endcsname{}
 \bye

Is this a bug or is this behaviour intended?  Could this be fixed by
making manufacture_csname aware whether it is in a def_cmd context or
not?

[sorry to those who are not interested in these low level issues, just skip]

intended ... it expands to basically nothing so you get no token 
representing a 'name' after the gdef .. the expansion is pushed in from 
of whatever comes next (which could be another \expandafter for instance)


you suggest that if \begincsname could behave differently when it's 
after a \def, \gdef, (and then quite some more definition related 
commands), it could behave differently but it not an option


for instance (as mentioned) there can be more than one expansion going 
on after these define commands, like expanding a macro that itself 
expands to \csname so one has several \expandafters before the gdef 
then); there is actually no looking back in scanning tokens unless a 
token has been scanned already and looking forward would involve 
expansion so a circular mess


an option could be not to push something on the save stack (a side 
effect of creating the csname, which has a little impact on performance 
and nesting) but removing that bit might give other side effects (e.g. 
for successive reassignments inside a group, maybe even mixed local and 
global); i did a quick test with that and it gives quite incompatible 
output in ConTeXt so that's definitely a no-go (adding all kind fo 
saveguards and checks in the engine doesn't pay off, especially not for 
something that never was a problem)


some time ago i considered a convenience command \[e]defcsname, as it 
saves a few tokens (no gain in performance as all the related things 
still need to happen); but even that one would probably create the name 
in the same way


so ... this is the way it is ... (i must admit that it never gave me any 
issues so whatever triggered the question, there's probbaly a way around 
it)


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
___


[NTG-context] The odd semantics of \begincsname

2019-08-17 Thread Henri Menke
Dear list,

According to the LuaTeX documentation:

“The \begincsname primitive is like \csname but doesn’t create a
relaxed equivalent when there is no such name.”

I thought it would be possible to use this fact to skip the \relax-ed
definition when \def-ining a new control sequence, but the following MWE
fails with \inaccessible:

\expandafter\gdef\csname yes\endcsname{}
\expandafter\gdef\begincsname no\endcsname{}
\bye

Is this a bug or is this behaviour intended?  Could this be fixed by
making manufacture_csname aware whether it is in a def_cmd context or
not?

Cheers, Henri

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