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

2012-12-14 Thread Wolfgang Schuster
Am 15.12.2012 um 00:07 schrieb 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} This creates the new command \startfra

Re: [NTG-context] Cannot Install Win Minimals: rsync.exe

2012-12-14 Thread Mojca Miklavec
On Thu, Dec 13, 2012 at 12:38 AM, DB wrote: > Hello, > > I have just encountered a problem with the Windows minimals. I downloaded > the current version today and ran first-setup.bat. The installation failed > and reported that cygiconv-2.dll was missing ... > Has something changed in the minimal i

Re: [NTG-context] Regular expressions in Lua.

2012-12-14 Thread Hans Hagen
On 12/15/2012 2:10 AM, Andre Caldas wrote: Hello, Hans! I had just managed to do it. I will switch to yours instead of mine... I don't have any experience in Lua. Sorry for bothering with such easy requests... As ranges are sometimes handy I've added a parser to the core (no upload yet, will

Re: [NTG-context] Regular expressions in Lua.

2012-12-14 Thread Andre Caldas
Hello, Hans! I had just managed to do it. I will switch to yours instead of mine... I don't have any experience in Lua. Sorry for bothering with such easy requests... By the way, simplesteps recognizes number ranges! :-) https://bitbucket.org/andrecaldas/context-simplesteps/src/1c7ced45208b782895

Re: [NTG-context] Regular expressions in Lua.

2012-12-14 Thread Hans Hagen
On 12/15/2012 1:12 AM, Andre Caldas wrote: Hi! I have to use pattern matching in lua. I tried the function "string.gmatch". I want to match (iterate over) strings of the type ([0-9]+)(-([0-9]*))?(,|$) For example: 1,3- (iterations: 1 and 3-) 1-3,6,7 (iterations: 1-3 then 6 then 7) 1-2,5-6,10-

[NTG-context] Regular expressions in Lua.

2012-12-14 Thread Andre Caldas
Hi! I have to use pattern matching in lua. I tried the function "string.gmatch". I want to match (iterate over) strings of the type ([0-9]+)(-([0-9]*))?(,|$) For example: 1,3- (iterations: 1 and 3-) 1-3,6,7 (iterations: 1-3 then 6 then 7) 1-2,5-6,10- (iterations 1-2 then 5-6 then 10-) André Cal

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 \be

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 texmf-local/tex/context/third/simp

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
> 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

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

2012-12-14 Thread Philipp Gesang
· > > \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. These ex

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 Wolfgang Schuster
Am 14.12.2012 um 17:18 schrieb 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..

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 d

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

2012-12-14 Thread Wolfgang Schuster
Am 14.12.2012 um 16:43 schrieb 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

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 “#t

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

2012-12-14 Thread Wolfgang Schuster
Am 14.12.2012 um 12:21 schrieb 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

[NTG-context] CRITICAL EDITIONS MODULE

2012-12-14 Thread MANUEL GONZALEZ SUAREZ
HelloI would get the module "CritTeXt" Idris Samawi. I have the documentation but still does not appear on the "ConTeXt wiki". I think it may be interesting to develop critical editions.Thanks to all-- Manuel González Suárez __

[NTG-context] Count the words per line

2012-12-14 Thread H. Özoguz
I am setting with grid-set, and I am wondering, if there is a possibility to count the number of words in the lines (not for each single line, but in average over all lines). That would be helpful to get a perfectly readably book (words per row is one of these readability-measures). That tool c

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 v

Re: [NTG-context] Loading lua file.

2012-12-14 Thread Procházka Lukáš Ing . - Pontex s . r . o .
Hello, I'm using this if loading failure is not fatal: DoFile = function(fn) return pcall(function() return dofile(fn) end) end DoFile("MyFile.lua") -- instead of 'dofile("MyFile.lua")' You can play with handling error code (http://www.lua.org/manual/5.1/manual.html#pdf-pcall): -

[NTG-context] Cannot Install Win Minimals: rsync.exe

2012-12-14 Thread DB
Hello,   I have just encountered a problem with the Windows minimals. I downloaded the current version today and ran first-setup.bat. The installation failed and reported that cygiconv-2.dll was missing and that rsync.exe could not work without it. So I went to the official cygwin site and got the