From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/72558 Path: news.gmane.org!not-for-mail From: Aditya Mahajan Newsgroups: gmane.comp.tex.context Subject: Re: Hide section content Date: Sun, 20 Nov 2011 13:49:05 -0500 (EST) Message-ID: References: <3D208254-3254-4CFE-A32E-3F621EE3F7A0@googlemail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1321814810 4740 80.91.229.12 (20 Nov 2011 18:46:50 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 20 Nov 2011 18:46:50 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun Nov 20 19:46:46 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 1RSCPb-0005Ou-Oj for gctc-ntg-context-518@m.gmane.org; Sun, 20 Nov 2011 19:46:43 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 7CD5ECB0FD; Sun, 20 Nov 2011 19:46:43 +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 GlG8n83CBOyz; Sun, 20 Nov 2011 19:46:31 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id CA1D8CB0F6; Sun, 20 Nov 2011 19:46:31 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 9136ECB0F6 for ; Sun, 20 Nov 2011 19:46:30 +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 ZByxOhQDkdfc for ; Sun, 20 Nov 2011 19:46:19 +0100 (CET) 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 B3F68CB0F3 for ; Sun, 20 Nov 2011 19:46:19 +0100 (CET) Original-Received: from tombraider.mr.itd.umich.edu (smtp.mail.umich.edu [141.211.12.86]) by filter1-ams.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id pAKIkCv4015482 for ; Sun, 20 Nov 2011 19:46:17 +0100 Original-Received: FROM adi-laptop (bas3-montreal02-1096681677.dsl.bell.ca [65.94.8.205]) By tombraider.mr.itd.umich.edu ID 4EC94AF3.2822F.7826 ; Authuser adityam; 20 Nov 2011 13:46:11 EST In-Reply-To: <3D208254-3254-4CFE-A32E-3F621EE3F7A0@googlemail.com> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=141.211.12.86; country=US; region=MI; city=Ann Arbor; postalcode=48109; latitude=42.2923; longitude=-83.7145; metrocode=505; areacode=734; http://maps.google.com/maps?q=42.2923,-83.7145&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 06FXuKc0m - cb1ff178cbea - 20111120 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.69 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:72558 Archived-At: On Sun, 20 Nov 2011, Wolfgang Schuster wrote: > 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) > > \def\gobblesection > {\doif{\structureuservariable{review}}{no} > {\gobbleuntil\stopsection}} > > \setuphead[section][insidesection=\gobblesection] Thanks. > but to hide the title of the section together with the > list entry Hans has to modify the heading macros. Yes. I noticed that beforesection is used before user variables are set, so the above approach does not work for section heads. For now, I have just defined a different head, 'noreviewsection`, and I set it to a buffer in the review mode. Aditya ___________________________________________________________________________________ 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 ___________________________________________________________________________________