F
felix.leg
Hi,
I want to use Ruby with latex,so I wrote a simple program which waits
for "\typein" command called from pdflatex:
<CODE>
#!/usr/bin/ruby
file = IO.popen('pdflatex -interaction scrollmode test.tex','r+') #1
until file.readline.include? 'typein'; end
file.write "a line from RUBY"
file.readlines #2
file.close
</CODE>
If I run the command from #1 in a sheel it works right: scrolls
"standard" latex asks, and stops for my "\@typein=". After I answer it
continues normally.
But when I want do the same in Ruby with above code, it hangs out
waiting for input. It looks like #2 causes this, but I don't know why...
I want to use Ruby with latex,so I wrote a simple program which waits
for "\typein" command called from pdflatex:
<CODE>
#!/usr/bin/ruby
file = IO.popen('pdflatex -interaction scrollmode test.tex','r+') #1
until file.readline.include? 'typein'; end
file.write "a line from RUBY"
file.readlines #2
file.close
</CODE>
If I run the command from #1 in a sheel it works right: scrolls
"standard" latex asks, and stops for my "\@typein=". After I answer it
continues normally.
But when I want do the same in Ruby with above code, it hangs out
waiting for input. It looks like #2 causes this, but I don't know why...