Thank you both, Philipp and Wolfgang, I've updated the wiki. Wolfgang wrote: > You have to give the name of begin command because context has to know it > when buffers > are nested (I will a explanation about this in another thread).
Ah, I was wondering about that. Yes, I'd be interested in the background explanation. Cheers, Sietse On Sat, Dec 15, 2012 at 1:38 PM, Wolfgang Schuster <wolfgang.schus...@gmail.com> wrote: > > Am 15.12.2012 um 11:28 schrieb Sietse Brouwer <sbbrou...@gmail.com>: > >>>> \begingroup >>>> \grabbufferdata[simplesteps][startframe][stopframe]% >>>> } >>> >>> With the \grabbufferdata command the content beginning from \startframe >>> until \stopframe is stored in a buffer with the name “simplesteps”. >> >> (1) What does the \begingroup do? I could not find a \endgroup in the >> patch, nor in the module code. >> >> (2) I've approximately documented grabbufferdata here: >> http://wiki.contextgarden.net/Command/grabbufferdata >> But when I tried to write a minimal example, I couldn't get it to compile. >> >> %% begin example >> \grabbufferdata[mybuffer][thisisthestart][thisistheend] >> \thisisthestart >> My friend, you would not tell with such high zest >> To children ardent for some desparate glory, >> The old Lie: Dulce et decorum est >> Pro patria mori. >> \thisistheend >> >> \typebuffer[mybuffer] >> %% end example >> >> What am I doing wrong? And is the description I put on the wiki correct? > > > The \grabbufferdata command reads only all text until the end command (e.g. > \thisistheend) > but the beginning command for the buffer (e.g. thisisthestart) has to be > defined by the user. > > You have to give the name of begin command because context has to know it > when buffers > are nested (I will a explanation about this in another thread). > > \starttext > > \def\thisisthestart > {\grabbufferdata[mybuffer][thisisthestart][thisistheend]} > > \thisisthestart > My friend, you would not tell with such high zest > To children ardent for some desparate glory, > The old Lie: Dulce et decorum est > Pro patria mori. > \thisistheend > > \typebuffer[mybuffer] > > \stoptext > > Wolfgang > ___________________________________________________________________________________ > 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://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > ___________________________________________________________________________________ ___________________________________________________________________________________ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________