[NTG-context] Writing to .tuc directly from Lua

Jairo A. del Rio jairoadelrio6 at gmail.com
Wed Mar 24 05:20:43 CET 2021


Thank you very much. It's useful, indeed. However, what I need is to bypass
TeX (Lua > .tuc) if possible, since all the data I need to handle is
generated with Lua scripts.

Jairo

El mar, 23 de mar. de 2021 a la(s) 23:12, Aditya Mahajan (adityam at umich.edu)
escribió:

> On Tue, 23 Mar 2021, Jairo A. del Rio wrote:
>
> > 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?
>
> Does this help:
>
>
> https://wiki.contextgarden.net/System_Macros/Key_Value_Assignments#Multi-pass_data
>
> Aditya
>
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context at 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
>
> ___________________________________________________________________________________
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20210323/7a2f6af0/attachment.htm>


More information about the ntg-context mailing list