From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/24550 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: \useblocks in section Date: Wed, 21 Dec 2005 10:29:53 +0100 Message-ID: <43A92091.8000700@wxs.nl> References: <1598EE78-9D8E-4415-A091-BA4D69ECF5DE@cox.net> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1135157524 2373 80.91.229.2 (21 Dec 2005 09:32:04 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 21 Dec 2005 09:32:04 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Wed Dec 21 10:31:57 2005 Return-path: Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by ciao.gmane.org with esmtp (Exim 4.43) id 1Ep0IN-0007xi-NL for gctc-ntg-context-518@m.gmane.org; Wed, 21 Dec 2005 10:30:03 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 7F32C12880; Wed, 21 Dec 2005 10:30:03 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 22358-04-4; Wed, 21 Dec 2005 10:29:59 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 75DCD1287C; Wed, 21 Dec 2005 10:29:59 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id BB0CA1287C for ; Wed, 21 Dec 2005 10:29:58 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 22358-04-3 for ; Wed, 21 Dec 2005 10:29:57 +0100 (CET) Original-Received: from mail.pragma-ade.net (dsl-212-84-128-085.solcon.nl [212.84.128.85]) by ronja.ntg.nl (Postfix) with ESMTP id 8792812875 for ; Wed, 21 Dec 2005 10:29:55 +0100 (CET) Original-Received: from [10.100.1.102] (unverified [10.100.1.102]) by controller-1 (SurgeMail 3.5b3) with ESMTP id 8613 for ; Wed, 21 Dec 2005 10:37:14 +0300 User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: en-us, en Original-To: mailing list for ConTeXt users In-Reply-To: <1598EE78-9D8E-4415-A091-BA4D69ECF5DE@cox.net> X-Server: High Performance Mail Server - http://surgemail.com r=-274017400 X-Authenticated-User: hagen@controller-1 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.5 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 X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:24550 Archived-At: David Arnold wrote: > All, > > This doesn't seem to work as expected. Replacing the \useblocks with > \selectblocks also produces an unexpected result. What am I doing > wrong? I am trying to have only the answers from the chapter show up. ah, old code, something got lost when i added parameter support ... \unprotect \def\getblockstatus#1% is this still ok {\dosetfilterlevel{\@@bscriterium}\empty \expanded{\doifblklevelelse[#1\sectionseparator\sectionseparator0]} {\global\blockpermittedtrue} {\global\blockpermittedfalse}% \def\blockstatus{#1}} \def\doselectblocks[#1][#2][#3]% {\begingroup \doifelsenothing{#3} {\getparameters[\??bs][\c!criterium=\v!all,#2]% \dodouseblocks[#1][]} {\getparameters[\??bs][\c!criterium=\v!all,#3]% \dodouseblocks[#1][#2]}}% \def\selectblocks {\dotripleempty\doselectblocks} \protect use \selectblocks when you want a criterium > > %output=pdf > > \defineenumeration[question][location=serried,text=Question] > \defineenumeration[answer][location=serried,text=Answer] > \defineblock[question,answer] > \hideblocks[answer] > > \starttext > > \chapter{First Chapter} > > \input tufte > > \beginquestion > \startquestion > What is the square root of 4? > \stopquestion > \endquestion > > \beginanswer > \startanswer > 2 > \stopanswer > \endanswer > > \section{Answers} > > \useblocks[answer][criterium=chapter] > > \chapter{Second Chapter} > > \input tufte > > \beginquestion > \startquestion > What is the square root of 9? > \stopquestion > \endquestion > > \beginanswer > \startanswer > 3 > \stopanswer > \endanswer > > \section{Answers} > > \useblocks[answer][criterium=chapter] > > \stoptext > > _______________________________________________ > ntg-context mailing list > ntg-context@ntg.nl > http://www.ntg.nl/mailman/listinfo/ntg-context