ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] utiliydata
@ 2024-04-24 15:41 Thomas A. Schmitz
  2024-04-24 15:59 ` [NTG-context] utiliydata Hans Hagen
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas A. Schmitz @ 2024-04-24 15:41 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi all,

I’m slightly embarrassed because this should be easy, but I can’t figure out how to do this: in the tuc/tua file, I have the complete references of my document. How can I access it from within my Lua code? For instance, something like 

utilitydata.structures.references.collected.”MyReference”.references.realpage

How can this be accessed?

Thanks a lot and best wishes

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] 5+ messages in thread

* [NTG-context] Re: utiliydata
  2024-04-24 15:41 [NTG-context] utiliydata Thomas A. Schmitz
@ 2024-04-24 15:59 ` Hans Hagen
  2024-04-25  6:54   ` Thomas A. Schmitz
  0 siblings, 1 reply; 5+ messages in thread
From: Hans Hagen @ 2024-04-24 15:59 UTC (permalink / raw)
  To: ntg-context

On 4/24/2024 5:41 PM, Thomas A. Schmitz wrote:
> Hi all,
> 
> I’m slightly embarrassed because this should be easy, but I can’t figure out how to do this: in the tuc/tua file, I have the complete references of my document. How can I access it from within my Lua code? For instance, something like
> 
> utilitydata.structures.references.collected.”MyReference”.references.realpage
> 
> How can this be accessed?
grep for "job." (i bet you can figure it out and compensate the 
embaressment that way)

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] 5+ messages in thread

* [NTG-context] Re: utiliydata
  2024-04-24 15:59 ` [NTG-context] utiliydata Hans Hagen
@ 2024-04-25  6:54   ` Thomas A. Schmitz
  2024-04-25  7:25     ` Thomas A. Schmitz
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas A. Schmitz @ 2024-04-25  6:54 UTC (permalink / raw)
  To: mailing list for ConTeXt users


> On 24. Apr 2024, at 17:59, Hans Hagen <j.hagen@xs4all.nl> wrote:
> 
> grep for "job." (i bet you can figure it out and compensate the embaressment that way)
> 
> Hans

Nope, very sorry, can’t figure it out… I see job.register, I see I can access structures.refrences.collected, but what about the next level

utilitydata.structures.references.collected={
 [""]={
  [“REF"]={

What does the empty key do? And how do I retrieve the value of

REF.references.realpage?

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] 5+ messages in thread

* [NTG-context] Re: utiliydata
  2024-04-25  6:54   ` Thomas A. Schmitz
@ 2024-04-25  7:25     ` Thomas A. Schmitz
  2024-04-25  9:12       ` Hans Hagen
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas A. Schmitz @ 2024-04-25  7:25 UTC (permalink / raw)
  To: mailing list for ConTeXt users


> 
> Nope, very sorry, can’t figure it out… I see job.register, I see I can access structures.refrences.collected, but what about the next level
> 
> utilitydata.structures.references.collected={
> [""]={
>  [“REF"]={
> 
> What does the empty key do? And how do I retrieve the value of
> 
> REF.references.realpage?
> 
> Thomas

Sigh, as always: just when I had hit “send,” I figured it out:

structures.references.collected[""][REF].references.realpage

But I’m not sure if there is an easier/better way. And I still would like to know what the empty string as key does.

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] 5+ messages in thread

* [NTG-context] Re: utiliydata
  2024-04-25  7:25     ` Thomas A. Schmitz
@ 2024-04-25  9:12       ` Hans Hagen
  0 siblings, 0 replies; 5+ messages in thread
From: Hans Hagen @ 2024-04-25  9:12 UTC (permalink / raw)
  To: Thomas A. Schmitz, mailing list for ConTeXt users

On 4/25/2024 9:25 AM, Thomas A. Schmitz wrote:
> 
>>
>> Nope, very sorry, can’t figure it out… I see job.register, I see I can access structures.refrences.collected, but what about the next level
>>
>> utilitydata.structures.references.collected={
>> [""]={
>>   [“REF"]={
>>
>> What does the empty key do? And how do I retrieve the value of
>>
>> REF.references.realpage?
>>
>> Thomas
> 
> Sigh, as always: just when I had hit “send,” I figured it out:
> 
> structures.references.collected[""][REF].references.realpage
> 
> But I’m not sure if there is an easier/better way. And I still would like to know what the empty string as key does.
it's the prefix (namespace) which here is empty (easier to use "" as key 
than have some exception)

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] 5+ messages in thread

end of thread, other threads:[~2024-04-25  9:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-24 15:41 [NTG-context] utiliydata Thomas A. Schmitz
2024-04-24 15:59 ` [NTG-context] utiliydata Hans Hagen
2024-04-25  6:54   ` Thomas A. Schmitz
2024-04-25  7:25     ` Thomas A. Schmitz
2024-04-25  9:12       ` Hans Hagen

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