From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/86841 Path: news.gmane.org!not-for-mail From: Xan Newsgroups: gmane.comp.tex.context Subject: Defining commands in \start ... \stop Date: Sun, 30 Mar 2014 19:13:57 +0200 Message-ID: <20140330191357.4171548bb30e5bbefe9b0cb2@telefonica.net> 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 1396199667 25285 80.91.229.3 (30 Mar 2014 17:14:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 30 Mar 2014 17:14:27 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun Mar 30 19:14:23 2014 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 1WUJJI-00041h-PE for gctc-ntg-context-518@m.gmane.org; Sun, 30 Mar 2014 19:14:16 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id B2688101E7; Sun, 30 Mar 2014 19:14:15 +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 tNxM+-pJ+sGC; Sun, 30 Mar 2014 19:14:13 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id CCB60101E9; Sun, 30 Mar 2014 19:14:13 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 27BE4101E9 for ; Sun, 30 Mar 2014 19:14:13 +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 47bbr93dEknh for ; Sun, 30 Mar 2014 19:14:11 +0200 (CEST) Original-Received: from filter2-til.mf.surf.net (filter2-til.mf.surf.net [194.171.167.218]) by balder.ntg.nl (Postfix) with ESMTP id 83B3F101E7 for ; Sun, 30 Mar 2014 19:14:01 +0200 (CEST) Original-Received: from smtp.movistar.es (smtp22.acens.net [86.109.99.146]) by filter2-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id s2UHDxQW004686 for ; Sun, 30 Mar 2014 19:14:00 +0200 X-CTCH-RefID: str=0001.0A0B0201.533850D6.0085, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-Spam: Unknown Original-Received: from rulot (81.32.88.229) by smtp.movistar.es (8.6.117.05) (authenticated as dxpublica) id 53205A14009DA39F for ntg-context@ntg.nl; Sun, 30 Mar 2014 17:13:58 +0000 X-Mailer: Sylpheed 3.3.1 (GTK+ 2.24.22; i686-pc-linux-gnu) X-Bayes-Prob: 0.0001 (Score 0, tokens from: ntg-context@ntg.nl, base:default, @@RPTN) X-CanIt-Geo: ip=86.109.99.146; country=ES; latitude=40.0000; longitude=-4.0000; http://maps.google.com/maps?q=40.0000,-4.0000&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0TLHRdXHO - 10ce8c961c57 - 20140330 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.218 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:86841 Archived-At: Hi, Concerned with the answers to the [that topic](http://www.ntg.nl/pipermail/ntg-context/2014/077099.html), I was thinking if I could define a command "Exercise" with a optional argument (the "Answer"). \defineblock[question] \defineblock[answer] \defineenumeration[question][text={Question}] \defineenumeration[answer] [text={Answer}] \keepblocks[question] \hideblocks[answer] Something like \startexercise My execise ... \stopexercise If no more is provide, at the question does \incrementcounter[answer] If \startexercise{\startsolution The solution is \stopsolution} My exercise \stopexercise then \beginanswer and \startanswer is called. Is it possible? I just want to know if it's better to have \startBla...\stopBla command or \Bla{} command type? In the case of the first, how do you define that? I did not find it here (http://wiki.contextgarden.net/Commands_with_optional_arguments) Thanks, Xan PS: Please CCme ___________________________________________________________________________________ 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 ___________________________________________________________________________________