ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] weekend update
@ 2024-06-21 17:00 Hans Hagen via ntg-context
  2024-06-21 17:29 ` [NTG-context] " Pablo Rodriguez via ntg-context
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Hans Hagen via ntg-context @ 2024-06-21 17:00 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Hans Hagen

Hi,

I uploaded a new version:

-- fix for hraban's svg image (one character patch)

-- more verbose link comments for pablo (for experimenting)

-- support for stacking at the tex end (maybe for presentations)

\starttext

\definestacking[one]
\definestacking[two]

\startbuffer
This is a test \stacking [one] {and a proof} of \stacking [two] 
{concept} indeed
\stacking [one] {\blackrule [width=4cm]} is it and the question is how 
\stacking
[two] {\scale [s=2] {fancy}} we can go

\startstacking[one]
\startformula
     \sqrt{1+x}
\stopformula
\stopstacking

and how useful \stacking[two]{\inframed{it}} is.
\stopbuffer

\startstackingsteps[one,two,{one,two}]
     \startTEXpage[offset=1ts]
         \getbuffer
     \stopTEXpage
\stopstackingsteps

\startTEXpage[offset=1ts] \setupstacking[criterium={one}]     \getbuffer 
\stopTEXpage
\startTEXpage[offset=1ts] \setupstacking[criterium={two}]     \getbuffer 
\stopTEXpage
\startTEXpage[offset=1ts] \setupstacking[criterium={one,two}] \getbuffer 
\stopTEXpage

\stoptext

-- support for more private pdf

\enabledirectives[backend.pdf.nounicode=noai]
\enabledirectives[backend.pdf.nounicode=nopilot]
\enabledirectives[backend.pdf.nounicode=justread]
\enabledirectives[backend.pdf.nounicode=✅]
\enabledirectives[backend.pdf.nounicode=✅❌]
\enabledirectives[backend.pdf.nounicode=❌]

\startTEXpage[offset=1ts]
     \input tufte
\stopTEXpage

The last option can be handy when you don't want to make harvesting your 
documents too easy for these ai bots (as in cloud based pdf stuff). It's 
the first outcome of the multi-year, multi-stage, very scientific 
'inacessible pdf' project that Mikael S. and I recently started.

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

* [NTG-context] Re: weekend update
  2024-06-21 17:00 [NTG-context] weekend update Hans Hagen via ntg-context
@ 2024-06-21 17:29 ` Pablo Rodriguez via ntg-context
  2024-06-22  0:47 ` Aditya Mahajan
  2024-06-23 12:35 ` Gerion Entrup
  2 siblings, 0 replies; 10+ messages in thread
From: Pablo Rodriguez via ntg-context @ 2024-06-21 17:29 UTC (permalink / raw)
  To: ntg-context; +Cc: Pablo Rodriguez

On 6/21/24 19:00, Hans Hagen via ntg-context wrote:
> [...]
> The last option can be handy when you don't want to make harvesting your
> documents too easy for these ai bots (as in cloud based pdf stuff). It's
> the first outcome of the multi-year, multi-stage, very scientific
> 'inacessible pdf' project that Mikael S. and I recently started.

Many thanks for the new upload, Hans.

I have just tested this feature and I really like it.

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

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

* [NTG-context] Re: weekend update
  2024-06-21 17:00 [NTG-context] weekend update Hans Hagen via ntg-context
  2024-06-21 17:29 ` [NTG-context] " Pablo Rodriguez via ntg-context
@ 2024-06-22  0:47 ` Aditya Mahajan
  2024-06-23 12:42   ` Gerion Entrup
  2024-06-23 12:35 ` Gerion Entrup
  2 siblings, 1 reply; 10+ messages in thread
From: Aditya Mahajan @ 2024-06-22  0:47 UTC (permalink / raw)
  To: Hans Hagen via ntg-context

On Fri, 21 Jun 2024, Hans Hagen via ntg-context wrote:

> Hi,
> 
> -- support for stacking at the tex end (maybe for presentations)
> 
> \starttext
> 
> \definestacking[one]
> \definestacking[two]
> 
> \startstackingsteps[one,two,{one,two}]
>     \startTEXpage[offset=1ts]
>         \getbuffer
>     \stopTEXpage
> \stopstackingsteps

I have crude macros which provide this features (save stuff in boxes and then unbox) for showing stuff stepwise in presentation (without relying on fancy PDF features which are viewer dependent). So, this new feature is very interesting. Thanks!

I use stackers in the following ways:

Case 1: Show stuff step by step

\startstackingsteps[1,{1,2},{1,2,3},{1,2,3,4}]

\startstacking[1]
...
\stopstacking

\startstacking[2]
...
\stopstacking

\startstacking[3]
...
\stopstacking

\startstacking[4]
...
\stopstacking

\stopstackingsteps


Case 2: Show stuff step by step but some things are only shown once

\startstackingsteps[1,{1,2,2only},{1,2,3},{1,2,3,4}]

....

\startstacking[2] % Show always after 2nd step
...
\stopstacking

\startstacking[2only] % Show only during step 2
...
\stopstacking

...

\stopstackingsetps

Case 3: Show stuff step by step but some things are only for specific slides

\startstacking[2only,3only] % Show only during step 2 and 3:
...
\stopstacking

So, I have a few requests:

1. Can we add support for \startstacking[one,two]? 

2. For case 1, could we have a shortcut to easily write \startstackingsteps[1,{1,2},{1,2,3}...]. This gets really tedious when there are say 6 or 7 steps. 

   One option is:

   \startstackingsteps[criterium={1,2,3}, alternative=normal] % or sequential
    
    for the current implementation

    and 

   \startstackingsteps[criterium={1,2,3}, alternative=cumulative]

   for the cumulative option (1,{1,2},{1,2,3}...)

3. It will be nice to have a syntax to easily handle case 2 and 3. 

As a bonus, I found that tex stacking plays nicely with metapost stacking!

\starttext

\definestacking[1]
\definestacking[2]
\definestacking[3]

\startbuffer
\subject{How to draw a circle}
\startitemize
    \startstacking[2] \startitem Pick a point \stopitem \stopstacking
    \startstacking[3] \startitem Draw the circle \stopitem \stopstacking
\stopitemize

\startplacefigure[location={here,none}]
  \startMPcode[stacking={\namedstackingparameter\empty{criterium}}]
    newpair A; A := origin;
    newpath p; p := fullcircle scaled 3cm shifted A;

    fill fullcircle scaled 3bp shifted A withstacking 2;

    draw p withstacking 3;

    setbounds currentpicture to bbox p ;
  \stopMPcode
\stopplacefigure
\stopbuffer

\startstackingsteps[1,{1,2},{1,2,3}]
     \startTEXpage[offset=1ts]
         \getbuffer
     \stopTEXpage
\stopstackingsteps
\stoptext

Thanks,
Aditya

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

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

* [NTG-context] Re: weekend update
  2024-06-21 17:00 [NTG-context] weekend update Hans Hagen via ntg-context
  2024-06-21 17:29 ` [NTG-context] " Pablo Rodriguez via ntg-context
  2024-06-22  0:47 ` Aditya Mahajan
@ 2024-06-23 12:35 ` Gerion Entrup
  2024-06-23 12:43   ` Gerion Entrup
  2024-06-23 13:28   ` Hans Hagen via ntg-context
  2 siblings, 2 replies; 10+ messages in thread
From: Gerion Entrup @ 2024-06-23 12:35 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 2707 bytes --]

Am Freitag, 21. Juni 2024, 19:00:03 MESZ schrieb Hans Hagen via ntg-context:
> -- support for stacking at the tex end (maybe for presentations)
> 
> \starttext
> 
> \definestacking[one]
> \definestacking[two]
> 
> \startbuffer
> This is a test \stacking [one] {and a proof} of \stacking [two] 
> {concept} indeed
> \stacking [one] {\blackrule [width=4cm]} is it and the question is how 
> \stacking
> [two] {\scale [s=2] {fancy}} we can go
> 
> \startstacking[one]
> \startformula
>      \sqrt{1+x}
> \stopformula
> \stopstacking
> 
> and how useful \stacking[two]{\inframed{it}} is.
> \stopbuffer
> 
> \startstackingsteps[one,two,{one,two}]
>      \startTEXpage[offset=1ts]
>          \getbuffer
>      \stopTEXpage
> \stopstackingsteps
> 
> \startTEXpage[offset=1ts] \setupstacking[criterium={one}]     \getbuffer 
> \stopTEXpage
> \startTEXpage[offset=1ts] \setupstacking[criterium={two}]     \getbuffer 
> \stopTEXpage
> \startTEXpage[offset=1ts] \setupstacking[criterium={one,two}] \getbuffer 
> \stopTEXpage
> 
> \stoptext

Very nice, thank you!

I see some similarities to the "visible on" technique [1], I posted in a previous thread.
What comes there really handy are range specifiers, what seems not possible with this interface.
For example: "visible on=<2->" renders the content on every page except the first one
or "visible on=<1-5,13-15>" on the first page up to the fifth page and from page 13 to 15.

The mechanism stems from the Beamer overlay specifications, see section 9.3 of the manual [2]
and can be much more complicated with modes (section 9.6.2).

To add this to the new interface, if you want that, the stack layers above need some kind of order,
which is implicit for numbers:
```
\definestacking{one}
\definestacking{two}
\definestacking{three}
\definestackingorder{one,two, three}
...
\setupstacking[criterium={one-three}]
```
The order could also be implicitly defined after the order of the \definestacking calls.

Or would it be possible to have numbers always automatically (additionally) available as stacking layer?
So that this "just" works:
```
\startbuffer
This is a test \stacking [1] {and a proof} of \stacking [2] {concept} indeed.
\stopbuffer
...
\setupstacking[criterium={1-}]
```

I also wondered, if it is possible to define a lot of layers semiautomatically in Lua
(in some graphics I needed around 20 layers). It seems that numbers in layer names currently are not allowed.
Is code like this possible somehow?

```
\startluacode
for i = 1, 20 do
    context.definestacking(string.format("l\letterpercent.d", i))
end
\stopluacode
```

Gerion


[1] https://github.com/luhsra/texmf/blob/main/tex/latex/beamertools/beamertools.sty
[2] https://ctan.org/pkg/beamer

[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

[-- Attachment #2: Type: text/plain, Size: 511 bytes --]

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

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

* [NTG-context] Re: weekend update
  2024-06-22  0:47 ` Aditya Mahajan
@ 2024-06-23 12:42   ` Gerion Entrup
  0 siblings, 0 replies; 10+ messages in thread
From: Gerion Entrup @ 2024-06-23 12:42 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 3200 bytes --]

Am Samstag, 22. Juni 2024, 02:47:31 MESZ schrieb Aditya Mahajan:
> On Fri, 21 Jun 2024, Hans Hagen via ntg-context wrote:
> 
> > Hi,
> > 
> > -- support for stacking at the tex end (maybe for presentations)
> > 
> > \starttext
> > 
> > \definestacking[one]
> > \definestacking[two]
> > 
> > \startstackingsteps[one,two,{one,two}]
> >     \startTEXpage[offset=1ts]
> >         \getbuffer
> >     \stopTEXpage
> > \stopstackingsteps
> 
> I have crude macros which provide this features (save stuff in boxes and then unbox) for showing stuff stepwise in presentation (without relying on fancy PDF features which are viewer dependent). So, this new feature is very interesting. Thanks!
> 
> I use stackers in the following ways:
> 
> Case 1: Show stuff step by step
> 
> \startstackingsteps[1,{1,2},{1,2,3},{1,2,3,4}]
> 
> \startstacking[1]
> ...
> \stopstacking
> 
> \startstacking[2]
> ...
> \stopstacking
> 
> \startstacking[3]
> ...
> \stopstacking
> 
> \startstacking[4]
> ...
> \stopstacking
> 
> \stopstackingsteps
> 
> 
> Case 2: Show stuff step by step but some things are only shown once
> 
> \startstackingsteps[1,{1,2,2only},{1,2,3},{1,2,3,4}]
> 
> ....
> 
> \startstacking[2] % Show always after 2nd step
> ...
> \stopstacking
> 
> \startstacking[2only] % Show only during step 2
> ...
> \stopstacking
> 
> ...
> 
> \stopstackingsetps
> 
> Case 3: Show stuff step by step but some things are only for specific slides
> 
> \startstacking[2only,3only] % Show only during step 2 and 3:
> ...
> \stopstacking
> 
> So, I have a few requests:
> 
> 1. Can we add support for \startstacking[one,two]? 
> 
> 2. For case 1, could we have a shortcut to easily write \startstackingsteps[1,{1,2},{1,2,3}...]. This gets really tedious when there are say 6 or 7 steps. 
> 
>    One option is:
> 
>    \startstackingsteps[criterium={1,2,3}, alternative=normal] % or sequential
>     
>     for the current implementation
> 
>     and 
> 
>    \startstackingsteps[criterium={1,2,3}, alternative=cumulative]
> 
>    for the cumulative option (1,{1,2},{1,2,3}...)
> 
> 3. It will be nice to have a syntax to easily handle case 2 and 3. 
> 
> As a bonus, I found that tex stacking plays nicely with metapost stacking!
> 
> \starttext
> 
> \definestacking[1]
> \definestacking[2]
> \definestacking[3]
> 
> \startbuffer
> \subject{How to draw a circle}
> \startitemize
>     \startstacking[2] \startitem Pick a point \stopitem \stopstacking
>     \startstacking[3] \startitem Draw the circle \stopitem \stopstacking
> \stopitemize
> 
> \startplacefigure[location={here,none}]
>   \startMPcode[stacking={\namedstackingparameter\empty{criterium}}]
>     newpair A; A := origin;
>     newpath p; p := fullcircle scaled 3cm shifted A;
> 
>     fill fullcircle scaled 3bp shifted A withstacking 2;
> 
>     draw p withstacking 3;
> 
>     setbounds currentpicture to bbox p ;
>   \stopMPcode
> \stopplacefigure
> \stopbuffer
> 
> \startstackingsteps[1,{1,2},{1,2,3}]
>      \startTEXpage[offset=1ts]
>          \getbuffer
>      \stopTEXpage
> \stopstackingsteps
> \stoptext
> 
> Thanks,
> Aditya

Sorry, I did not read your answer before writing an own. See my other mail, it has much in common with yours.

Gerion



[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

[-- Attachment #2: Type: text/plain, Size: 511 bytes --]

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

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

* [NTG-context] Re: weekend update
  2024-06-23 12:35 ` Gerion Entrup
@ 2024-06-23 12:43   ` Gerion Entrup
  2024-06-23 13:28   ` Hans Hagen via ntg-context
  1 sibling, 0 replies; 10+ messages in thread
From: Gerion Entrup @ 2024-06-23 12:43 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 3211 bytes --]

Am Sonntag, 23. Juni 2024, 14:35:13 MESZ schrieb Gerion Entrup:
> Am Freitag, 21. Juni 2024, 19:00:03 MESZ schrieb Hans Hagen via ntg-context:
> > -- support for stacking at the tex end (maybe for presentations)
> > 
> > \starttext
> > 
> > \definestacking[one]
> > \definestacking[two]
> > 
> > \startbuffer
> > This is a test \stacking [one] {and a proof} of \stacking [two] 
> > {concept} indeed
> > \stacking [one] {\blackrule [width=4cm]} is it and the question is how 
> > \stacking
> > [two] {\scale [s=2] {fancy}} we can go
> > 
> > \startstacking[one]
> > \startformula
> >      \sqrt{1+x}
> > \stopformula
> > \stopstacking
> > 
> > and how useful \stacking[two]{\inframed{it}} is.
> > \stopbuffer
> > 
> > \startstackingsteps[one,two,{one,two}]
> >      \startTEXpage[offset=1ts]
> >          \getbuffer
> >      \stopTEXpage
> > \stopstackingsteps
> > 
> > \startTEXpage[offset=1ts] \setupstacking[criterium={one}]     \getbuffer 
> > \stopTEXpage
> > \startTEXpage[offset=1ts] \setupstacking[criterium={two}]     \getbuffer 
> > \stopTEXpage
> > \startTEXpage[offset=1ts] \setupstacking[criterium={one,two}] \getbuffer 
> > \stopTEXpage
> > 
> > \stoptext
> 
> Very nice, thank you!
> 
> I see some similarities to the "visible on" technique [1], I posted in a previous thread.
> What comes there really handy are range specifiers, what seems not possible with this interface.
> For example: "visible on=<2->" renders the content on every page except the first one
> or "visible on=<1-5,13-15>" on the first page up to the fifth page and from page 13 to 15.
> 
> The mechanism stems from the Beamer overlay specifications, see section 9.3 of the manual [2]
> and can be much more complicated with modes (section 9.6.2).
> 
> To add this to the new interface, if you want that, the stack layers above need some kind of order,
> which is implicit for numbers:
> ```
> \definestacking{one}
> \definestacking{two}
> \definestacking{three}
> \definestackingorder{one,two, three}
> ...
> \setupstacking[criterium={one-three}]
> ```
> The order could also be implicitly defined after the order of the \definestacking calls.
> 
> Or would it be possible to have numbers always automatically (additionally) available as stacking layer?
> So that this "just" works:
> ```
> \startbuffer
> This is a test \stacking [1] {and a proof} of \stacking [2] {concept} indeed.
> \stopbuffer
> ...
> \setupstacking[criterium={1-}]
> ```
> 
> I also wondered, if it is possible to define a lot of layers semiautomatically in Lua
> (in some graphics I needed around 20 layers). It seems that numbers in layer names currently are not allowed.
> Is code like this possible somehow?
> 
> ```
> \startluacode
> for i = 1, 20 do
>     context.definestacking(string.format("l\letterpercent.d", i))
> end
> \stopluacode
> ```
> 
> Gerion
> 
> 
> [1] https://github.com/luhsra/texmf/blob/main/tex/latex/beamertools/beamertools.sty
> [2] https://ctan.org/pkg/beamer
> 

I need to correct myself (I had a typo in my tests before). Numbers as stacking layer names are possible.
This Lua code works fine:

```
\startluacode
   for i = 1, 20 do
       context("\\definestacking[l\letterpercent.d]", i)
   end
\stopluacode
```

Gerion

[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

[-- Attachment #2: Type: text/plain, Size: 511 bytes --]

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

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

* [NTG-context] Re: weekend update
  2024-06-23 12:35 ` Gerion Entrup
  2024-06-23 12:43   ` Gerion Entrup
@ 2024-06-23 13:28   ` Hans Hagen via ntg-context
  2024-06-23 13:40     ` Alan Braslau via ntg-context
  2024-06-24 10:13     ` Gerion Entrup
  1 sibling, 2 replies; 10+ messages in thread
From: Hans Hagen via ntg-context @ 2024-06-23 13:28 UTC (permalink / raw)
  To: Gerion Entrup, mailing list for ConTeXt users; +Cc: Hans Hagen

On 6/23/2024 2:35 PM, Gerion Entrup wrote:
> Am Freitag, 21. Juni 2024, 19:00:03 MESZ schrieb Hans Hagen via ntg-context:
>> -- support for stacking at the tex end (maybe for presentations)
>>
>> \starttext
>>
>> \definestacking[one]
>> \definestacking[two]
>>
>> \startbuffer
>> This is a test \stacking [one] {and a proof} of \stacking [two]
>> {concept} indeed
>> \stacking [one] {\blackrule [width=4cm]} is it and the question is how
>> \stacking
>> [two] {\scale [s=2] {fancy}} we can go
>>
>> \startstacking[one]
>> \startformula
>>       \sqrt{1+x}
>> \stopformula
>> \stopstacking
>>
>> and how useful \stacking[two]{\inframed{it}} is.
>> \stopbuffer
>>
>> \startstackingsteps[one,two,{one,two}]
>>       \startTEXpage[offset=1ts]
>>           \getbuffer
>>       \stopTEXpage
>> \stopstackingsteps
>>
>> \startTEXpage[offset=1ts] \setupstacking[criterium={one}]     \getbuffer
>> \stopTEXpage
>> \startTEXpage[offset=1ts] \setupstacking[criterium={two}]     \getbuffer
>> \stopTEXpage
>> \startTEXpage[offset=1ts] \setupstacking[criterium={one,two}] \getbuffer
>> \stopTEXpage
>>
>> \stoptext
> 
> Very nice, thank you!
> 
> I see some similarities to the "visible on" technique [1], I posted in a previous thread.

You mean the horrible transparency hack there?

> What comes there really handy are range specifiers, what seems not possible with this interface.
> For example: "visible on=<2->" renders the content on every page except the first one
> or "visible on=<1-5,13-15>" on the first page up to the fifth page and from page 13 to 15.
> 
> The mechanism stems from the Beamer overlay specifications, see section 9.3 of the manual [2]
> and can be much more complicated with modes (section 9.6.2).

I don't know beamer other than seeing presentations at meetings but I 
assume that it has some accumulator. We do have steppers in mkii / mkiv 
already in the presentation styles. The conceptual cleanest of them 
depends on the viewer and free ones never catched up so that one is 
acrobat specific. The stacker discussed now is just similar to the 
metapost one but then at the tex end. (A quick hack with room for more a 
bit more effiency if ther ei sneed for it.)

> To add this to the new interface, if you want that, the stack layers above need some kind of order,
> which is implicit for numbers:
> ```
> \definestacking{one}
> \definestacking{two}
> \definestacking{three}
> \definestackingorder{one,two, three}
> ...
> \setupstacking[criterium={one-three}]
> ```
> The order could also be implicitly defined after the order of the \definestacking calls.
> 
> Or would it be possible to have numbers always automatically (additionally) available as stacking layer?
> So that this "just" works:
> ```
> \startbuffer
> This is a test \stacking [1] {and a proof} of \stacking [2] {concept} indeed.
> \stopbuffer
> ...
> \setupstacking[criterium={1-}]
> ```
> 
> I also wondered, if it is possible to define a lot of layers semiautomatically in Lua
> (in some graphics I needed around 20 layers). It seems that numbers in layer names currently are not allowed.
> Is code like this possible somehow?
> 
> ```
> \startluacode
> for i = 1, 20 do
>      context.definestacking(string.format("l\letterpercent.d", i))
> end
> \stopluacode
> ```

The next version already will have this:

%D For Aditya Mahajan: ranges and such.
%D
%D \starttyping
%D \starttext
%D \startstackingsteps[1,{1:2,201},{1:3,301},{1,2,4},{1-5},{1-6},{1-7}]
%D     \startTEXpage
%D         \startstacking[1]   \framed{ONE}    \stopstacking
%D         \startstacking[2]   \framed{TWO}    \stopstacking
%D         \startstacking[201] \framed{MORE}   \stopstacking
%D         \startstacking[3]   \framed{THREE}  \stopstacking
%D         \startstacking[301] \framed{INDEED} \stopstacking
%D         \startstacking[4]   \framed{FOUR}   \stopstacking
%D         \startstacking[5]   \framed{\im {\sqrt {
%D              \stacking[6] { 1 + x ^ {
%D              \stacking[7] { 2 } } } } }}
%D         \stopstacking
%D     \stopTEXpage
%D \stopstackingsteps
%D \stoptext
%D \stoptyping

The range interface is not different from the one we use in other places 
so it was a braindead patch. Numeric stacking id's don't need to be 
allocated. The example shows that it is rather general applicable 
although there are some border cases (that if needed we can intercept 
but I assume sane usage).

No upload yet unless there is a hurry.

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

* [NTG-context] Re: weekend update
  2024-06-23 13:28   ` Hans Hagen via ntg-context
@ 2024-06-23 13:40     ` Alan Braslau via ntg-context
  2024-06-23 14:13       ` Hans Hagen via ntg-context
  2024-06-24 10:13     ` Gerion Entrup
  1 sibling, 1 reply; 10+ messages in thread
From: Alan Braslau via ntg-context @ 2024-06-23 13:40 UTC (permalink / raw)
  To: Hans Hagen; +Cc: mailing list for ConTeXt users, Alan Braslau

On 23/06/24 23/06/24, 15:28, Hans Hagen via ntg-context wrote:
> I don't know beamer other than seeing presentations at meetings but I 
> assume that it has some accumulator.
Ah, "the cognitive style of power point" ...

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

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

* [NTG-context] Re: weekend update
  2024-06-23 13:40     ` Alan Braslau via ntg-context
@ 2024-06-23 14:13       ` Hans Hagen via ntg-context
  0 siblings, 0 replies; 10+ messages in thread
From: Hans Hagen via ntg-context @ 2024-06-23 14:13 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Hans Hagen

On 6/23/2024 3:40 PM, Alan Braslau wrote:
> On 23/06/24 23/06/24, 15:28, Hans Hagen via ntg-context wrote:
>> I don't know beamer other than seeing presentations at meetings but I 
>> assume that it has some accumulator.
> Ah, "the cognitive style of power point" ...
Often combined with a depressing page count for the audience (maybe 
impressive for the presenter) and an overall lack of stimulus for users 
to come up with something unique.

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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

* [NTG-context] Re: weekend update
  2024-06-23 13:28   ` Hans Hagen via ntg-context
  2024-06-23 13:40     ` Alan Braslau via ntg-context
@ 2024-06-24 10:13     ` Gerion Entrup
  1 sibling, 0 replies; 10+ messages in thread
From: Gerion Entrup @ 2024-06-24 10:13 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Hans Hagen


[-- Attachment #1.1: Type: text/plain, Size: 4825 bytes --]

Am Sonntag, 23. Juni 2024, 15:28:37 MESZ schrieb Hans Hagen:
> On 6/23/2024 2:35 PM, Gerion Entrup wrote:
> > Am Freitag, 21. Juni 2024, 19:00:03 MESZ schrieb Hans Hagen via ntg-context:
> >> -- support for stacking at the tex end (maybe for presentations)
> >>
> >> \starttext
> >>
> >> \definestacking[one]
> >> \definestacking[two]
> >>
> >> \startbuffer
> >> This is a test \stacking [one] {and a proof} of \stacking [two]
> >> {concept} indeed
> >> \stacking [one] {\blackrule [width=4cm]} is it and the question is how
> >> \stacking
> >> [two] {\scale [s=2] {fancy}} we can go
> >>
> >> \startstacking[one]
> >> \startformula
> >>       \sqrt{1+x}
> >> \stopformula
> >> \stopstacking
> >>
> >> and how useful \stacking[two]{\inframed{it}} is.
> >> \stopbuffer
> >>
> >> \startstackingsteps[one,two,{one,two}]
> >>       \startTEXpage[offset=1ts]
> >>           \getbuffer
> >>       \stopTEXpage
> >> \stopstackingsteps
> >>
> >> \startTEXpage[offset=1ts] \setupstacking[criterium={one}]     \getbuffer
> >> \stopTEXpage
> >> \startTEXpage[offset=1ts] \setupstacking[criterium={two}]     \getbuffer
> >> \stopTEXpage
> >> \startTEXpage[offset=1ts] \setupstacking[criterium={one,two}] \getbuffer
> >> \stopTEXpage
> >>
> >> \stoptext
> > 
> > Very nice, thank you!
> > 
> > I see some similarities to the "visible on" technique [1], I posted in a previous thread.
> 
> You mean the horrible transparency hack there?

Sure, exactly that :)

> > What comes there really handy are range specifiers, what seems not possible with this interface.
> > For example: "visible on=<2->" renders the content on every page except the first one
> > or "visible on=<1-5,13-15>" on the first page up to the fifth page and from page 13 to 15.
> > 
> > The mechanism stems from the Beamer overlay specifications, see section 9.3 of the manual [2]
> > and can be much more complicated with modes (section 9.6.2).
> 
> I don't know beamer other than seeing presentations at meetings but I 
> assume that it has some accumulator. We do have steppers in mkii / mkiv 
> already in the presentation styles. The conceptual cleanest of them 
> depends on the viewer and free ones never catched up so that one is 
> acrobat specific. The stacker discussed now is just similar to the 
> metapost one but then at the tex end. (A quick hack with room for more a 
> bit more effiency if ther ei sneed for it.)
> 
> > To add this to the new interface, if you want that, the stack layers above need some kind of order,
> > which is implicit for numbers:
> > ```
> > \definestacking{one}
> > \definestacking{two}
> > \definestacking{three}
> > \definestackingorder{one,two, three}
> > ...
> > \setupstacking[criterium={one-three}]
> > ```
> > The order could also be implicitly defined after the order of the \definestacking calls.
> > 
> > Or would it be possible to have numbers always automatically (additionally) available as stacking layer?
> > So that this "just" works:
> > ```
> > \startbuffer
> > This is a test \stacking [1] {and a proof} of \stacking [2] {concept} indeed.
> > \stopbuffer
> > ...
> > \setupstacking[criterium={1-}]
> > ```
> > 
> > I also wondered, if it is possible to define a lot of layers semiautomatically in Lua
> > (in some graphics I needed around 20 layers). It seems that numbers in layer names currently are not allowed.
> > Is code like this possible somehow?
> > 
> > ```
> > \startluacode
> > for i = 1, 20 do
> >      context.definestacking(string.format("l\letterpercent.d", i))
> > end
> > \stopluacode
> > ```
> 
> The next version already will have this:
> 
> %D For Aditya Mahajan: ranges and such.
> %D
> %D \starttyping
> %D \starttext
> %D \startstackingsteps[1,{1:2,201},{1:3,301},{1,2,4},{1-5},{1-6},{1-7}]
> %D     \startTEXpage
> %D         \startstacking[1]   \framed{ONE}    \stopstacking
> %D         \startstacking[2]   \framed{TWO}    \stopstacking
> %D         \startstacking[201] \framed{MORE}   \stopstacking
> %D         \startstacking[3]   \framed{THREE}  \stopstacking
> %D         \startstacking[301] \framed{INDEED} \stopstacking
> %D         \startstacking[4]   \framed{FOUR}   \stopstacking
> %D         \startstacking[5]   \framed{\im {\sqrt {
> %D              \stacking[6] { 1 + x ^ {
> %D              \stacking[7] { 2 } } } } }}
> %D         \stopstacking
> %D     \stopTEXpage
> %D \stopstackingsteps
> %D \stoptext
> %D \stoptyping
> 
> The range interface is not different from the one we use in other places 
> so it was a braindead patch. Numeric stacking id's don't need to be 
> allocated. The example shows that it is rather general applicable 
> although there are some border cases (that if needed we can intercept 
> but I assume sane usage).

Very nice, thanks again! This is also what I meant.


> 
> No upload yet unless there is a hurry.

No, no hurry.

Gerion


[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

[-- Attachment #2: Type: text/plain, Size: 511 bytes --]

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

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2024-06-24 10:16 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-21 17:00 [NTG-context] weekend update Hans Hagen via ntg-context
2024-06-21 17:29 ` [NTG-context] " Pablo Rodriguez via ntg-context
2024-06-22  0:47 ` Aditya Mahajan
2024-06-23 12:42   ` Gerion Entrup
2024-06-23 12:35 ` Gerion Entrup
2024-06-23 12:43   ` Gerion Entrup
2024-06-23 13:28   ` Hans Hagen via ntg-context
2024-06-23 13:40     ` Alan Braslau via ntg-context
2024-06-23 14:13       ` Hans Hagen via ntg-context
2024-06-24 10:13     ` Gerion Entrup

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).