[NTG-context] Product-component structure

Wolfgang Schuster schuster.wolfgang at gmail.com
Sat Jun 25 08:25:38 CEST 2016


> Aditya Mahajan <mailto:adityam at umich.edu>
> 24. Juni 2016 um 21:19
> Hi,
>
> This is based on a question on tex.sx:
> http://tex.stackexchange.com/q/316504/323
>
> In file-job.lua, we have:
>
> local processors = utilities.storage.allocate {
>     ...
>     [v_product] = {
>         [v_text]        = { "many", processfilemany },
>         [v_project]     = { "once", processfileonce },
>         [v_environment] = { "once", processfileonce },
>         [v_product]     = { "many", processfilemany },
>         [v_component]   = { "many", processfilemany },
>     },
>     [v_component] = {
>         [v_text]        = { "many", processfilemany },
>         [v_project]     = { "once", processfileonce },
>         [v_environment] = { "once", processfileonce },
>         [v_product]     = { "none", processfilenone },
>         [v_component]   = { "many", processfilemany },
>     }
> }
>
> Then, why is the product file processed multiple times?
The rules for a component files are applied *after* \startcomponent
which isn’t the case for the example where in the first iteration
the "text" rules are applied and in the following iteration the rules
for a product file.

Moving \product … after \startcomponent prevents the loop but
the environment won’t be loaded anymore because the product
file isn’t loaded anymore.

Wolfgang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20160625/fd6a5a17/attachment.html>


More information about the ntg-context mailing list