Re: [NTG-context] directsetup vs setups

2021-11-15 Thread Wolfgang Schuster via ntg-context



Rik Kabel schrieb am 15.11.2021 um 22:51:


Wolfgang,

Can you expand on the following statements from your reply?

You can run Hans example with MkIV and the differences should be
even bigger because the check for [] is slower here while in LMTX
it's a engine feature. The main difference in LMTX is a extra
expansion for \setup compared to \directsetup.

there is no difference between \setup and \directsetup

Are you saying:

1. When [] are used with \setup, expansion of the contents is done 
differently than when {} are used.


It doesn't matter which form you use for \setup.

What I'm trying to say is that \setup is slower (or better was slower in 
MkIV) than \directsetup because \setup has to check first if the name is 
passed within brackets or as normal argument in braces.


The code in MkIV would look similar to this:

\def\setup
  {\doifnextcharelse[
 \setup_brackets
 \setup_braces}

\def\setup_brackets[#1]%
  {\directsetup{#1}}

\def\setup_braces#1%
  {\directsetup{#1}}

2. There is no significant processing time difference between \setup 
and \directsetup.




When I run the following example on my machine

\starttext

\startsetups [dummy]
\stopsetups

\testfeatureonce{10}{\setup  {test}} \elapsedtime \par
\testfeatureonce{10}{\directsetup{test}} \elapsedtime \par

\stoptext

I get these times.

# MkIV

\setup   : 0.136s
\directsetup : 0.079s

# LMTX

\setup   : 0.083 seconds
\directsetup : 0.071 seconds

Add additional stuff in the setup environment and the difference between 
\setup and \directsetup doesn't matter anymore.


3. There is additional expansion performed for \setup compared to 
\directsetup.




Although this isn't completely true (but very close) the definition for 
\setup in LMTX is like this:


\def\setup#1{\directsetup{#1}}

4. Under LMTX, because {} and [] handling overhead is so similar, the 
most visible processing time difference to users is from the 
difference in  expansion between \setup and \directsetup.


I think you are saying that 2, 3, and 4 are true, but that 1 is not true.

If that is the case, can you provide an example that demonstrates the 
difference in expansion between \setup and \directsetup?


Also, as far as expansion, is \fastsetup like \setup or like \directsetup?



\setup and \directsetup are similar. \fastsetup is like the name implies 
a faster version which ignores grid mode and doesn't care whether the 
requested environment even exists.


My simple testing shows no difference between setup, directsetup, and 
fastsetup for namespace set and reset. Is it your understanding that 
they all behave the same?




No, \fastsetup behaves different because it leaves \relax\empty in the 
input when you pass the name of a not existing environment.


It shouldn't matter in normal usage but below are two examples.


Example 1:

\starttext

\tex{directsetup}

\scratchcounter 12\directsetup{unknown_a}34

\the\scratchcounter

\tex{fastsetup}

\scratchcounter 12\fastsetup{unknown_b}34

\the\scratchcounter

\stoptext


Example 2:

\starttext

\normalexpanded{\noexpand\firstoftwoarguments\directsetup{unknown_a}xy}

\normalexpanded{\noexpand\firstoftwoarguments\fastsetup{unknown_b}xy}

\stoptext


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] directsetup vs setups

2021-11-15 Thread Hans Hagen via ntg-context

On 11/15/2021 7:06 PM, Rik Kabel via ntg-context wrote:

On your empty performance test, I get around 0.10, .11, .08 for direct, 
and 0.4 for fast. With the grouped styling, those balloon to 0.50, 0.56, 
0.48, and 0.44.

just for the record, here with lmtx i get (on a 2013 laptop):

0.128 0.130 0.114 0.057
0.686 0.674 0.660 0.602

while mkiv does:

0.211 0.224 0.131 0.055
0.763 0.767 0.677 0.597

(normally one will use at least a million tests because th elast digot 
is kind of meaningless; also the used compiler matters)


but i bet that on an average job our machines don't perform too 
different (simple tests like these are happily using the cpu cache)


it's not that easy to make tex jobs run faster but also not that hard to 
make them run slower, which i try to avoid -)


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] directsetup vs setups

2021-11-15 Thread Wolfgang Schuster via ntg-context

Rik Kabel via ntg-context schrieb am 15.11.2021 um 19:06:

So, some follow-up questions:

1. What do you mean by "only one setup" in the description of 
directsetup and fastsetup? I have examples of using two different 
directsetup in one after key, so it does not seem to mean that.


With \directsetup, \fastsetup and \setup (I'm correcting Hans here) you 
can pass only the name of a single setups-environment as argument, e.g.


    \directsetup{my_fancy_setup}

while \setups allows you to pass a list of names, e.g.

    \setups[custom_setup_a,custom_setup_b,...]

2. What is meant by saying that directsetup supports gridsnapping? Do 
you mean that fastsetup does not? (If that is the case, should a 
module writer not use fastsetup because it might be used in a document 
that requires a grid?)


The \startsetups environment has a optional argument which accepts (at 
the moment) the "grid" keyword to set values which are only used when 
grid snapping (\setuplayout[grid=yes]) is enabled, e.g.


\startsetups [grid] [my_fancy_setup]
    % settings which are used when grid mode is enabled
\stopsetups

\startsetups [my_fancy_setup]
    % settings which are used when grid mode is disabled
    % or when no grid related setups with the same name exist
\stopsetups

When you now use \directsetup{my_fancy_setup} (or \setup[...]) ConTeXt 
checks if grid mode is enabled and selects the right settings but 
\fastsetup never performs this check and always uses the non grid 
settings. The \fastsetup command is even more basic because it doesn't 
even check if there is a setups environment with the given name which is 
done by the other commands.


3. Is the support for {} and [] in setup simply to maintain legacy 
support for {}, or are there reasons to choose one over the other? I 
do see consistently faster times with the curlies.


You can run Hans example with MkIV and the differences should be even 
bigger because the check for [] is slower here while in LMTX it's a 
engine feature. The main difference in LMTX is a extra expansion for 
\setup compared to \directsetup.


4. Are there operations that are supported in directsetup that are not 
supported in setup or fastsetup? Are there operations supported in 
fastsetup that are not supported in setup or directsetup?


There is no difference between \setup and \directsetup but \fastsetup 
should only be used when you can ensure the requested environment exists.


5. Is it fair to say that setup can do the most, directsetup a bit 
less, and fastsetup is the most restrictive? Except for the most 
performance-constrained documents, setup is a safe choice, but when 
constructing modules or performance tuning, the others might be tested?




As I already wrote before there is no difference between \setup and 
\directsetup. When you care about performance \directsetup is the wrong 
start because you won't notice a difference.


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] directsetup vs setups

2021-11-15 Thread Rik Kabel via ntg-context


On 2021-11-15 04:38, Hans Hagen via ntg-context wrote:

On 11/15/2021 6:24 AM, Rik Kabel via ntg-context wrote:

Hello list,

Can anyone provide a description of, or a point to a description of, 
the differences between setups= and directsetup= for including 
setups? I searched the list archive and the documents and found 
nothing. (That may indicate my level of search foo, but nonetheless I 
am in need of help with this.)

\setup  : takes a list ({...} or [...])
\directsetup: supports gridsnapping, only one setup
\fastsetup  : the fastest, only one setup

concerning performance, i wonder if you'll notice it

\starttext
    \startsetups test
    \stopsetups

    \testfeatureonce{10}{\setup  {test}} \elapsedtime \par
    \testfeatureonce{10}{\setup  [test]} \elapsedtime \par
    \testfeatureonce{10}{\directsetup{test}} \elapsedtime \par
    \testfeatureonce{10}{\fastsetup  {test}} \elapsedtime \par
\stoptext

because often what's done in the setup is taking the time, just test

    \startsetups test
    {\bf}
    \stopsetups

you can volunteer to wikify it

Hans

Happy to wikify once I understand it.

On your empty performance test, I get around 0.10, .11, .08 for direct, 
and 0.4 for fast. With the grouped styling, those balloon to 0.50, 0.56, 
0.48, and 0.44.


So, some follow-up questions:

1. What do you mean by "only one setup" in the description of
   directsetup and fastsetup? I have examples of using two different
   directsetup in one after key, so it does not seem to mean that.
2. What is meant by saying that directsetup supports gridsnapping? Do
   you mean that fastsetup does not? (If that is the case, should a
   module writer not use fastsetup because it might be used in a
   document that requires a grid?)
3. Is the support for {} and [] in setup simply to maintain legacy
   support for {}, or are there reasons to choose one over the other? I
   do see consistently faster times with the curlies.
4. Are there operations that are supported in directsetup that are not
   supported in setup or fastsetup? Are there operations supported in
   fastsetup that are not supported in setup or directsetup?
5. Is it fair to say that setup can do the most, directsetup a bit
   less, and fastsetup is the most restrictive? Except for the most
   performance-constrained documents, setup is a safe choice, but when
   constructing modules or performance tuning, the others might be tested?

--
Rik___
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] Can't replicate a simple example in the wikipage

2021-11-15 Thread Wolfgang Schuster via ntg-context

A A via ntg-context schrieb am 15.11.2021 um 17:15:

Dear All,

I'm trying to run one of the examples in the ConTeXt wiki page 
https://wiki.contextgarden.net/Titles


Here's the code:
*
*
*\setuppapersize[A5]

\section[sec:old]{Old Section}

This is an old-style \ConTeXt\ section.

\startsection
[
    title={New Section}
    reference=sec:new,
  ]
This is a new-style section.
\stopsection*
*
*
However, my compiled pdf looks nothing like the example on the wiki. 
What am I doing wrong? Is there anything wrong with my ConTeXt settings?


1. You need \starttext at the begin and \stoptext at the end of your 
document.


2. You forgot a comma after the title entry.

\starttext

\section[sec:old]{Old Section}

This is an old-style \ConTeXt\ section.

\startsection
  [title={New Section},
   reference=sec:new]

This is a new-style section.

\stopsection

\stoptext

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
___


[NTG-context] Can't replicate a simple example in the wikipage

2021-11-15 Thread A A via ntg-context
Dear All,

I'm trying to run one of the examples in the ConTeXt wiki page
https://wiki.contextgarden.net/Titles

Here's the code:













*\setuppapersize[A5]\section[sec:old]{Old Section}This is an old-style
\ConTeXt\ section.\startsection  [title={New Section}
reference=sec:new,  ]This is a new-style section.\stopsection*

However, my compiled pdf looks nothing like the example on the wiki. What
am I doing wrong? Is there anything wrong with my ConTeXt settings?

Regards,

Amine


start_stop_sectioning.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] \startbodymatter forcing new page in document

2021-11-15 Thread Wolfgang Schuster via ntg-context

Taco Hoekwater via ntg-context schrieb am 15.11.2021 um 15:28:

On 15 Nov 2021, at 15:07, A A via ntg-context  wrote:

Dear All,

The following code generates a title and some fake text:

\setuppagenumbering[location=right]

\usemodule[visual]

\usebtxdataset[bibliography.bib]
\starttext
\title{test}
\fakewords{1000}{1200}

\stoptext

The following code does the same, but wraps the fakewords in a bodymatter 
environment:

\setuppagenumbering[location=right]

\usemodule[visual]

\usebtxdataset[bibliography.bib]
\starttext
\title{test}
\startbodymatter
\fakewords{1000}{1200}
\stopbodymatter

\stoptext


In the first case, the title remains on the same page as the fake text. In the 
second case, a new page is forced after the title. Why does this occur?

\startbodymatter starts a sectionblock (the “bodypart” block, to be exact) and
by default these blocks all switch to a ‘right’ page. Add this in your preamble 
to
get rid of the page switch:

\setupsectionblock[bodypart][page=no]


The better solution in my opinion is to put the title *in* the sectionblock.

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
___


[NTG-context] SimpleSlides and Visual counters

2021-11-15 Thread Otared Kavian via ntg-context
Hi all, in particular Aditya M. and Thomas A.S.,

It seems that the visual counter in  SimpleSlides module (the version I have 
from ConTeXt Garden is from 2014) does not work fine with the latest LMTX.
Is the issue is known ? If so, is there a new version of SimpleSlides in which 
the issue has been fixed ?

Best regards: Otared
___
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] \startbodymatter forcing new page in document

2021-11-15 Thread Taco Hoekwater via ntg-context


> On 15 Nov 2021, at 15:07, A A via ntg-context  wrote:
> 
> Dear All,
> 
> The following code generates a title and some fake text:
> 
> \setuppagenumbering[location=right]
> 
> \usemodule[visual]
> 
> \usebtxdataset[bibliography.bib]
> \starttext
> \title{test}
> \fakewords{1000}{1200}
> 
> \stoptext
> 
> The following code does the same, but wraps the fakewords in a bodymatter 
> environment:
> 
> \setuppagenumbering[location=right]
> 
> \usemodule[visual]
> 
> \usebtxdataset[bibliography.bib]
> \starttext
> \title{test}
> \startbodymatter
> \fakewords{1000}{1200}
> \stopbodymatter
> 
> \stoptext
> 
> 
> In the first case, the title remains on the same page as the fake text. In 
> the second case, a new page is forced after the title. Why does this occur? 

\startbodymatter starts a sectionblock (the “bodypart” block, to be exact) and
by default these blocks all switch to a ‘right’ page. Add this in your preamble 
to
get rid of the page switch:

\setupsectionblock[bodypart][page=no]



> 
> Regards,
> 
> Amine
> 
> ___
> 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
> ___

— 
Taco Hoekwater  E: t...@bittext.nl
genderfluid (all pronouns)



___
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] Paragraph break over pages with hanging float

2021-11-15 Thread Adam Reviczky via ntg-context
Thank Hans,

I thought something along those lines, but thank you for the explanation.
Indeed, I probably should do it differently.

If the "force" option would not break anything then I would like to try
that, otherwise it is all fine as is.
This is not really critical and I will rather change the float in my
document than create more issues.

Regards,
Adam

On Mon, Nov 15, 2021 at 2:00 PM Hans Hagen  wrote:

> On 11/15/2021 6:26 AM, Adam Reviczky via ntg-context wrote:
> > Hi,
> >
> > Is there a way to allow a paragraph to break over two pages (between the
> > paragraph start and the placement of the float) with a hanging float
> > further down the paragraph?
> >
> > MWE:
> >
> > \starttext
> > \input lorem
> > \blank[20*line]
> >
> > % commenting out the hanging float allows paragraph break
> > \startplacefigure[location={right,15*hang}]
> > \framed[width=3cm,height=2cm]{graphic}
> > \stopplacefigure
> >
> > \dorecurse{10}{\input lorem}
> > \stoptext
> >
> > When I remove the hanging float, the paragraph is broken down at the
> > first pagebreak.
> > With the float, the paragraph starts always on the next page, regardless
> > of the space left on the previous page.
> Yes and no ... tex cannot really lookahead here. But thanks to some
> recent new trickery I can provide:
>
>location={right,15*hang,force}
>
> However, it really is up to the user to check of all works out right
> (but i assume that the 15*hang is also soemthing specific for the
> situation). Adapting this already (too) complex mechanism too much is
> asking for issues.
>
> 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] \startbodymatter forcing new page in document

2021-11-15 Thread A A via ntg-context
Dear All,

The following code generates a title and some fake text:










*\setuppagenumbering[location=right]\usemodule[visual]\usebtxdataset[bibliography.bib]\starttext\title{test}\fakewords{1000}{1200}\stoptext*

The following code does the same, but wraps the fakewords in a *bodymatter *
environment:







*\setuppagenumbering[location=right]\usemodule[visual]\usebtxdataset[bibliography.bib]\starttext\title{test}*


*\startbodymatter\fakewords{1000}{1200}\stopbodymatter*

*\stoptext*


In the first case, the title remains on the same page as the fake text. In
the second case, a new page is forced after the title. Why does this occur?

Regards,

Amine
___
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] Paragraph break over pages with hanging float

2021-11-15 Thread Hans Hagen via ntg-context

On 11/15/2021 6:26 AM, Adam Reviczky via ntg-context wrote:

Hi,

Is there a way to allow a paragraph to break over two pages (between the 
paragraph start and the placement of the float) with a hanging float 
further down the paragraph?


MWE:

\starttext
\input lorem
\blank[20*line]

% commenting out the hanging float allows paragraph break
\startplacefigure[location={right,15*hang}]
\framed[width=3cm,height=2cm]{graphic}
\stopplacefigure

\dorecurse{10}{\input lorem}
\stoptext

When I remove the hanging float, the paragraph is broken down at the 
first pagebreak.
With the float, the paragraph starts always on the next page, regardless 
of the space left on the previous page.
Yes and no ... tex cannot really lookahead here. But thanks to some 
recent new trickery I can provide:


  location={right,15*hang,force}

However, it really is up to the user to check of all works out right 
(but i assume that the 15*hang is also soemthing specific for the 
situation). Adapting this already (too) complex mechanism too much is 
asking for issues.


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] Emojis showing up in black instead of colours

2021-11-15 Thread Vincent Hennebert via ntg-context
On Fri, 2021-11-12 at 23:00 +0100, Pablo Rodriguez via ntg-context
wrote:
> On 11/12/21 7:08 PM, Vincent Hennebert via ntg-context wrote:
> > Hi there,
> > 
> > freshly upgraded LMTX installation. TwemojiMozilla.ttf downloaded
> > from
> > GitHub [1].
> > [...]
> > gives me pages of emojis, all black. According to what is described
> > on
> > Stackexchange, I should be getting colours. Am I doing something
> > wrong?
> 
> Hi Vincent,
> 
> if you are using Evince, try Okular to check color display.
> 
> I experienced something similar in the past.
> 
> Just in case it helps,

Thanks Pablo (and Hans). I am using Evince indeed and I would never
have thought of checking with another PDF viewer. All is well on the
ConTeXt side, my document displays fine in Firefox.

Thanks again,
Vincent

___
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] Bug in lmt_arrow

2021-11-15 Thread Hans Hagen via ntg-context

On 11/15/2021 4:07 AM, Aditya Mahajan wrote:

On Sun, 14 Nov 2021, Aditya Mahajan via ntg-context wrote:


On Sun, 14 Nov 2021, Hans Hagen wrote:


On 11/14/2021 4:33 AM, Aditya Mahajan via ntg-context wrote:

Hi,

There is a bug in lmt_arrow. If given a "non-cycle" path, lmt_arrow
completes the cycle.

  \starttext

  \startMPcode
newpath p;
ahfactor := 5;
p := origin .. (1cm, 1cm) .. (2cm, 0);
draw lmt_arrow
 [
   path = p,
   location = "percentage",
   percentage = 50,
   alternative = "curved",
 ]
 withpen pencircle scaled 1bp;
  \stopMPcode
  \stoptext

With 2021.11.11, I get the attached file. Note that lmt_arrow has drawn the
"cycle" version of the path, even though p does not have a cycle.

I have looked at the code and cannot figure out why this is happening.


it happens in the 'direct' variant (metapost.registerdirect) where a boolean
is passed as signal and that boolean then is also picked up by the (shared)
path injector as (old school) signal that a path is closed while it should
instead consutl the closed field in a path table (sounds more complex than it
is)

so in the end it is a nasty side effect of the fast inject code path (shared
function with different stack values; i'll probably have to ditch a "low level
backward compatibility feature no one uses anyway" some day)

i uploaded a fix that you can test when the bins are compiled at

https://build.contextgarden.net/#/waterfall?tags=c.luametatex

new bins then in:

https://dl.contextgarden.net/build/luametatex/

(fyi: in the mp code you see that the path p is 'get' from the lua end where
it got passed to by parameter)


Thanks! Works perfectly here.


Spoke too soon. Now straight lines don't work:


new attempt (submitted to build)


-
  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] directsetup vs setups

2021-11-15 Thread Hans Hagen via ntg-context

On 11/15/2021 6:24 AM, Rik Kabel via ntg-context wrote:

Hello list,

Can anyone provide a description of, or a point to a description of, the 
differences between setups= and directsetup= for including setups? I 
searched the list archive and the documents and found nothing. (That may 
indicate my level of search foo, but nonetheless I am in need of help 
with this.)

\setup  : takes a list ({...} or [...])
\directsetup: supports gridsnapping, only one setup
\fastsetup  : the fastest, only one setup

concerning performance, i wonder if you'll notice it

\starttext
\startsetups test
\stopsetups

\testfeatureonce{10}{\setup  {test}} \elapsedtime \par
\testfeatureonce{10}{\setup  [test]} \elapsedtime \par
\testfeatureonce{10}{\directsetup{test}} \elapsedtime \par
\testfeatureonce{10}{\fastsetup  {test}} \elapsedtime \par
\stoptext

because often what's done in the setup is taking the time, just test

\startsetups test
{\bf}
\stopsetups

you can volunteer to wikify 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
___


Re: [NTG-context] directsetup vs setups

2021-11-15 Thread Denis Maier via ntg-context
Oh yeah, I'd like to know more about this as well. Also, what about \fastsetup?

Denis

> -Ursprüngliche Nachricht-
> Von: ntg-context  Im Auftrag von Rik Kabel
> via ntg-context
> Gesendet: Montag, 15. November 2021 06:24
> An: mailing list for ConTeXt users 
> Cc: Rik Kabel 
> Betreff: [NTG-context] directsetup vs setups
> 
> Hello list,
> 
> Can anyone provide a description of, or a point to a description of, the
> differences between setups= and directsetup= for including setups? I
> searched the list archive and the documents and found nothing. (That may
> indicate my level of search foo, but nonetheless I am in need of help with
> this.)
> 
> --
> Rik
> 
> __
> _
> 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
___