I have a Ruby program that does some lengthy calculations and outputs
a matrix, which I’d like to write to a Postscript or PDF using Latex
(and re-usability in some lengthier text).
I have managed to put together the Latex code using Ruby, so I can
Latex using the system command
system(‘latex ’ + filename[0…filename.index(’.’)] + ‘.tex’)
To turn it into a Postscript file, I need another command
system('dvips ' + filename[0...filename.index('.')])
This works also and creates a new Postscript file.
But now, I’d like to open a Ghostview window to show the output in the
Postscript file automatically from the same Ruby script that did all
previous work and I’d like Ghostscript to stay open even after the Ruby
system(‘gsview32 ’ + filename[0…filename.index(’.’)] +
but here nothing happens - no Ghostscript window pops up and nothing
else happens. So I still need to call Ghostscript by hand.
How could this problem be solved in Windows XP?
Is the solution any different under Linux ?
Thank you very much!