[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 file myself. When I ran first-setup.bat again, the program reported that something was missing from cygwin1.dll and that rsync.exe still could not run.

Has something changed in the minimal installation package in the last few days? This has never happened before.

Thank you.
___
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
___

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


DoFile = function(fn)
  local suc, res = pcall(function() return dofile(fn) end)

  if suc then return res
  else
-- Your handling code to come here
  end
end


Best regards,

Lukas


On Thu, 13 Dec 2012 15:52:03 +0100, Andre Caldas andre.em.cal...@gmail.com 
wrote:


Hello, Philipp!


If I load a lua file from a module using
\registerctxluafile{file}{1.001}
or
\ctxloadluafile{file}
How can I be sure the file was in fact loaded?


The related tracker output is quite comprehensive:

\enabletrackers[resolvers.locating]
\ctxloadluafile{sometest}


Nice! Thank you.
In my case, it was not being loaded because I had syntax errors in the
lua file. The file was found, but not loaded. I guess it is a very
good reason to halt!


Cheers,
André Caldas.



--
Ing. Lukáš Procházka [mailto:l...@pontex.cz]
Pontex s. r. o.  [mailto:pon...@pontex.cz] [http://www.pontex.cz]
Bezová 1658
147 14 Praha 4

Tel: +420 244 062 238
Fax: +420 244 461 038

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


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

 Honestly, it doesn’t work, but that’s a minor flaw!

Sorry! I forgot to mention. Only a little subset of it works. I have
(already - so I don't forget to) attached a tex file that works.


 [**lots of advices I will study carefully latter**]
 [...]
 I could not figure out how exactly the section block thingy is
 supposed to work. It does not create the \startframe macro at all
 -- is this something custom?

I don't know how to use this startframe yet. So, I am doing like
this right now: (numbers like 2-3 or 2- don't work yet)

=== START code snip ===
\startbuffer[simplesteps]
  \startitemize
\item First item
\uncover[2,3,4]{\item Second item}
\uncover[3,4]{\item Second item}
\uncover[4]{\item Second item}
  \stopitemize
\stopbuffer
\simplestepsplaybuffer
=== STOP code snip ===

The simplestepsplaybuffer macro simply calls the
simplesteps.playbuffer() lua function. This function plays the buffer
and determines if it has to be played again or not. If it does, then
it tex.print('\simplestepsplaybuffer').

The macros uncover determine how far the specification is from being
played. If it is being played now, then show. If it is played next,
then show in gray. And so on.


 I infer it’s about the slide title
 so I have \startframe call \section but that should be taken as a
 placeholder at most. In my own slide module I use
 \{start,stop}section with the option placehead=no and rely on the
 page header to display the slide title (i.e. current section
 running head). That was the laziest way I could imagine :P

I guess that's what I want to do. I just don't have the necessary
knowledge yet. ;-)


 Some remarks:

   - you should rename simplesteps.mkiv to t-simplesteps.mkiv,
 indicating that it is a thirdparty module

I will. I think I will have a bitbucket repository exclusively for
modules. Then I will have the proper directory structure, the proper
naming scheme and hopefully proper documentation, xml, etc. (lots of
things to learn!)


   - if you plan on expanding the code you eventually will come to
 love this bit: http://wiki.contextgarden.net/System_Macros
   - Context has a namespacing system which you might consider
 switching to in the long term:
   http://tex.stackexchange.com/q/58654
 but it’s arguably an advanced method

Well, I do want to do it the right (recommended) way!


   - maybe switch to mkvi as named parameters make rewriting
 macros a breeze

Would you elaborate a bit further?


 Is it ok if I send a PDF sample to the list?

I hope you can use the TEX file attached.


Cheers,
André Caldas.


simpletest.tex
Description: TeX document
___
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
___

[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 could ignore hyphenated words at the 
end of a line, or count it with 0.5, or whatever.


Thanks
Huseyin
___
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
___


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

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 definition uses “#1” for the argument while
the second uses “#text”.

You can force MkIV mode when you add “% macros=mkvi” at the top
of the file. When your code is a external file (e.g. a module) you can
give it “mkvi” as file extension (instead of the normal “tex” or “mkiv”)
and don’t need this line anymore.

 begin example
% macros=mkvi

\def\mkivhighlight#1{{\red #1}}

\def\mkvihighlight#text{{\green #text}}

\starttext

\mkivhighlight{MkIV}

\mkvihighlight{MkVI}

\stoptext
 end example

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
___


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 can force MkIV mode when you add “% macros=mkvi” at the top
 of the file. When your code is a external file (e.g. a module) you can
 give it “mkvi” as file extension (instead of the normal “tex” or “mkiv”)
 and don’t need this line anymore.

I had tried named parameters and I didn't know why it was not
working... now I know! :-)

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?


André Caldas.
___
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
___

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 definition uses “#1” for the argument while
 the second uses “#text”.
 
 You can force MkIV mode when you add “% macros=mkvi” at the top
 of the file. When your code is a external file (e.g. a module) you can
 give it “mkvi” as file extension (instead of the normal “tex” or “mkiv”)
 and don’t need this line anymore.
 
 I had tried named parameters and I didn't know why it was not
 working... now I know! :-)

The file extension/first line is necessary because TeX itself still expects 
numbered
parameters and context has to convert the names to numbers before TeX sees them.

To know when such a conversion is necessary the file extension is a hint for 
context.

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

\starttext
\bold{}
\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
___


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 before. In my case, if I use
\uncover[2,3]{}
I get the error: =P
! LuaTeX error main ctx instance:1: ')' expected near '3'.

system   tex  error on line 6 in file
virtual://buffer.simplesteps.5: LuaTeX error  ...

empty file


\uncover ...t('\\simplestepscoveredveryfar') end }

l.6 \uncover[2,3]
  {\item The {\em second main message} of your talk in o...
?


Cheers,
André Caldas.
___
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
___

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 :)
 
 Sorry... I didn't try it when I asked, but I had the impression I did
 try it before. In my case, if I use
 \uncover[2,3]{}
 I get the error: =P
 ! LuaTeX error main ctx instance:1: ')' expected near '3'.

You’re trying to pass a single  to Lua which doesn’t work because you use  
in your Lua code for the string.

When you change your definition for \uncover to

\unexpanded\def\uncover[#1]%
  {\ctxlua{
 distance = simplesteps.distance_to_step(\!!bs#1\!!es)
 ...
  }}

it works because the  is now only part of the string.

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
___


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

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 = end string.

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 \luaescapestring. See the
Luatex manual, section 2.3.6.

Philipp



pgp9lYpucmZ36.pgp
Description: PGP signature
___
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
___

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 \luaescapestring. See the
 Luatex manual, section 2.3.6.

The luaescapestring will also escape the quotation marks... :-)

I will use it, then.
I used to develop WEB systems. Very vulnerable to injection attacks. I
really like things properly escaped...


Cheers,
André Caldas.
___
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
___

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 changes suggested by Wolfgang and Philip you are 
going to repost your moudle?

Best regards: OK

On 14 déc. 2012, at 12:21, Andre Caldas andre.em.cal...@gmail.com wrote:

 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 welcome.
 
 Honestly, it doesn’t work, but that’s a minor flaw!
 
 Sorry! I forgot to mention. Only a little subset of it works. I have
 (already - so I don't forget to) attached a tex file that works.
 
 
 [**lots of advices I will study carefully latter**]
 [...]
 I could not figure out how exactly the section block thingy is
 supposed to work. It does not create the \startframe macro at all
 -- is this something custom?
 
 I don't know how to use this startframe yet. So, I am doing like
 this right now: (numbers like 2-3 or 2- don't work yet)
 
 === START code snip ===
 \startbuffer[simplesteps]
  \startitemize
\item First item
\uncover[2,3,4]{\item Second item}
\uncover[3,4]{\item Second item}
\uncover[4]{\item Second item}
  \stopitemize
 \stopbuffer
 \simplestepsplaybuffer
 === STOP code snip ===
 
 The simplestepsplaybuffer macro simply calls the
 simplesteps.playbuffer() lua function. This function plays the buffer
 and determines if it has to be played again or not. If it does, then
 it tex.print('\simplestepsplaybuffer').
 
 The macros uncover determine how far the specification is from being
 played. If it is being played now, then show. If it is played next,
 then show in gray. And so on.
 
 
 I infer it’s about the slide title
 so I have \startframe call \section but that should be taken as a
 placeholder at most. In my own slide module I use
 \{start,stop}section with the option placehead=no and rely on the
 page header to display the slide title (i.e. current section
 running head). That was the laziest way I could imagine :P
 
 I guess that's what I want to do. I just don't have the necessary
 knowledge yet. ;-)
 
 
 Some remarks:
 
  - you should rename simplesteps.mkiv to t-simplesteps.mkiv,
indicating that it is a thirdparty module
 
 I will. I think I will have a bitbucket repository exclusively for
 modules. Then I will have the proper directory structure, the proper
 naming scheme and hopefully proper documentation, xml, etc. (lots of
 things to learn!)
 
 
  - if you plan on expanding the code you eventually will come to
love this bit: http://wiki.contextgarden.net/System_Macros
  - Context has a namespacing system which you might consider
switching to in the long term:
  http://tex.stackexchange.com/q/58654
but it’s arguably an advanced method
 
 Well, I do want to do it the right (recommended) way!
 
 
  - maybe switch to mkvi as named parameters make rewriting
macros a breeze
 
 Would you elaborate a bit further?
 
 
 Is it ok if I send a PDF sample to the list?
 
 I hope you can use the TEX file attached.
 
 
 Cheers,
 André Caldas.
 simpletest.tex___
 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
___


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/simplesteps/
In my case, it is here:
/home/andre/context_standalone/tex/texmf-local/tex/context/third/simplesteps

2. Clear the cache.
I don't really know the proper way to do that. So, I just removed the
directory texmf-cache. In my case:
rm /home/andre/context_standalone/tex/texmf-cache/ -rf

3. Compile:
context simpletest.tex


 Maybe after you apply the changes suggested
 by Wolfgang and Philip you are going to repost your moudle?

The module will be here:
https://bitbucket.org/andrecaldas/context-simplesteps

Hopefully, one day, here... ;-)
http://modules.contextgarden.net/
I will let you know.


Cheers,
André Caldas.
___
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
___

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
  \begingroup
  \grabbufferdata[simplesteps][startframe][stopframe]%
}

\let\stopframe\simplestepsplaybuffer


Cheers,
André Caldas.
___
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
___

[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é Caldas.
___
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
___

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- (iterations 1-2 then 5-6 then 10-)


function whatever(str,n,action)
action = action or print
for s in string.gmatch(str,[^,]+) do
local a, b, c = string.match(s,^(%d+)(%-?)(%d-)$)
if c ~=  then
for i=tonumber(a),tonumber(c) do
action(i)
end
elseif b ~=  then
for i=tonumber(a),n or tonumber(a) do
action(i)
end
elseif a then
action(tonumber(a))
end
end
end

whatever(1,3-,5,function(i) print(,i) end)
whatever(1-3,6,7)
whatever(1-2,5-6,10-,30)


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


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/1c7ced45208b78289590008760daa3bac05ec503/mod/tex/context/third/simplesteps/simplesteps.lua?at=default#cl-37


Thank you,
André Caldas.
___
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
___

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 happen sometime next week)


-- utilities.parsers.stepper(1,3-,5,function(i) print(,i) end)
-- utilities.parsers.stepper(1-3,6,7)
-- utilities.parsers.stepper(1-3,6,7,function(i) print(,i) end)
-- utilities.parsers.stepper(1:3,6,7)
-- utilities.parsers.stepper( 1 : 3, ,7 )
-- utilities.parsers.stepper(1-2,5-6,25-*,30)

So:

- * as optional final value symbol
- optional spaces around : and, and around list
- - as well as :

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


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 installation package in the last few
 days? This has never happened before.

I rewrote the scripts and switched to a different server for the
distribution on 30th November. The reported problem must have been a
slight oversight that nobody noticed so far. I hope that it is fixed
now, but I didn't test if it works.

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


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 new command \startframe which calls the internal command 
\frame_start which has one optional argument.

 \def\frame_start[#1]{%
  \iffirstargument
\section{#1}%% solution needed here!
  \fi

This block checks if the optional argument is used by the user, when the 
argument is used the content is typeset as \section.

  \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”.

 \let\stopframe\simplestepsplaybuffer

This makes the \stopframe command a synonym for \simplestepsplaybuffer which is 
now called when the frame environment ends.

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
___