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>,
	Hans Hagen <j.hagen@freedom.nl>
Subject: [NTG-context] Re: weekend update
Date: Mon, 24 Jun 2024 12:13:50 +0200	[thread overview]
Message-ID: <16611382.O9o76ZdvQC@falbala> (raw)
In-Reply-To: <6a96ed47-48ef-42d0-a959-47a313f802b0@freedom.nl>


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

      parent reply	other threads:[~2024-06-24 10:16 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
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 message]

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=16611382.O9o76ZdvQC@falbala \
    --to=gerion.entrup@flump.de \
    --cc=j.hagen@freedom.nl \
    --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).