ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] start/stopregister
@ 2024-04-25 13:44 Thomas A. Schmitz
  2024-04-25 14:13 ` [NTG-context] start/stopregister Henning Hraban Ramm
  0 siblings, 1 reply; 10+ messages in thread
From: Thomas A. Schmitz @ 2024-04-25 13:44 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi all,

has \startregister been superseded in luametatex or is it not yet 
implemented? I tried to read strc-reg.lmt but couldn't figure out what 
is going on. The following silly minimal test produces the expected 
result with mkiv but not in mkxl.

All best

Thomas

\setuppapersize [A6]

\starttext
	A\index{A} B\startregister [index] [B] {B}
	\dorecurse {10} {\input tufte}
	A\index{A} B\stopregister [index] [B]

\page

\placeregister[index]

\stoptext
___________________________________________________________________________________
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: start/stopregister
  2024-04-25 13:44 [NTG-context] start/stopregister Thomas A. Schmitz
@ 2024-04-25 14:13 ` Henning Hraban Ramm
  2024-04-25 14:45   ` Thomas A. Schmitz
  0 siblings, 1 reply; 10+ messages in thread
From: Henning Hraban Ramm @ 2024-04-25 14:13 UTC (permalink / raw)
  To: ntg-context

Am 25.04.24 um 15:44 schrieb Thomas A. Schmitz:
> Hi all,
> 
> has \startregister been superseded in luametatex or is it not yet 
> implemented? I tried to read strc-reg.lmt but couldn't figure out what 
> is going on. The following silly minimal test produces the expected 
> result with mkiv but not in mkxl.
> 
> All best
> 
> Thomas
> 
> \setuppapersize [A6]
> 
> \starttext
>      A\index{A} B\startregister [index] [B] {B}
>      \dorecurse {10} {\input tufte}
>      A\index{A} B\stopregister [index] [B]
> 
> \page
> 
> \placeregister[index]
> 
> \stoptext


I’m using it like

\startregister[index][bibliografie]{Bibliografie}
…
\stopregister[index][bibliografie]

i.e. very similar to your example, and can confirm it doesn’t result in 
a page range in the index. Also gives no error.

Hraban
___________________________________________________________________________________
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: start/stopregister
  2024-04-25 14:13 ` [NTG-context] start/stopregister Henning Hraban Ramm
@ 2024-04-25 14:45   ` Thomas A. Schmitz
  2024-04-25 14:51     ` Taco Hoekwater
  0 siblings, 1 reply; 10+ messages in thread
From: Thomas A. Schmitz @ 2024-04-25 14:45 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 4/25/24 16:13, Henning Hraban Ramm wrote:
> I’m using it like
> 
> \startregister[index][bibliografie]{Bibliografie}
> …
> \stopregister[index][bibliografie]
> 
> i.e. very similar to your example, and can confirm it doesn’t result in 
> a page range in the index. Also gives no error.

Since I've become an expert on tuc files since yesterday (ha!): if I 
compare the tuc from a mkiv and a mkxl run, I see that mkiv produces an 
entry ["lastrealpage"]=9 in the references table, mkxl doesn't. This 
appears to be the relevant bit, and it is connected with the replacement 
of realpageno by c_realpageno in line 638 of strc-reg.lmt

references.lastrealpage = texgetcount(c_realpageno)

But that's as far as I could get...

Thomas
___________________________________________________________________________________
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: start/stopregister
  2024-04-25 14:45   ` Thomas A. Schmitz
@ 2024-04-25 14:51     ` Taco Hoekwater
  2024-04-25 16:16       ` Hans Hagen
  0 siblings, 1 reply; 10+ messages in thread
From: Taco Hoekwater @ 2024-04-25 14:51 UTC (permalink / raw)
  To: mailing list for ConTeXt users



> On 25 Apr 2024, at 16:45, Thomas A. Schmitz <thomas.schmitz@uni-bonn.de> wrote:
> 
> On 4/25/24 16:13, Henning Hraban Ramm wrote:
>> I’m using it like
>> \startregister[index][bibliografie]{Bibliografie}
>> …
>> \stopregister[index][bibliografie]
>> i.e. very similar to your example, and can confirm it doesn’t result in a page range in the index. Also gives no error.
> 
> Since I've become an expert on tuc files since yesterday (ha!): if I compare the tuc from a mkiv and a mkxl run, I see that mkiv produces an entry ["lastrealpage"]=9 in the references table, mkxl doesn't. This appears to be the relevant bit, and it is connected with the replacement of realpageno by c_realpageno in line 638 of strc-reg.lmt
> 
> references.lastrealpage = texgetcount(c_realpageno)

Possibly related: I noticed last week that mkxl does not update the legacy counter \pageno any more for every page.

Best wishes,
Taco

— 
Taco Hoekwater              E: taco@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 / 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: start/stopregister
  2024-04-25 14:51     ` Taco Hoekwater
@ 2024-04-25 16:16       ` Hans Hagen
  2024-04-25 16:27         ` Thomas A. Schmitz
  0 siblings, 1 reply; 10+ messages in thread
From: Hans Hagen @ 2024-04-25 16:16 UTC (permalink / raw)
  To: ntg-context

On 4/25/2024 4:51 PM, Taco Hoekwater wrote:
> 
> 
>> On 25 Apr 2024, at 16:45, Thomas A. Schmitz <thomas.schmitz@uni-bonn.de> wrote:
>>
>> On 4/25/24 16:13, Henning Hraban Ramm wrote:
>>> I’m using it like
>>> \startregister[index][bibliografie]{Bibliografie}
>>> …
>>> \stopregister[index][bibliografie]
>>> i.e. very similar to your example, and can confirm it doesn’t result in a page range in the index. Also gives no error.
>>
>> Since I've become an expert on tuc files since yesterday (ha!): if I compare the tuc from a mkiv and a mkxl run, I see that mkiv produces an entry ["lastrealpage"]=9 in the references table, mkxl doesn't. This appears to be the relevant bit, and it is connected with the replacement of realpageno by c_realpageno in line 638 of strc-reg.lmt
>>
>> references.lastrealpage = texgetcount(c_realpageno)

Let's seen if we can make Thomas more of an expert as he's zooming in on 
the issue:

             extendregister {
                 metadata   = { name =  name },
                 references = { abel =  label },
             }

Let me know if you't see it.

> Possibly related: I noticed last week that mkxl does not update the legacy counter \pageno any more for every page.
i'll check 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 / 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: start/stopregister
  2024-04-25 16:16       ` Hans Hagen
@ 2024-04-25 16:27         ` Thomas A. Schmitz
  2024-04-26  7:30           ` Thomas A. Schmitz
  0 siblings, 1 reply; 10+ messages in thread
From: Thomas A. Schmitz @ 2024-04-25 16:27 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Hans Hagen

On 4/25/24 18:16, Hans Hagen wrote:
> Let's seen if we can make Thomas more of an expert as he's zooming in on 
> the issue:
> 
>              extendregister {
>                  metadata   = { name =  name },
>                  references = { abel =  label },
>              }
> 
> Let me know if you't see it.

Ah, simple typo! After fixing abel to label, startregister gives the 
expected results again! Thanks Hans! I may be back with more register 
questions soon...

Thomas
___________________________________________________________________________________
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: start/stopregister
  2024-04-25 16:27         ` Thomas A. Schmitz
@ 2024-04-26  7:30           ` Thomas A. Schmitz
  2024-04-26  7:54             ` Thomas A. Schmitz
  0 siblings, 1 reply; 10+ messages in thread
From: Thomas A. Schmitz @ 2024-04-26  7:30 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Hans Hagen

On 4/25/24 6:27 PM, Thomas A. Schmitz wrote:
> Ah, simple typo! After fixing abel to label, startregister gives the 
> expected results again! Thanks Hans! I may be back with more register 
> questions soon...

And here I am again! Both in mkiv and in mkxl, start/stopregister does 
not work when there is already an index entry before. Example below!

All best

Thomas

\setuppapersize [A6]

\starttext
     A\index{A} B \page
     A\startregister [index] {A} B\startregister [index] [B] {B}
     \dorecurse {10} {\input tufte}
     A\stopregister [index] {A} B\stopregister [index] [B]

\page

\placeregister[index]

\stoptext
___________________________________________________________________________________
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: start/stopregister
  2024-04-26  7:30           ` Thomas A. Schmitz
@ 2024-04-26  7:54             ` Thomas A. Schmitz
  2024-04-26  8:22               ` Hans Hagen
  0 siblings, 1 reply; 10+ messages in thread
From: Thomas A. Schmitz @ 2024-04-26  7:54 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Hans Hagen

On 4/26/24 9:30 AM, Thomas A. Schmitz wrote:
> And here I am again! Both in mkiv and in mkxl, start/stopregister does 
> not work when there is already an index entry before. Example below!
> 
> All best
> 
> Thomas
> 
> \setuppapersize [A6]
> 
> \starttext
>      A\index{A} B \page
>      A\startregister [index] {A} B\startregister [index] [B] {B}
>      \dorecurse {10} {\input tufte}
>      A\stopregister [index] {A} B\stopregister [index] [B]
> 
> \page
> 
> \placeregister[index]
> 
> \stoptext

And I'm not even sure if this is allowed to say anymore, but: works in 
mkii...

Thomas
___________________________________________________________________________________
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: start/stopregister
  2024-04-26  7:54             ` Thomas A. Schmitz
@ 2024-04-26  8:22               ` Hans Hagen
  2024-04-26  9:31                 ` Thomas A. Schmitz
  0 siblings, 1 reply; 10+ messages in thread
From: Hans Hagen @ 2024-04-26  8:22 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 4/26/2024 9:54 AM, Thomas A. Schmitz wrote:
> On 4/26/24 9:30 AM, Thomas A. Schmitz wrote:
>> And here I am again! Both in mkiv and in mkxl, start/stopregister does 
>> not work when there is already an index entry before. Example below!
>>
>> All best
>>
>> Thomas
>>
>> \setuppapersize [A6]
>>
>> \starttext
>>      A\index{A} B \page
>>      A\startregister [index] {A} B\startregister [index] [B] {B}
>>      \dorecurse {10} {\input tufte}
>>      A\stopregister [index] {A} B\stopregister [index] [B]
>>
>> \page
>>
>> \placeregister[index]
>>
>> \stoptext
> 
> And I'm not even sure if this is allowed to say anymore, but: works in 
> mkii...
That's because mkii is AI enhanced. Can you try this:

\setuppapersize [A6]

\starttext

     A\index{A} B \page

     <A
     \startregister [index] [A] {A}
         <B
         \startregister [index] [B] {B}

             \dorecurse {10} {\input tufte}

         A>
         \stopregister [index] [A]
     B>
     \stopregister [index] [B]

\page

\placeregister[index]

\stoptext

(Watch the [A] vs {A} usage where [A] is the label used for matching the 
potentially weiord nested start/stop ... maybe we need different aliases 
for these, like \fromregister and \toregister.)

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: start/stopregister
  2024-04-26  8:22               ` Hans Hagen
@ 2024-04-26  9:31                 ` Thomas A. Schmitz
  0 siblings, 0 replies; 10+ messages in thread
From: Thomas A. Schmitz @ 2024-04-26  9:31 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Hans Hagen

On 4/26/24 10:22 AM, Hans Hagen wrote:
>>
> That's because mkii is AI enhanced. Can you try this:

Ah, I see where I was wrong, thank you! I'm mapping from xml, so I 
became confused with the optional parameters that I write as attributes, 
with a number of ifs... But now it should be clear!

All best

Thomas
___________________________________________________________________________________
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-04-26  9:35 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-25 13:44 [NTG-context] start/stopregister Thomas A. Schmitz
2024-04-25 14:13 ` [NTG-context] start/stopregister Henning Hraban Ramm
2024-04-25 14:45   ` Thomas A. Schmitz
2024-04-25 14:51     ` Taco Hoekwater
2024-04-25 16:16       ` Hans Hagen
2024-04-25 16:27         ` Thomas A. Schmitz
2024-04-26  7:30           ` Thomas A. Schmitz
2024-04-26  7:54             ` Thomas A. Schmitz
2024-04-26  8:22               ` Hans Hagen
2024-04-26  9:31                 ` Thomas A. Schmitz

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