From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/63296 Path: news.gmane.org!not-for-mail From: Aditya Mahajan Newsgroups: gmane.comp.tex.context Subject: Re: \startmode and \startcomment inside of \def Date: Sun, 7 Nov 2010 15:53:43 -0500 (EST) Message-ID: References: <2AB23614-EB80-4AF9-931B-A0AFA1F54CC5@gmail.com> <397B899C-EA85-4622-8BAE-B3D35C2508A4@gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="8323328-1773185181-1289163226=:12558" X-Trace: dough.gmane.org 1289163252 19182 80.91.229.12 (7 Nov 2010 20:54:12 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 7 Nov 2010 20:54:12 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun Nov 07 21:54:07 2010 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 1PFCFZ-0008TF-OZ for gctc-ntg-context-518@m.gmane.org; Sun, 07 Nov 2010 21:54:05 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 8061FCA81A; Sun, 7 Nov 2010 21:54:05 +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 0nIHLjEdQOzX; Sun, 7 Nov 2010 21:54:05 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id C3F43CA81B; Sun, 7 Nov 2010 21:53:52 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 3D773CA81B for ; Sun, 7 Nov 2010 21:53:51 +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 q2ZpVAJcZhpu for ; Sun, 7 Nov 2010 21:53:48 +0100 (CET) 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 7F75BCA81A for ; Sun, 7 Nov 2010 21:53:48 +0100 (CET) Original-Received: from hackers.mr.itd.umich.edu (smtp.mail.umich.edu [141.211.14.81]) by filter2-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id oA7KrkFe026833 for ; Sun, 7 Nov 2010 21:53:47 +0100 Original-Received: FROM adi-netbook (bas3-montreal02-1096680238.dsl.bell.ca [65.94.3.46]) By hackers.mr.itd.umich.edu ID 4CD711D9.30055.8398 ; Authuser adityam; 7 Nov 2010 15:53:45 EST In-Reply-To: <397B899C-EA85-4622-8BAE-B3D35C2508A4@gmail.com> User-Agent: Alpine 2.01 (LNX 1266 2009-07-14) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=141.211.14.81; 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: 0bDskRKzR - 29c9e948f4e2 - 20101107 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.218 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:63296 Archived-At: This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323328-1773185181-1289163226=:12558 Content-Type: TEXT/PLAIN; charset=utf-8; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Sun, 7 Nov 2010, Wolfgang Schuster wrote: > > Am 07.11.2010 um 20:49 schrieb Vedran Mileti=C4=87: > >> How would I then do something like this? >> >> \def\startSolution{\startmode[solutions]\startframedtext} >> \def\stopSolution{\stopframedtext\stopmode} > > \startmode[solution] > \setupbuffer[Solution][local=3Dno,before=3D\startframedtext,after=3D\stop= framedtext] > \stopmode In general, I agree with Wolfgang. It is better to redefine the macro at=20 an outer level. You can even do: \defineframedtext[Solution] \startnotmode[solution] \definebuffer[Solution][local=3Dyes] \stopnotmode However, in the few cases that you actually need to check for a mode=20 inside a macro, you can use \doifmode ... etc. Aditya --8323328-1773185181-1289163226=:12558 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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 ___________________________________________________________________________________ --8323328-1773185181-1289163226=:12558--