From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/29385 Path: news.gmane.org!not-for-mail From: David Arnold Newsgroups: gmane.comp.tex.context Subject: Hiding subanswer blocks Date: Sat, 15 Jul 2006 09:48:59 -0700 Message-ID: <8A6E0574-3F67-4B5B-9679-53FFA47A17D6@cox.net> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1152982258 16287 80.91.229.2 (15 Jul 2006 16:50:58 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 15 Jul 2006 16:50:58 +0000 (UTC) Cc: Jacob Prystowsky Original-X-From: ntg-context-bounces@ntg.nl Sat Jul 15 18:50:55 2006 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org 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 1G1nLw-0002on-SS for gctc-ntg-context-518@m.gmane.org; Sat, 15 Jul 2006 18:50:52 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id C3932127C6; Sat, 15 Jul 2006 18:50:52 +0200 (CEST) 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 07125-06; Sat, 15 Jul 2006 18:50:45 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 305BC1281F; Sat, 15 Jul 2006 18:50:45 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 3E18B1281F for ; Sat, 15 Jul 2006 18:50:41 +0200 (CEST) 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 09401-02 for ; Sat, 15 Jul 2006 18:50:36 +0200 (CEST) Original-Received: from fed1rmmtao05.cox.net (fed1rmmtao05.cox.net [68.230.241.34]) by ronja.ntg.nl (Postfix) with SMTP id E5201127C6 for ; Sat, 15 Jul 2006 18:50:33 +0200 (CEST) Original-Received: from [10.0.1.2] (really [70.191.56.23]) by fed1rmmtao05.cox.net (InterMail vM.6.01.06.01 201-2131-130-101-20060113) with ESMTP id <20060715165023.JSPB12909.fed1rmmtao05.cox.net@[10.0.1.2]>; Sat, 15 Jul 2006 12:50:23 -0400 Original-To: Context Mailing List List X-Mailer: Apple Mail (2.752.2) X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.7 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:29385 Archived-At: All, Below I have our environment for our question and answer blocks. We are attempting to have questions that have parts, as in: 1. Yada, Yada, Yada, Yada, Yada, Yada, Yada, Yada, Yada. 1a) Yada, Yada, Yada, Yada, Yada, Yada, Yada, Yada, Yada. 1b) Yada, Yada, Yada, Yada, Yada, Yada, Yada, Yada, Yada. 1c) Yada, Yada, Yada, Yada, Yada, Yada, Yada, Yada, Yada, 2, 2a) 2b) Etc. However, we want to "hide" some of the shortsubanswers. We try with: \beginshortanswer \startanswer \startsubanswer[-] \stopsubanswer \startsubanswer[-] \stopsubanswer \startsubanswer[-] \stopsubanswer \startsubanswer \startbuffer ... When typeset, the first three subanswers here are hidden, but the first subanswer that is not hidden, which should be the answer to "part d," it winds up be labeled "part a" in the pdf output. Can anyone help? \def\genericqacommands#1{\unnumberedsubsection{#1}\vskip 1em} \def\startgenericqadouble#1{\genericqacommands{#1}\startcolumns[n=2]} \def\stopgenericqadouble{\stopcolumns} \def\startgenericqasingle#1{\genericqacommands{#1}} \def\stopgenericqasingle{} \def\preqacontainment{\vskip 0.5ex plus 1ex} \def\postqacontainment{\vskip 0.5ex plus 1ex} \def\startquestions{\startgenericqadouble{Exercises}} \def\stopquestions{\stopgenericqadouble} \def\startlonganswers{\startgenericqasingle{Answers}} \def\stoplonganswers{\stopgenericqasingle} \def\startshortanswers{\startgenericqadouble{Answers}} \def\stopshortanswers{\stopgenericqadouble} \def\questionbreak{\vskip 2em plus 1ex minus 1 ex} \def\placeanswers{% \doifmodeelse{short} { \startshortanswers \selectblocks[shortanswer,shortsubanswer][criterium=section] \stopshortanswers } { \startlonganswers \selectblocks[longanswer,longsubanswer][criterium=section] \stoplonganswers } } \defineenumeration [question] [text=, headcolor=heavygreen] \setupenumerations [question] [location=left, width=fit, distance=1em, hang=1, margin=0pt, headcolor=heavygreen, right=., way=bysection, sectionnumber=no, before=\preqacontainment, after=\postqacontainment] \defineenumeration [subquestion] [location=hanging, text=, headcolor=heavygreen, conversion=characters] \setupenumerations [subquestion] [right=)] \defineenumeration [answer] [text=, headcolor=heavygreen] \setupenumerations [answer] [location=left, width=fit, distance=1em, hang=1, margin=0pt, headcolor=heavygreen, right=., way=bysection, sectionnumber=no, before=\preqacontainment, after=\postqacontainment] \defineenumeration [subanswer] [location=hanging, text=, headcolor=heavygreen, conversion=characters] \setupenumerations [subanswer] [right=)] \defineblock [question,shortanswer,longanswer,subquestion,shortsubanswer,longsubanswe r] \hideblocks[shortanswer,longanswer,shortsubanswer,longsubanswer]