ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* add to \setbuffer
@ 2018-01-10 12:45 dr. Hans van der Meer
  2018-01-10 17:30 ` Wolfgang Schuster
  0 siblings, 1 reply; 3+ messages in thread
From: dr. Hans van der Meer @ 2018-01-10 12:45 UTC (permalink / raw)
  To: NTG ConTeXt


[-- Attachment #1.1: Type: text/plain, Size: 202 bytes --]

With \setbuffer[ABUFFER] .. \endbuffer I can program a macro to put something in this buffer.
But is it possible to add something at the end of this buffer at a later moment?

Hans van der Meer



[-- Attachment #1.2: Type: text/html, Size: 1336 bytes --]

[-- Attachment #2: Type: text/plain, Size: 492 bytes --]

___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: add to \setbuffer
  2018-01-10 12:45 add to \setbuffer dr. Hans van der Meer
@ 2018-01-10 17:30 ` Wolfgang Schuster
  2018-01-10 22:02   ` Hans Hagen
  0 siblings, 1 reply; 3+ messages in thread
From: Wolfgang Schuster @ 2018-01-10 17:30 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 638 bytes --]


> dr. Hans van der Meer <mailto:havdmeer@ziggo.nl>
> 10. Januar 2018 um 13:45
> With \setbuffer[ABUFFER] .. \endbuffer I can program a macro to put 
> something in this buffer.
> But is it possible to add something at the end of this buffer at a 
> later moment?

You can use the “buffers.append” and “buffers.prepend” functions to add 
text to a buffer.

\starttext

\startbuffer[a]
First
\stopbuffer

\startbuffer[b]
Second
\stopbuffer

\startbuffer[c]
Third
\stopbuffer

\startluacode

buffers.append("b",buffers.getcontent("c"))

buffers.prepend("b",buffers.getcontent("a"))

\stopluacode

\getbuffer[b]

\stoptext

Wolfgang

[-- Attachment #1.2: Type: text/html, Size: 1806 bytes --]

[-- Attachment #2: Type: text/plain, Size: 492 bytes --]

___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: add to \setbuffer
  2018-01-10 17:30 ` Wolfgang Schuster
@ 2018-01-10 22:02   ` Hans Hagen
  0 siblings, 0 replies; 3+ messages in thread
From: Hans Hagen @ 2018-01-10 22:02 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Wolfgang Schuster

On 1/10/2018 6:30 PM, Wolfgang Schuster wrote:
> 
>> dr. Hans van der Meer <mailto:havdmeer@ziggo.nl>
>> 10. Januar 2018 um 13:45
>> With \setbuffer[ABUFFER] .. \endbuffer I can program a macro to put 
>> something in this buffer.
>> But is it possible to add something at the end of this buffer at a 
>> later moment?
> 
> You can use the “buffers.append” and “buffers.prepend” functions to add 
> text to a buffer.
> 
> \starttext
> 
> \startbuffer[a]
> First
> \stopbuffer
> 
> \startbuffer[b]
> Second
> \stopbuffer
> 
> \startbuffer[c]
> Third
> \stopbuffer
> 
> \startluacode
> 
> buffers.append("b",buffers.getcontent("c"))
> 
> buffers.prepend("b",buffers.getcontent("a"))
> 
> \stopluacode
> 
> \getbuffer[b]
> 
> \stoptext
or just getbuffer[a,b,c]


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2018-01-10 22:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-10 12:45 add to \setbuffer dr. Hans van der Meer
2018-01-10 17:30 ` Wolfgang Schuster
2018-01-10 22:02   ` 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).