Re: [NTG-context] Problem calling system

2012-05-17 Thread Procházka Lukáš Ing . - Pontex s . r . o .
... Finally, I use the following to avoid ' in arguments and to keep " to os.execute(): \bgroup \catcode`\%=11 \ctxlua{os.execute(([[echo lua -e "print 'EXECUTE'"]]):gsub("'(.-)'", "[[%1]]"))} \egroup % Or: \startluacode os.execute(([[echo lua -e "print 'EXECUTE'"]]):gsub("'(.-)'",

Re: [NTG-context] Problem calling system

2012-05-15 Thread luigi scarso
On Tue, May 15, 2012 at 1:46 PM, Procházka Lukáš Ing. - Pontex s. r. o. wrote: > ... I also tried: > > > \write18{echo 'AAA'} > > \starttext >   A > \stoptext > > > Which gives: > > " > ... > backend         > xmp > using file > 'c:/ConTeXt/tex/texmf-context/tex/context/base/lpdf-pdx.xml

Re: [NTG-context] Problem calling system

2012-05-15 Thread Procházka Lukáš Ing . - Pontex s . r . o .
... I also tried: \write18{echo 'AAA'} \starttext A \stoptext Which gives: " ... backend > xmp > using file 'c:/ConTeXt/tex/texmf-context/tex/context/base/lpdf-pdx.xml' "AAA" pages > flushing realpage 1, userpage 1 ... " So it can be seen that ' changes to " ev

Re: [NTG-context] Problem calling system

2012-05-15 Thread Hans Hagen
On 15-5-2012 10:34, Procházka Lukáš Ing. - Pontex s. r. o. wrote: languages > language en is active lua -e "print "EXECUTE"" lua -e "print 'EXEC'" you can try texlua instead of lua to see what happens system | total runtime: 0.609 " Interesting that the string to be passed to 'os.exec' keep

Re: [NTG-context] Problem calling system

2012-05-15 Thread Procházka Lukáš Ing . - Pontex s . r . o .
probably some os.execute parsing ... Do you mean Lua itself does the parsing and substitution? I guessed [lua]tex core... When I try to call on the command line: " C:\Lukas\ConTeXt\TestDDv>lua Lua 5.1.4 Copyright (C) 1994-2008 Lua.org, PUC-Rio os.execute([[lua -e "print 'WWW'"]]) WWW os.e

Re: [NTG-context] Problem calling system

2012-05-15 Thread Hans Hagen
On 15-5-2012 09:05, Procházka Lukáš Ing. - Pontex s. r. o. wrote: Hello, I slightly modified the example - my code now is: \ctxlua{os.execute([[echo lua -e "print 'WWW'"]])} \starttext A \stoptext So now I'm able to diagnose what exactly is passed to the command line. I'm getting:

Re: [NTG-context] Problem calling system

2012-05-15 Thread Procházka Lukáš Ing . - Pontex s . r . o .
Hello, I slightly modified the example - my code now is: \ctxlua{os.execute([[echo lua -e "print 'WWW'"]])} \starttext A \stoptext So now I'm able to diagnose what exactly is passed to the command line. I'm getting: " ... languages > language en is active lua -e "print "WWW

Re: [NTG-context] Problem calling system

2012-05-14 Thread Hans Hagen
On 14-5-2012 12:23, Procházka Lukáš Ing. - Pontex s. r. o. wrote: \ctxlua{os.execute(lua -e "require 'lfs'")} \ctxlua{os.execute([[lua -e "require 'lfs'"]])} - Hans Hagen | PRAGMA ADE

Re: [NTG-context] Problem calling system

2012-05-14 Thread Procházka Lukáš Ing . - Pontex s . r . o .
\ctxlua{os.execute(lua -e "require 'lfs'")} ... Gives: " ... fonts > latin modern fonts are not preloaded languages > language en is active ! LuaTeX error :1: attempt to call global 'e' (a nil value) stack traceback: :1: in main chunk. system > tex > error on l

Re: [NTG-context] Problem calling system

2012-05-14 Thread Hans Hagen
On 14-5-2012 10:56, Procházka Lukáš Ing. - Pontex s. r. o. wrote: Hello, I'd need to call the OS, namely lua in it. I have the following code: \write18{lua -e "require 'lfs'"} \write18{lua -e require'lfs'} \starttext A \stoptext When calling directly from the command line lua -e "

[NTG-context] Problem calling system

2012-05-14 Thread Procházka Lukáš Ing . - Pontex s . r . o .
Hello, I'd need to call the OS, namely lua in it. I have the following code: \write18{lua -e "require 'lfs'"} \write18{lua -e require'lfs'} \starttext A \stoptext When calling directly from the command line lua -e "require 'lfs'" - there is no error. From within the Context cod