ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* macros and buffers
@ 2002-11-15 11:22 Matthew Huggett
  2002-11-15 12:29 ` Hans Hagen
  0 siblings, 1 reply; 2+ messages in thread
From: Matthew Huggett @ 2002-11-15 11:22 UTC (permalink / raw)


Hi:

Recently, I had some data I wanted set using tabulate but in 7 individual
buffers.  I wanted to use a macro to both create the buffers and do the
\starttabulate...\stoptabulate stuff.  I found that my macro could create
the .tmp file for each buffer but that the files were all empty.  Why would
this happen, and is there a way to make this work?

example:

\define[5]\MyBuffers{
  \startbuffer[#1]
    \starttabulate[|l|l|]
      \NC #2 \NC #3 \NR
      \NC #4 \NC #5
    \stoptabulate
  \stopbuffer
}

Best Wishes,

Matthew Huggett

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: macros and buffers
  2002-11-15 11:22 macros and buffers Matthew Huggett
@ 2002-11-15 12:29 ` Hans Hagen
  0 siblings, 0 replies; 2+ messages in thread
From: Hans Hagen @ 2002-11-15 12:29 UTC (permalink / raw)


At 08:22 PM 11/15/2002 +0900, you wrote:
>Hi:
>
>Recently, I had some data I wanted set using tabulate but in 7 individual
>buffers.  I wanted to use a macro to both create the buffers and do the
>\starttabulate...\stoptabulate stuff.  I found that my macro could create
>the .tmp file for each buffer but that the files were all empty.  Why would
>this happen, and is there a way to make this work?
>
>example:
>
>\define[5]\MyBuffers{
>   \startbuffer[#1]
>     \starttabulate[|l|l|]
>       \NC #2 \NC #3 \NR
>       \NC #4 \NC #5
>     \stoptabulate
>   \stopbuffer
>}

this is because buffers do a copy based on grabbing lines; in your case, 
use \setbuffer[#1]...\endbuffer

(you're lucky, the next release will provide \usememorybuffers, since a few 
days back we needed something similar)

Hans
-------------------------------------------------------------------------
                                   Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                       Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
                        information: http://www.pragma-ade.com/roadmap.pdf
                     documentation: http://www.pragma-ade.com/showcase.pdf
-------------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-11-15 12:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-15 11:22 macros and buffers Matthew Huggett
2002-11-15 12:29 ` Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).