From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/60809 Path: news.gmane.org!not-for-mail From: Elias Oltmanns Newsgroups: gmane.comp.tex.context Subject: How to use local setups in selected components of a project only Date: Mon, 09 Aug 2010 09:34:28 +0200 Message-ID: <8762zkdyt7.fsf@denkblock.local> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1281339282 30366 80.91.229.12 (9 Aug 2010 07:34:42 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 9 Aug 2010 07:34:42 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Aug 09 09:34:40 2010 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OiMsa-0001ya-Mo for gctc-ntg-context-518@m.gmane.org; Mon, 09 Aug 2010 09:34:40 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 253ECCA13D; Mon, 9 Aug 2010 09:34:40 +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 p-7sSriAmE1i; Mon, 9 Aug 2010 09:34:37 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 5A1FBCA0FD; Mon, 9 Aug 2010 09:34:37 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 6364DCA0FD for ; Mon, 9 Aug 2010 09:34:36 +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 00GkUdkp3hZ1 for ; Mon, 9 Aug 2010 09:34:34 +0200 (CEST) Original-Received: from nebensachen.de (nebensachen.de [78.46.130.30]) by balder.ntg.nl (Postfix) with ESMTP id 1DC0BC9F1E for ; Mon, 9 Aug 2010 09:34:34 +0200 (CEST) Original-Received: from upstream.obscured ([192.168.0.1]) by mail.nebensachen.de (Postfix) with ESMTPSA id CF36F20DA24E for ; Mon, 9 Aug 2010 09:34:33 +0200 (CEST) X-Hashcash: 1:20:100809:ntg-context@ntg.nl::BvjRdBVOYi16Bl07:00000000000000000000000000000000000000000004Nbg Mail-Copies-To: nobody Mail-Followup-To: mailing list for ConTeXt users User-Agent: Gnus/5.13 (Gnus v5.13) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:60809 Archived-At: Hi all, it has been suggested on this list before, that people should use modes instead of \localenvironment and friends. Unfortunately, I don't seem to get either of them working as expected. Consider the following example: % project.tex \startproject project \environment environ \component compa \component compb \stopproject % environ.tex \startenvironment environ % global setups % ... \startmode[compa] \setuphead[section][number=no] \stopmode \stopenvironment % localenv.tex \startlocalenvironment [compa] \setuphead[section][number=no] \stoplocalenvironment % compa.tex \startcomponent compa %\enablemode[compa] \project project \localenvironment localenv \section{First section} Some text %\disablemode[compa] \stopcomponent % compb.tex \startcomponent compb \project project \section{Second section} More text \stopcomponent Compiling project.tex results in both sections being unnumbered. Compiling just compb.tex yields the expected result. Apparently, the setups of localenv stay in effect for all components processed subsequently. Commenting out \localenvironment and uncommenting \enablemode / \disablemode in compa.tex, however, does not solve the problem either: When I compile just compa.tex, everything works as expected. Compiling preject.tex, however, results in all sections being numbered. Obviously, the call to \enablemode comes too late. What is the recommended approach to such a problem? Do I have to undo local setups manually at the end of a component? Thanks in advance for any advice, Elias ___________________________________________________________________________________ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________