From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/81810 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: Using Product-component Date: Tue, 16 Apr 2013 18:52:25 +0200 Message-ID: <516D81C9.30200@wxs.nl> References: <2D100C28-1E9E-4D5E-A303-2FB607590717@gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252"; Format="flowed" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1366131158 31326 80.91.229.3 (16 Apr 2013 16:52:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 16 Apr 2013 16:52:38 +0000 (UTC) Cc: Aditya Mahajan To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Apr 16 18:52:41 2013 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1US97Y-00030Q-BD for gctc-ntg-context-518@m.gmane.org; Tue, 16 Apr 2013 18:52:40 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id B741010250; Tue, 16 Apr 2013 18:52:39 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id y4LnpkhtAXCb; Tue, 16 Apr 2013 18:52:34 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 1F9FC1022E; Tue, 16 Apr 2013 18:52:34 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 9013D1022E for ; Tue, 16 Apr 2013 18:52:32 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id PUylvMgTuT-a for ; Tue, 16 Apr 2013 18:52:31 +0200 (CEST) Original-Received: from filter2-til.mf.surf.net (filter2-til.mf.surf.net [194.171.167.218]) by balder.ntg.nl (Postfix) with ESMTP id 61AFE10210 for ; Tue, 16 Apr 2013 18:52:31 +0200 (CEST) Original-Received: from smtp.ziggozakelijk.nl (D57D1DA2.static.ziggozakelijk.nl [213.125.29.162]) by filter2-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r3GGqUY8012588 for ; Tue, 16 Apr 2013 18:52:30 +0200 X-Default-Received-SPF: pass (skip=loggedin (res=PASS)) x-ip-name=10.100.1.100; Original-Received: from [10.100.1.100] (unverified [10.100.1.100]) by pragma-net.nl (SurgeMail 6.1c) with ESMTP (TLS) id 16463-1713362 for multiple; Tue, 16 Apr 2013 18:52:22 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.2; rv:17.0) Gecko/20130328 Thunderbird/17.0.5 In-Reply-To: X-Authenticated-User: hagen@controller-9 X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=213.125.29.162; country=NL; region=15; city=Zwolle; latitude=52.5058; longitude=6.0858; http://maps.google.com/maps?q=52.5058,6.0858&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0TJoEQuB6 - 3d472b677642 - 20130416 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.218 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 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-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:81810 Archived-At: On 4/16/2013 5:25 PM, Aditya Mahajan wrote: > On Tue, 16 Apr 2013, Wolfgang Schuster wrote: > >> >> Am 16.04.2013 um 09:32 schrieb Aditya Mahajan : >> >>> Has something changed recently on how product-component structure is >>> supposed to >>> be used? I have three files: >>> >>> 1. prd.tex >>> >>> \environment env >>> >>> \startproduct prd >>> >>> \component cmp >>> >>> \stopproduct >>> >>> 2. env.tex >>> >>> >>> \startenvironment env >>> >>> \define\testing{This is a test} >>> >>> \stopenvironment >>> >>> 3. cmp.tex >>> >>> >>> \product prd >>> >>> \startcomponent cmp >>> >>> Testing \testing >>> >>> \stopcomponent >>> >>> When I compile cmp.tex, I get: >>> >>> %--------------------------%<----------------------------- >>> [=85] >>> mtx-context | fatal error: return code: 1% >>> %--------------------------%<----------------------------- >>> >>> Shouldn't the product file not load the component file (or anything >>> else inside >>> \startproduct .. \stopproduct) when compiling a component? >> >> The product file loads the component but this isn=92t what you=92re doin= g. >> >> You process the component which doesn=92t load product file because this >> would end in a loop >> because the product would then again load the component etc. >> >> Add =93\environment env=94 at the begin of your component file and the >> problem disappears. >> Since environment files are loaded only once it doesn=92t matter when >> the line is in each >> component file. > > I thought that the whole point of adding `\product ...` in a component > file was so that I do not have to add all the `\environment ...` in the > component file. > > Actually, if I change the product -> component then everything works as > expected, so perhaps I did not remember correctly how the > project-product-component hierarchy is to be used. I thought that the > project part was optional, but it seems that one must include a project > as well (if you want not to add all the environments in the component fil= e) see core-job.lua ... around line 435 ... there we define what gets done = once, many times, never Hans -- = ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl ----------------------------------------------------------------- ___________________________________________________________________________= ________ If your question is of interest to others as well, please add an entry to t= he Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-cont= ext webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________