From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/30079 Path: news.gmane.org!not-for-mail From: Aditya Mahajan Newsgroups: gmane.comp.tex.context Subject: Re: buffers Date: Mon, 7 Aug 2006 11:47:10 -0400 (EDT) Message-ID: References: <9E95C6CD-7B1F-496A-AF19-6F5B6E6B50FE@science.uva.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1154965652 21096 80.91.229.2 (7 Aug 2006 15:47:32 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 7 Aug 2006 15:47:32 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Mon Aug 07 17:47:31 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 1GA7KC-0005J9-RA for gctc-ntg-context-518@m.gmane.org; Mon, 07 Aug 2006 17:47:28 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 2BC901FD1B; Mon, 7 Aug 2006 17:47:28 +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 25508-04-2; Mon, 7 Aug 2006 17:47:21 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 9FAFB1FD06; Mon, 7 Aug 2006 17:47:21 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id CD1731FD06 for ; Mon, 7 Aug 2006 17:47:18 +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 25508-04 for ; Mon, 7 Aug 2006 17:47:14 +0200 (CEST) Original-Received: from hellskitchen.mr.itd.umich.edu (smtp.mail.umich.edu [141.211.14.82]) by ronja.ntg.nl (Postfix) with SMTP id 826A71FC5D for ; Mon, 7 Aug 2006 17:47:14 +0200 (CEST) Original-Received: FROM aditya.annarb01.mi.comcast.net (c-68-40-50-205.hsd1.mi.comcast.net [68.40.50.205]) BY hellskitchen.mr.itd.umich.edu ID 44D7607F.BCF6E.26233 ; 7 Aug 2006 11:47:12 -0400 Original-To: mailing list for ConTeXt users In-Reply-To: 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:30079 Archived-At: On Mon, 31 Jul 2006, Aditya Mahajan wrote: > On Mon, 31 Jul 2006, Hans van der Meer wrote: > >> The ConTeXt manual tells me on page 237: >> >> You can define your own buffer with: >> \definebuffer[...] >> ... name >> After this command /getbuffer and \typebuffer are available where >> buffer is the name of the buffer. >> >> I do: >> \definebuffer[left] >> \startbuffer[left] >> left\crlf >> \stopbuffer >> \typeleft >> and it gives me the error: >> ! Undefined control sequence. >> \typeleft ->\dodotypebuffer >> [left][def-3] >> l.92 \typeleft >> >> then I try: >> \typebuffer[left] >> >> this gives a typeset message [file examdoc-def-2.tmp does not exist] >> (file examdoc.tex being the containing tex file) >> >> when I try >> \getbuffer[left] or \getleft >> nothing at all seems to happen? >> >> Why doesn't it work according to the manual? >> Or do I misunderstand the manual completely? > > If you just want to "tag" buffers, you do not need to define new ones. > You can simply do > > \startbuffer[test] > Hello world > \stopbuffer > > \typebuffer[test] > > \getbuffer[test] > > > Defining new buffers is useful if you do not want to call buffers by > some other name. This does not allow you to "tag" the buffers. There > is also a bug in core-buf.tex due to which \type did not work. > > \unprotect > \def\dodefinebuffer[#1][#2]% > {\iffirstargument % else problems > \doglobal\increment\nofdefinedbuffers > \letvalue{\??bu#1\c!number}\nofdefinedbuffers > \letvalue{\??bu#1\c!paragraph}\v!no > \setevalue{\e!start#1}% > > {\noexpand\dostartbuffer[#1][def-\nofdefinedbuffers][\e!start#1][\e!stop#1]}% > \setevalue{\e!get#1}% > {\noexpand\dodoprocessTEXbuffer[#1][def-\nofdefinedbuffers]}% > \setevalue{\e!type#1}% > {\noexpand\dotypebuffer[#1][def-\nofdefinedbuffers]}% > % TYPO: was > % {\noexpand\dodotypebuffer[#1][def-\nofdefinedbuffers]}% > \getparameters[\??bu#1][#2]% > \fi} > \protect Hans, was this fixed. There is a typo in core-buf.tex and it is still present in latest "updateable" version (2006.08.02). Aditya > > \definebuffer[Example] > > \startExample > Hello again > \stopExample > > \typeExample %The above fix is needed for this. > > \getExample