ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Jairo A. del Rio" <jairoadelrio6@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>,
	Aditya Mahajan <adityam@umich.edu>
Subject: Re: Writing to .tuc directly from Lua
Date: Tue, 23 Mar 2021 23:20:43 -0500	[thread overview]
Message-ID: <CAKyqqaY-W=f-PPT4M-258kDsPP=FptsFVF+XhtorrdJ0HwFJyQ@mail.gmail.com> (raw)
In-Reply-To: <nycvar.YAK.7.78.908.2103240009120.1372067@nqv-guvaxcnq>


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

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

[-- Attachment #1.2: Type: text/html, Size: 2735 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
___________________________________________________________________________________

  reply	other threads:[~2021-03-24  4:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-24  3:28 Jairo A. del Rio
2021-03-24  4:12 ` Aditya Mahajan
2021-03-24  4:20   ` Jairo A. del Rio [this message]
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

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='CAKyqqaY-W=f-PPT4M-258kDsPP=FptsFVF+XhtorrdJ0HwFJyQ@mail.gmail.com' \
    --to=jairoadelrio6@gmail.com \
    --cc=adityam@umich.edu \
    --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).