From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/78151 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: Nested Macro Date: Fri, 7 Sep 2012 07:17:48 +0200 Message-ID: References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 6.0 \(1486\)) Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1346995085 15479 80.91.229.3 (7 Sep 2012 05:18:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 7 Sep 2012 05:18:05 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Sep 07 07:18:07 2012 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1T9qxC-0002Rz-9Q for gctc-ntg-context-518@m.gmane.org; Fri, 07 Sep 2012 07:18:06 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id BBECF10211; Fri, 7 Sep 2012 07:18:02 +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 LL-BnNoill2X; Fri, 7 Sep 2012 07:18:01 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id EF7AF101F5; Fri, 7 Sep 2012 07:18:00 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 1D0C0101F5 for ; Fri, 7 Sep 2012 07:17:59 +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 IygPqISCXobB for ; Fri, 7 Sep 2012 07:17:58 +0200 (CEST) Original-Received: from filter1-utr.mf.surf.net (filter1-utr.mf.surf.net [195.169.124.152]) by balder.ntg.nl (Postfix) with ESMTP id 7A175101F4 for ; Fri, 7 Sep 2012 07:17:58 +0200 (CEST) Original-Received: from mail-bk0-f41.google.com (mail-bk0-f41.google.com [209.85.214.41]) by filter1-utr.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id q875Hv4f024548 for ; Fri, 7 Sep 2012 07:17:57 +0200 Original-Received: by bkcjc3 with SMTP id jc3so1278675bkc.14 for ; Thu, 06 Sep 2012 22:17:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; bh=aO611aVb8CGfsN1LgGodisZinLgddcnL6gsiFtiAIoE=; b=RpH+/7GgPSkaviK/oz0HqfsCNcJOlx9eX9aWrYXmsinEMMQjoDoiIIxnYlE3xbs9ZO IGJZzAOvivJtXG0qhdECoytEmb38bkwqanQVYIwd7tScf8c0+u9FPAkGqISf3n9c2nbM IxHYCmNuoy0xmnvHd3unORCptQrAJWUsgP/U0uqlMQe2hiqMtON5IxIufJ3tzDuP9VXE LKlgDUc1//or8ZJlWU1Cty+xa7Ol0EiGion8rkUcAAF1q9pR0Up1MdbF5hYZeb7Em755 IDsmfHIvq4bcLX+XN+GFVxjGfBJ/33Jhpz3MVyRVK+zySTk/KLUdCmc6OyXAkoUFKxYk KAXA== Original-Received: by 10.204.41.206 with SMTP id p14mr1947916bke.54.1346995076818; Thu, 06 Sep 2012 22:17:56 -0700 (PDT) Original-Received: from [10.46.141.32] ([82.113.121.32]) by mx.google.com with ESMTPS id g6sm2454883bkg.2.2012.09.06.22.17.55 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 06 Sep 2012 22:17:56 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.1486) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.214.41; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 07HU5hVBv - 87cf80ee0ed1 - 20120907 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) 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:78151 Archived-At: Am 07.09.2012 um 06:38 schrieb Troy Henderson : > I would like to create a macro that defines a display formula, and then redefine the same macro such that the redefinition includes the original display formula followed by another display formula. Here is my attempt. > > \def\foo{\startformula a = b \stopformula} \foo > \edef\foo{\foo \startformula c = d \stopformula} \foo > > This fails, and I would appreciate help in getting this to work. Your example works for me when I process it with mkiv but I would use a token list and not a macro to store the content. \starttext % macro \def\foo{\startformula a = b \stopformula} \foo \blank[2*line] \edef\foo{\foo \startformula c = d \stopformula} \foo \blank[2*line] % token list \newtoks\mytoks \appendtoks \startformula a = b \stopformula \to \mytoks \the\mytoks \blank[2*line] \appendtoks \startformula c = d \stopformula \to \mytoks \the\mytoks \stoptext Wolfgang ___________________________________________________________________________________ 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 ___________________________________________________________________________________