Re: [NTG-context] New module: simplesteps.

2012-12-15 Thread Sietse Brouwer
\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

Re: [NTG-context] New module: simplesteps.

2012-12-15 Thread Philipp Gesang
···date: 2012-12-15, Saturday···from: Sietse Brouwer··· \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

Re: [NTG-context] New module: simplesteps.

2012-12-15 Thread Andre Caldas
%% 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

Re: [NTG-context] New module: simplesteps.

2012-12-15 Thread Marco Patzer
On 2012–12–15 Sietse Brouwer wrote: 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

Re: [NTG-context] New module: simplesteps.

2012-12-15 Thread Hans Hagen
On 12/15/2012 7:02 AM, Wolfgang Schuster wrote: Am 15.12.2012 um 00:07 schrieb Andre Caldas andre.em.cal...@gmail.com: thanks for the interesting contribution! Have a look at the patch I hopefully don’t forget to append. I didn't quite understood how this works:

Re: [NTG-context] New module: simplesteps.

2012-12-15 Thread Wolfgang Schuster
Am 15.12.2012 um 12:49 schrieb Hans Hagen pra...@wxs.nl: (dangerous name: \startframe ... could be core name) It depends, using it asa global name isa no go but defining it inside group is useful, e.g. \def\mycommand_start {\begingroup \let\startframe\mycommand_frame_start

Re: [NTG-context] New module: simplesteps.

2012-12-15 Thread Wolfgang Schuster
Am 15.12.2012 um 11:40 schrieb Philipp Gesang philipp.ges...@alumni.uni-heidelberg.de: ···date: 2012-12-15, Saturday···from: Sietse Brouwer··· \begingroup \grabbufferdata[simplesteps][startframe][stopframe]% } With the \grabbufferdata command the content beginning from \startframe

Re: [NTG-context] New module: simplesteps.

2012-12-15 Thread Philipp Gesang
···date: 2012-12-15, Saturday···from: Wolfgang Schuster··· Am 15.12.2012 um 11:40 schrieb Philipp Gesang philipp.ges...@alumni.uni-heidelberg.de: ···date: 2012-12-15, Saturday···from: Sietse Brouwer··· \begingroup \grabbufferdata[simplesteps][startframe][stopframe]% } With

Re: [NTG-context] New module: simplesteps.

2012-12-15 Thread Wolfgang Schuster
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

Re: [NTG-context] New module: simplesteps.

2012-12-15 Thread Sietse Brouwer
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

Re: [NTG-context] New module: simplesteps.

2012-12-14 Thread Andre Caldas
Hello! thanks for the interesting contribution! Have a look at the patch I hopefully don’t forget to append. Thank you! I will take a look and learn... ;-) [...] I use \startbuffer and \stopbuffer, and also Lua. As I said, I don't really know how to write a module... comments are very

Re: [NTG-context] New module: simplesteps.

2012-12-14 Thread Wolfgang Schuster
Am 14.12.2012 um 12:21 schrieb Andre Caldas andre.em.cal...@gmail.com: - maybe switch to mkvi as named parameters make rewriting macros a breeze Would you elaborate a bit further? You can use for the parameter in your macros names instead of number, as you can see below the first

Re: [NTG-context] New module: simplesteps.

2012-12-14 Thread Andre Caldas
- maybe switch to mkvi as named parameters make rewriting macros a breeze Would you elaborate a bit further? You can use for the parameter in your macros names instead of number, as you can see below the first definition uses “#1” for the argument while the second uses “#text”. You

Re: [NTG-context] New module: simplesteps.

2012-12-14 Thread Wolfgang Schuster
Am 14.12.2012 um 16:43 schrieb Andre Caldas andre.em.cal...@gmail.com: - maybe switch to mkvi as named parameters make rewriting macros a breeze Would you elaborate a bit further? You can use for the parameter in your macros names instead of number, as you can see below the first

Re: [NTG-context] New module: simplesteps.

2012-12-14 Thread Andre Caldas
I have one question: - What does it happen when there is a quotation mark () inside the parameter? Do I need to escape the contents passed to the macro? No you don’t have to but you could have checked yourself :) Sorry... I didn't try it when I asked, but I had the impression I did try it

Re: [NTG-context] New module: simplesteps.

2012-12-14 Thread Wolfgang Schuster
Am 14.12.2012 um 17:18 schrieb Andre Caldas andre.em.cal...@gmail.com: I have one question: - What does it happen when there is a quotation mark () inside the parameter? Do I need to escape the contents passed to the macro? No you don’t have to but you could have checked yourself :)

Re: [NTG-context] New module: simplesteps.

2012-12-14 Thread Andre Caldas
\unexpanded\def\uncover[#1]% {\ctxlua{ distance = simplesteps.distance_to_step(\!!bs#1\!!es) ... }} it works because the is now only part of the string. Thanks. That's what I needed. I guess bs = begin string es = end string. Cheers, André Caldas.

Re: [NTG-context] New module: simplesteps.

2012-12-14 Thread Philipp Gesang
···date: 2012-12-14, Friday···from: Andre Caldas··· \unexpanded\def\uncover[#1]% {\ctxlua{ distance = simplesteps.distance_to_step(\!!bs#1\!!es) ... }} it works because the is now only part of the string. Thanks. That's what I needed. I guess bs = begin string es

Re: [NTG-context] New module: simplesteps.

2012-12-14 Thread Andre Caldas
These expand to Lua long strings, [===[ and ]===] respectively, without checking, so theoretically the same issue will arise iff your string contains ]===]. I consider the likelihood for this to happen to be too low to bother, but if you want to be absolutely on the safe side you can also use

Re: [NTG-context] New module: simplesteps.

2012-12-14 Thread Otared Kavian
Hi André, You were so quick to write your module… Thanks for sharing, but I could not typeset the example file you sent: I didn't get whether your file simplesteps.mkiv should be renamed simplesteps.mkiv or simplesteps.tex or even t-simplesteps.tex or any other suffix. Maybe after you apply the

Re: [NTG-context] New module: simplesteps.

2012-12-14 Thread Andre Caldas
Hello, OK! You were so quick to write your module… Thanks for sharing, :-) but I could not typeset the example file you sent: I didn't get whether your file simplesteps.mkiv should be renamed I did this on my machine: 1. Copy simplesteps.{lua,mkiv} to

Re: [NTG-context] New module: simplesteps.

2012-12-14 Thread Andre Caldas
thanks for the interesting contribution! Have a look at the patch I hopefully don’t forget to append. I didn't quite understood how this works: \unexpanded\def\startframe{\dosingleempty\frame_start} \def\frame_start[#1]{% \iffirstargument \section{#1}%% solution needed here! \fi

Re: [NTG-context] New module: simplesteps.

2012-12-14 Thread Wolfgang Schuster
Am 15.12.2012 um 00:07 schrieb Andre Caldas andre.em.cal...@gmail.com: thanks for the interesting contribution! Have a look at the patch I hopefully don’t forget to append. I didn't quite understood how this works: \unexpanded\def\startframe{\dosingleempty\frame_start} This creates the

[NTG-context] New module: simplesteps.

2012-12-13 Thread Andre Caldas
Well since Raw Steps did not work with mkiv, I tried making a very very simple module for a beamer-like behaviour. I don't really know how to write a module... but here is what I did:

Re: [NTG-context] New module: simplesteps.

2012-12-13 Thread Philipp Gesang
Hey André, thanks for the interesting contribution! Have a look at the patch I hopefully don’t forget to append. ···date: 2012-12-13, Thursday···from: Andre Caldas··· Well since Raw Steps did not work with mkiv, I tried making a very very simple module for a beamer-like behaviour. I