From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/84069 Path: news.gmane.org!not-for-mail From: john Culleton Newsgroups: gmane.comp.tex.context Subject: Re: How to redefine \section temporaly? Date: Sun, 1 Sep 2013 13:02:42 -0400 Organization: WexfordPress Message-ID: <20130901130242.295656fc@localb.wexfordpress.net> 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" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1378194128 27696 80.91.229.3 (3 Sep 2013 07:42:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 3 Sep 2013 07:42:08 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Tue Sep 03 09:42:13 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 1VGlFc-00056W-L3 for gctc-ntg-context-518@m.gmane.org; Tue, 03 Sep 2013 09:42:12 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 5EC4310229; Tue, 3 Sep 2013 09:40:42 +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 udQY1Zt2r1uH; Tue, 3 Sep 2013 09:40:36 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 1C5401020B; Tue, 3 Sep 2013 09:40:34 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id C9F24101E4 for ; Mon, 2 Sep 2013 14:39:50 +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 87IaScKOlt0b for ; Mon, 2 Sep 2013 14:39:48 +0200 (CEST) Original-Received: from submission1-til.mf.surf.net (submission1-til.mf.surf.net [194.171.167.212]) by balder.ntg.nl (Postfix) with ESMTP id 4EB821020D for ; Mon, 2 Sep 2013 14:39:29 +0200 (CEST) Original-Received: from filter3-til.mf.surf.net (filter3-til-v6.mf.surf.net [IPv6:2001:610:1:40aa:194:171:167:219]) by submission1-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r81H0aRN025381 for ; Sun, 1 Sep 2013 19:00:36 +0200 Original-Received: from qmta15.emeryville.ca.mail.comcast.net (qmta15.emeryville.ca.mail.comcast.net [IPv6:2001:558:fe2d:44:76:96:27:228]) by filter3-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r81H4ehY013496 for ; Sun, 1 Sep 2013 19:04:41 +0200 Original-Received: from omta23.emeryville.ca.mail.comcast.net ([76.96.30.90]) by qmta15.emeryville.ca.mail.comcast.net with comcast id Ksy21m0051wfjNsAFt45HB; Sun, 01 Sep 2013 17:04:05 +0000 Original-Received: from localb.wexfordpress.net ([68.50.233.152]) by omta23.emeryville.ca.mail.comcast.net with comcast id Kt441m0063HwwZ88jt44aC; Sun, 01 Sep 2013 17:04:05 +0000 In-Reply-To: <3738642.m1qO42jPmq@nereid> X-Mailer: Claws Mail 3.9.0 (GTK+ 2.24.10; x86_64-unknown-linux-gnu) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20121106; t=1378055045; bh=YW1OQ3AmFIjU28X1Y4IduhCeTst7+kEIUA32RJDwi6Q=; h=Received:Received:Date:From:To:Subject:Message-ID:Mime-Version: Content-Type; b=DBmRTT1BKT8/JxpU2y1Y10agsx02Zq+vYoae55O6VxzVDJLAG6p3f1OC4XVZqyybS ccoglMPbcOLUl6njXDA9ojZigHMHyIh0oZw4EkkCzVtmjrBd2Yb+3HMGm6ubtrF8by FhOs00sm+QhpccElaid0YsW3VrR1nrIgEWJao0f/kw69S6PUmUUxhRORLZC3SYErb1 hQ+qmo7AAkbeaezxM06NOGOClfHNSwKhPHj/SeYCcagsfW4O7oz5FbhtKTEEzC3hWX QszPzPThpTlRVRVZgTSFGrlo0uxnQfno/aDMO3nS0peB6Bz8b/Opgqq2Gnijz9bmZ4 //fjWhZvfh7zA== X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=2001:558:fe2d:44:76:96:27:228; country=US X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 06KjR4EjD - 4988781ea659 - 20130901 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) X-Mailman-Approved-At: Tue, 03 Sep 2013 09:40:32 +0200 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:84069 Archived-At: On Sat, 31 Aug 2013 23:10:07 +0200 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? > > Thank in advance. > If faced with this problem I would import the tex file into gvim and do a mass change with one statement like: :% s/\\section/\\subsection/ Then I would save the tex file under a different name. If there are already subsections I would convert them to subsubsections first, then convert the sections to subsections. Eqch step is just a singl command in gvim. -- John Culleton Wexford Press Free list of books for self-publishers: http://wexfordpress.net/shortlist.html PDF e-book: "Create Book Covers with Scribus" available at http://www.booklocker.com/books/4055.html ___________________________________________________________________________________ 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 ___________________________________________________________________________________