[NTG-context] texexec

Aditya Mahajan adityam at umich.edu
Mon May 8 02:37:25 CEST 2006

On Sun, 7 May 2006, Hans Hagen wrote:

> Aditya Mahajan wrote:
>> On Sun, 7 May 2006, Hans Hagen wrote:
>>> Aditya Mahajan wrote:
>>>> On Fri, 5 May 2006, Hans Hagen wrote:
>>>>> Hi,
>>>>> I'd like to make the ruby version of texexec the default. Are there any
>>>>> strong objections to this?
>>>> Is ruby stable with respect to system calls? Is the behaviour
>>>> consistent on Linux and Windows? Are there active Ruby users on the
>>>> list who can comment on this?
>>> we run newtexexec on windows and linux without problems (system calls in
>>> perl are actually more problematic, or at least in th epast few years
>>> differences between platforms have given me many headaches)
>>>> I have debugged my recent failure of metapost graphics to using
>>>> one-click installer (RC2) for windows. From tex.rb
>>>>    report(command) if getvariable('verbose')
>>>>    ok = system(command)
>>>>    if ok && File.appended(mptex, "\\end\n") then
>>>> This is failing on my system. Can others using windows test this.
>>> you mean that ok is false?
>> Yes. For some reason, system(...) returns false whenever there is > in
>> the command. Maybe, in the future, the functionality of mpto can be
>> incorporated into (new)texexec. This is not needed right away, as I
>> managed to get rid of the mess in my system by using cygwin binaries
>> for ruby.
> how about using the code:
>                File.silentdelete(mptex)
>                command = "mpto #{mpname} > #{mptex}"
>                report(command) if getvariable('verbose')
>                ok = system(command)
>                # not "ok && ..." because of potential problem with
> return code and redirect (>)
>                if FileTest.file?(mptex) && File.appended(mptex,
> "\\end\n") then
> so, instead of testing for a return code we test for a file existence

That will also not work as the system command fails. mptex file is 
never creaeted, so FileTest.file?(mptex) will also return false.

>> I am still confused on why windows ruby have trouble with cgywin being
>> present, but I will leave debugging that to future. Right now,
>> newtexec is working correctly.
> well, the problem is probably cygwin being present -)

True. It is a ruby issue. I guess, if one has cygwin installed, then 
use ruby cygwin. There are some ruby gems that do not work with 
cygwin-ruby and need the windows-ruby. But, I can manage without them, 
but not without context :)

Aditya Mahajan, EECS Systems, University of Michigan
http://www.eecs.umich.edu/~adityam || Ph: 7342624008

More information about the ntg-context mailing list