From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/95239 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: Product-component structure Date: Sat, 25 Jun 2016 08:25:38 +0200 Message-ID: <576E23E2.8010702@gmail.com> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8413134556006468147==" X-Trace: ger.gmane.org 1466836009 19219 80.91.229.3 (25 Jun 2016 06:26:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 25 Jun 2016 06:26:49 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sat Jun 25 08:26:37 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 1bGh36-0007w6-RI for gctc-ntg-context-518@m.gmane.org; Sat, 25 Jun 2016 08:26:36 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 4E6851010C; Sat, 25 Jun 2016 08:25:57 +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 AMptDGZgLYjk; Sat, 25 Jun 2016 08:25:55 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id 865EE1010E; Sat, 25 Jun 2016 08:25:55 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 559201010C for ; Sat, 25 Jun 2016 08:25:54 +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 AcNjcO9tBr3V for ; Sat, 25 Jun 2016 08:25:53 +0200 (CEST) Original-Received: from mail-wm0-f47.google.com (mail-wm0-f47.google.com [74.125.82.47]) (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 953901010B for ; Sat, 25 Jun 2016 08:25:43 +0200 (CEST) Original-Received: by mail-wm0-f47.google.com with SMTP id v199so43456704wmv.0 for ; Fri, 24 Jun 2016 23:25:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to; bh=VSAaqSH4YlyCsyd1rac9mirmgTcVc28W8/XCJwGnYcc=; b=FE+MDXFEevfUtDCca/xcK7mlVNI8kQGBxYW3J4kiSUInAGJOY6jG76VvTS+rQG/iOh pCFRA0QvNnYP/8yi4kSoW3TEySzfVUMWAmZKcQEPg6ICN0ObERYq4MwBDBOLOIs/5YqV sXkIDeXbJxFRH0Uq2p/LNr923Y8+LYe88aTaX+h5nzIXp5pQW+nBED+nBWiNjT5WFJkF de1EdpoDEwMsfUSUupgApJ1hfmxAO7TdmZFMDDZruKO3/jB+EW1Vptbg8w3131cj/ufi k3NmbNGMFVKlp3kCcjyHdNZZY+SudCoDKpm+S3oQ6sSsq+fYdXaXb9UCgNuf3T2FsS9j VADA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to; bh=VSAaqSH4YlyCsyd1rac9mirmgTcVc28W8/XCJwGnYcc=; b=VZRn5+v4q9VfdolOJnZlk+/SrzxpDruaUUS4+aFoNqcdWbByONlqZ7yZ6Z3kiQFdm+ rbkYQSancT/Lk0wr6+qyr3AJq+GAjDWL9+q7Xq+zUH+F2nlw7FBlPhJW8TgqkiJqj2HM ZHcQetLSPgjtmIQ7kzCEUVnx/XQ7ZRI0RT8IDaHH8W9yI9Qx6Cq8NggGYRoyv8u0/ZMn hgB7BM2WQzEVCxjkRXbTvadVvbqzwG7BnxFvR28BEv8PGiftcy0RPkGAIoEIwTVTJYYD WNtjZQ2Mc7PSFdXRGQUQfdELbHEKqaHMXV+nPsUBxvV2SvdM91utXB+idR/FGK7m0YRx G2ag== X-Gm-Message-State: ALyK8tJkUH395eU/f/tPiDofYv2N8doWdx6v+K6W/nHaMk4qjF09+dkoTBf5HYfR74PLpQ== X-Received: by 10.28.48.15 with SMTP id w15mr1534078wmw.28.1466835943255; Fri, 24 Jun 2016 23:25:43 -0700 (PDT) Original-Received: from keima.localdomain (x2f2b0f2.dyn.telefonica.de. [2.242.176.242]) by smtp.gmail.com with ESMTPSA id u4sm8477517wjz.4.2016.06.24.23.25.41 for (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 24 Jun 2016 23:25:42 -0700 (PDT) User-Agent: Postbox 4.0.8 (Macintosh/20151105) In-Reply-To: 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:95239 Archived-At: This is a multi-part message in MIME format. --===============8413134556006468147== Content-Type: multipart/alternative; boundary="------------010805010405090501090108" This is a multi-part message in MIME format. --------------010805010405090501090108 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable > Aditya Mahajan > 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 =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 }, > } > } > > 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. Wolfgang --------------010805010405090501090108 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
24= .=20 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 =3D utilities.storage.allocate {
=C2=A0=C2=A0=C2=A0 ...
=C2=A0=C2=A0=C2=A0 [v_product] =3D {
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 [v_text]=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 =3D { "many", processfilemany },
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 [v_project]=C2=A0=C2=A0=C2= =A0=C2=A0 =3D { "once", processfileonce },
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 [v_environment] =3D { "onc= e", processfileonce },
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 [v_product]=C2=A0=C2=A0=C2= =A0=C2=A0 =3D { "many", processfilemany },
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 [v_component]=C2=A0=C2=A0 = =3D { "many", processfilemany },
=C2=A0=C2=A0=C2=A0 },
=C2=A0=C2=A0=C2=A0 [v_component] =3D {
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 [v_text]=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 =3D { "many", processfilemany },
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 [v_project]=C2=A0=C2=A0=C2= =A0=C2=A0 =3D { "once", processfileonce },
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 [v_environment] =3D { "onc= e", processfileonce },
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 [v_product]=C2=A0=C2=A0=C2= =A0=C2=A0 =3D { "none", processfilenone },
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 [v_component]=C2=A0=C2=A0 = =3D { "many", processfilemany },
=C2=A0=C2=A0=C2=A0 }
}

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.

Wolfgang
--------------010805010405090501090108-- --===============8413134556006468147== 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= --===============8413134556006468147==--