ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Writing to .tuc directly from Lua
@ 2021-03-24  3:28 Jairo A. del Rio
  2021-03-24  4:12 ` Aditya Mahajan
  0 siblings, 1 reply; 8+ messages in thread
From: Jairo A. del Rio @ 2021-03-24  3:28 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

Hi, list. I read about this:

https://www.mail-archive.com/ntg-context@ntg.nl/msg60217.html

But I want to know how to pass data to the .tuc file directly from Lua. I
think about some complex strings are calculations which are done in each
pass and slow down the whole compilation process. Something like:

local function factorial(n)
if in_tuc then -- whatever in_tuc means
   return factorials[n]
else
   ...
   factorials[n] = ...
   return ...
end
end

Is that feasible? Should I use the CLD versions of the TeX macros instead?

Best regards,

Jairo

[-- Attachment #1.2: Type: text/html, Size: 893 bytes --]

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

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2021-03-24 23:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-24  3:28 Writing to .tuc directly from Lua Jairo A. del Rio
2021-03-24  4:12 ` Aditya Mahajan
2021-03-24  4:20   ` Jairo A. del Rio
2021-03-24  6:38     ` Hans Hagen
2021-03-24 17:33       ` Jairo A. del Rio
     [not found]         ` <nycvar.YAK.7.78.908.2103241631460.1372067@nqv-guvaxcnq>
2021-03-24 21:00           ` Jairo A. del Rio
2021-03-24 21:47         ` Hans Hagen
2021-03-24 23:00           ` Jairo A. del Rio

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