From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/20643 Path: news.gmane.org!not-for-mail From: =?ISO-8859-15?Q?Peter_M=FCnster?= Newsgroups: gmane.comp.tex.context Subject: Re: \stopbuffer in macro Date: Thu, 2 Jun 2005 18:08:54 +0200 (CEST) Message-ID: References: <429B8F23.40908@wxs.nl> Reply-To: ntg-context@ntg.nl NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: sea.gmane.org 1117728892 31033 80.91.229.2 (2 Jun 2005 16:14:52 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 2 Jun 2005 16:14:52 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Thu Jun 02 18:14:44 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 1DdsIe-0006I0-Mm for gctc-ntg-context-518@m.gmane.org; Thu, 02 Jun 2005 18:12:04 +0200 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 2691F1277C; Thu, 2 Jun 2005 18:15:11 +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 04313-01; Thu, 2 Jun 2005 18:15:10 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 4F4281279D; Thu, 2 Jun 2005 18:12:51 +0200 (CEST) Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 8E15F1279D for ; Thu, 2 Jun 2005 18:12:49 +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 03946-06 for ; Thu, 2 Jun 2005 18:12:48 +0200 (CEST) Original-Received: from postfix4-1.free.fr (postfix4-1.free.fr [213.228.0.62]) by ronja.ntg.nl (Postfix) with ESMTP id AB3B41277C for ; Thu, 2 Jun 2005 18:12:48 +0200 (CEST) Original-Received: from gaston.free.fr (rennes-1-62-147-98-135.dial.proxad.net [62.147.98.135]) by postfix4-1.free.fr (Postfix) with ESMTP id 46253317DD3 for ; Thu, 2 Jun 2005 18:12:46 +0200 (CEST) Original-Received: by gaston.free.fr (Postfix, from userid 500) id 5701B13C050; Thu, 2 Jun 2005 18:08:54 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by gaston.free.fr (Postfix) with ESMTP id 330FA14810C for ; Thu, 2 Jun 2005 18:08:54 +0200 (CEST) X-X-Sender: peter@gaston.free.fr Original-To: mailing list for ConTeXt users In-Reply-To: <429B8F23.40908@wxs.nl> 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-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on smtp.ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:20643 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:20643 On Tue, 31 May 2005, Hans Hagen wrote: > \definebuffer[crap] > > \setupbuffer[crap][before=\blank\bgroup here we start,after=and here we > end\egroup\blank] [...] Hello Hans and Taco, thank you for your hints, but I think, I did not explain my question well enough... I fact, all I need is to know, how I could write some verbatim text between 2 commands (\startXXX...\stopXXX) into a file, but with my own macros. Here an example in detail: \newcount\LSTnum \newwrite\LSTfile \def\LSTfileprefix{\jobname-LST\LSTnum} \def\startLST[#1]#2\stopLST{% \immediate\openout\LSTfile=\LSTfileprefix.tmp \immediate\write\LSTfile{#2}% Here I seek a solution for verbatim text! \immediate\closeout\LSTfile \immediate\write18{createListing.sh \LSTfileprefix #1}% #1 is for \lstset \externalfigure[\LSTfileprefix] \advance\LSTnum by 1 } and then, the user types only: \startLST[language=C] main() { return 0; } \stopLST It's already possible to do this with some further macros (\finishLST after \stopLST for example), but I prefer only one \start/\stop pair. Greetings, Peter -- http://pmrb.free.fr/contact/