From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/84043 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: How to redefine \section temporaly? Date: Sat, 31 Aug 2013 23:55:31 +0200 Message-ID: <52226653.5080201@wxs.nl> References: <3738642.m1qO42jPmq@nereid> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1377986149 24275 80.91.229.3 (31 Aug 2013 21:55:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 31 Aug 2013 21:55:49 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Sat Aug 31 23:55:54 2013 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([5.39.185.229]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VFt97-0005kj-Ae for gctc-ntg-context-518@m.gmane.org; Sat, 31 Aug 2013 23:55:53 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id BAB1710204; Sat, 31 Aug 2013 23:54:26 +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 TYa2Nwh9eEC8; Sat, 31 Aug 2013 23:54:25 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 1A69410200; Sat, 31 Aug 2013 23:54:25 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 2923E10200 for ; Sat, 31 Aug 2013 23:54:23 +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 N4FFDtb1t7dg for ; Sat, 31 Aug 2013 23:54:13 +0200 (CEST) Original-Received: from filter1-ams.mf.surf.net (filter1-ams.mf.surf.net [192.87.102.69]) by balder.ntg.nl (Postfix) with ESMTP id 5E658101F9 for ; Sat, 31 Aug 2013 23:54:13 +0200 (CEST) Original-Received: from smtp.ziggozakelijk.nl (D57D1DA2.static.ziggozakelijk.nl [213.125.29.162]) by filter1-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r7VLtcdU001855 for ; Sat, 31 Aug 2013 23:55:38 +0200 X-Default-Received-SPF: pass (skip=loggedin (res=PASS)) x-ip-name=10.100.1.104; Original-Received: from [10.100.1.104] (unverified [10.100.1.104]) by pragma-net.nl (SurgeMail 6.3c2) with ESMTP id 3620-1713362 for ; Sat, 31 Aug 2013 23:55:37 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 In-Reply-To: <3738642.m1qO42jPmq@nereid> 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: 0NKjxTCVh - 6d3e3173234d - 20130831 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.69 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:84043 Archived-At: On 8/31/2013 11:10 PM, Romain Diss wrote: > Hi all, > > I wrote some articles with context and they contain (of course) sections. Now > I have to include all these articles in a book but each article should become > a section of the book. So I wonder if there is a way to convert the \section > command of the article files into \subsection in the book. > > Minimal not working (but supposed to explain my problem) example: > > %%% article.tex > \startsection[title=A first point] > .... \stopsection > \startsection[title=A second point] > .... \stopsection > > %%% book.tex > % command to make the \section of the input articles become \subsection > % commands > \startsection[title=My first article] > \input article > \stopsection > > %%% end > > > I know I can change the \section commands of the article.tex into > \ArticleSection and switch with > \definehead[ArticleSection][section] > \definehead[ArticleSection][subsection] > depending of the context, but it would be better (for me) to not modify the > article.tex files. > > Any ideas? you can use \startwhatever when you do: \definehead[whatever][section] or \definehead[whatever][subsection] or alternatively look into levels-001.tex and levels-002.tex in the test suite to see how to use relative sectioning ----------------------------------------------------------------- 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 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 ___________________________________________________________________________________