Changes

Jump to navigation Jump to search
no edit summary
}}
== [[Help:Reference|Syntax]] (autogenerated) ==
<syntax>grabbufferdata</syntax>
== [[Help:Reference|Syntax]] ==
<table cellspacing="4" cellpadding="2" class="cmd">
== Description ==
This is a slightly low-level command to grab user input and store it in a buffer. It is different from {{cmd|startbuffer|[X]..\stopbuffer}} because it allows one to use custom buffer start and end stringscommands, instead of \{{cmd|startbuffer|[X]...\stopbuffer}}. Use this command by defining the desired buffer start command to invoke {{cmd|grabbufferdata}}. One might think that if the buffer start command calls {{cmd|grabbufferdata}}, the latter does not need to know the former. This is an understandable thought, but in the case of buffer nesting the information is still required.
== Example ==
<context source=yes mode=mkiv>
\setuppapersize[A6]\define\thisisthestart% {\grabbufferdata[mybuffer][thisisthestart][thisistheend]} % If you want to perform some action when the buffer ends% \let\thisistheend{...} 
\thisisthestart
My friendBent double, like old beggars under sacks, you would not tell with such high zestTo children ardent for some desparate gloryKnock-kneed, coughing like hags, we cursed through sludge,The old Lie: Till on the haunting flares we turned our backsAnd towards our distant rest began to trudge.\rightaligned{--- Wilfred Owen, excerpt from {\it Dulce et decorum est Pro patria mori.}}
\thisistheend
\typebufferobeylines\getbuffer[mybuffer]
</context>

Navigation menu