From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/95240 Path: news.gmane.org!not-for-mail From: Aditya Mahajan Newsgroups: gmane.comp.tex.context Subject: Re: Product-component structure Date: Sat, 25 Jun 2016 04:42:45 -0400 (EDT) Message-ID: References: <576E23E2.8010702@gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-1831167284-1466844166=:21232" X-Trace: ger.gmane.org 1466844216 32380 80.91.229.3 (25 Jun 2016 08:43:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 25 Jun 2016 08:43:36 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sat Jun 25 10:43:23 2016 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bGjBR-0004lp-Vt for gctc-ntg-context-518@m.gmane.org; Sat, 25 Jun 2016 10:43:22 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id A798AFF6B; Sat, 25 Jun 2016 10:43:03 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id sZNF3MyKOQdD; Sat, 25 Jun 2016 10:43:01 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id BC9FFFFA1; Sat, 25 Jun 2016 10:43:01 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 245E9FF9A for ; Sat, 25 Jun 2016 10:43:01 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UXjRK2A1Zreo for ; Sat, 25 Jun 2016 10:42:59 +0200 (CEST) Original-Received: from hellskitchen.mr.itd.umich.edu (smtp.mail.umich.edu [141.211.14.82]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 12BD2FF6B for ; Sat, 25 Jun 2016 10:42:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=umich.edu; s=relay-2016-05-12; t=1466844166; bh=wU7CqmHYqXMkJLIVIvUNuovMySteIId/xntWZTMjBug=; h=Date:From:To:Subject:In-Reply-To:References; b=Yanfu93DGmHyCUvAqJOpuOoQb3r0vBSPb1+/juNntcUaIbHshEEJr2EKCR4JVj8ux ZkDRSSSi/td9KhrUvu8lV+NMmzrbaOl/odqMp44DyFk0YpcCVOsDRlgfky6jOW3YcQ eePX1Qso4+sWKvHFjLjJ4Ilf8ibx1qsS0S1SLSZCgoiLASIEl6MCR36oiiLjgJmBSf Ihwi17I7NnBshPAm7kdaJLIXrB+X9taJnxMjrGsRO55STHpMwcG2X4SjC3mlOse7Ek +yeQ79qW3SNOrFcvIStUipjHw6OGkiJx3LMJb4Q95+9mFrKP97/rKhG4G83VSjhL7H CB2zuziD+b53Q== Authentication-Results: hellskitchen.mr.itd.umich.edu; iprev=permerror policy.iprev=135.0.221.172 (unknown); auth=pass smtp.auth=adityam Original-Received: FROM [192.168.0.14] (unknown [135.0.221.172]) By hellskitchen.mr.itd.umich.edu ID 576E4406.5A4B6.24124; Authuser adityam; Sat, 25 Jun 2016 04:42:46 -0400 In-Reply-To: <576E23E2.8010702@gmail.com> User-Agent: Alpine 2.02 (OSX 1266 2009-07-14) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.org gmane.comp.tex.context:95240 Archived-At: This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-1831167284-1466844166=:21232 Content-Type: TEXT/PLAIN; charset=UTF-8; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Sat, 25 Jun 2016, Wolfgang Schuster wrote: >> Aditya Mahajan >> 24. Juni 2016 um 21:19 >> Hi, >>=20 >> This is based on a question on tex.sx: >> http://tex.stackexchange.com/q/316504/323 >>=20 >> In file-job.lua, we have: >>=20 >> local processors =3D utilities.storage.allocate { >> ... >> [v_product] =3D { >> [v_text] =3D { "many", processfilemany }, >> [v_project] =3D { "once", processfileonce }, >> [v_environment] =3D { "once", processfileonce }, >> [v_product] =3D { "many", processfilemany }, >> [v_component] =3D { "many", processfilemany }, >> }, >> [v_component] =3D { >> [v_text] =3D { "many", processfilemany }, >> [v_project] =3D { "once", processfileonce }, >> [v_environment] =3D { "once", processfileonce }, >> [v_product] =3D { "none", processfilenone }, >> [v_component] =3D { "many", processfilemany }, >> } >> } >>=20 >> Then, why is the product file processed multiple times? > The rules for a component files are applied *after* \startcomponent > which isn=E2=80=99t 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 =E2=80=A6 after \startcomponent prevents the loop but > the environment won=E2=80=99t be loaded anymore because the product > file isn=E2=80=99t loaded anymore. So, what's the recommended alternative? One could move the \environment to= =20 the components, but that can lead to a lot of repetitions (if there are=20 many environments). Aditya --0-1831167284-1466844166=:21232 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly90ZXguYWFuaGV0Lm5ldAphcmNoaXZlICA6IGh0dHA6Ly9mb3VuZHJ5LnN1cGVsZWMu ZnIvcHJvamVjdHMvY29udGV4dHJldi8Kd2lraSAgICAgOiBodHRwOi8vY29udGV4dGdhcmRlbi5u ZXQKX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX18= --0-1831167284-1466844166=:21232--