From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/72547 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: Hide section content Date: Sun, 20 Nov 2011 11:16:59 +0100 Message-ID: <3D208254-3254-4CFE-A32E-3F621EE3F7A0@googlemail.com> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1251.1) Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1321784248 14260 80.91.229.12 (20 Nov 2011 10:17:28 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 20 Nov 2011 10:17:28 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun Nov 20 11:17:20 2011 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 1RS4Se-0004h9-Gy for gctc-ntg-context-518@m.gmane.org; Sun, 20 Nov 2011 11:17:20 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 89DB8CB0F3; Sun, 20 Nov 2011 11:17:19 +0100 (CET) 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 Aci7awXas84y; Sun, 20 Nov 2011 11:17:16 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 4715BCB0EE; Sun, 20 Nov 2011 11:17:16 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 3A672CB0EE for ; Sun, 20 Nov 2011 11:17:14 +0100 (CET) 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 SkYYyeDOADQC for ; Sun, 20 Nov 2011 11:17:02 +0100 (CET) Original-Received: from filter4-til.mf.surf.net (filter4-til.mf.surf.net [194.171.167.220]) by balder.ntg.nl (Postfix) with ESMTP id 757DCCB0ED for ; Sun, 20 Nov 2011 11:17:02 +0100 (CET) Original-Received: from mail-bw0-f41.google.com (mail-bw0-f41.google.com [209.85.214.41]) by filter4-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id pAKAH1D7003652 for ; Sun, 20 Nov 2011 11:17:01 +0100 Original-Received: by bke17 with SMTP id 17so6923412bke.14 for ; Sun, 20 Nov 2011 02:17:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; bh=nEDIpWLZCyFwzBl0t+JbWl6EnM+hIC27JL+dn4P9w74=; b=opFnVXaKHADS20lLBOJ6RF3lKkWUZcHe2cnGtyJy70qi1pWiFkmz4H27gCYUxgrGDt TQWk2JaiAUwQvYei5HfibpIuCgKIVuJmN3hw2ChtT/5vqgDBDmFShaybGxdD1Ook7lm8 PFiocT5fhU8sWoshPYDI3j63Km79RRxLmVAqY= Original-Received: by 10.205.132.16 with SMTP id hs16mr10075103bkc.7.1321784220899; Sun, 20 Nov 2011 02:17:00 -0800 (PST) Original-Received: from [192.168.2.35] (p57AFC6A0.dip.t-dialin.net. [87.175.198.160]) by mx.google.com with ESMTPS id y2sm11704627fag.12.2011.11.20.02.16.59 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 20 Nov 2011 02:16:59 -0800 (PST) In-Reply-To: X-Mailer: Apple Mail (2.1251.1) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.214.41; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 05FXmh1Gk - b1974f22819a - 20111120 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.220 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:72547 Archived-At: Am 20.11.2011 um 00:56 schrieb Aditya Mahajan: > Hi, > > I have a tex file that looks like follows: > > \startsection[title=...][review=yes] > ... > \stopsection > > \startsection[title=...][review=no] > ... > \stopsection > > When I compile the document with --mode=review, I want that all sections that have `review=no` should not be displayed. What is the best way of achieving this? In particular, can we have an option that'll let us say: > > \setuphead[section][placebody=hidden] (analogous to placehead=hidden). To hide the content of the section you can use this (maybe a buffer would be better) but to hide the title of the section together with the list entry Hans has to modify the heading macros. \def\gobblesection {\doif{\structureuservariable{review}}{no} {\gobbleuntil\stopsection}} \setuphead[section][insidesection=\gobblesection] \starttext \startsection[title=Knuth][review=yes] \input knuth \stopsection \startsection[title=Zapf][review=no] \input zapf \stopsection \stoptext Wolfgang ___________________________________________________________________________________ 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 ___________________________________________________________________________________