ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Gerion Entrup <gerion.entrup@flump.de>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: [NTG-context] Re: weekend update
Date: Sun, 23 Jun 2024 14:35:13 +0200	[thread overview]
Message-ID: <6576932.YiXZdWvhHV@falbala> (raw)
In-Reply-To: <fae347b8-0504-49df-b4d5-0d2d78520682@freedom.nl>


[-- 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
___________________________________________________________________________________

  parent reply	other threads:[~2024-06-23 12:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-21 17:00 [NTG-context] " 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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6576932.YiXZdWvhHV@falbala \
    --to=gerion.entrup@flump.de \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).