[OS X TeX] TeXShop 'personal script' for MusiXTeX - help!

soda beverage mail service tex at soda.orange-carb.org
Wed Sep 11 12:41:16 EDT 2002


I'm trying to write a "personal script" for TeXShop that will let me use it
for processing MusiXTeX files
(http://icking-music-archive.sunsite.dk/software/indexmt6.html).  Using MusiXTeX
on the command line works fine -- it's a three-pass process that looks like
this (musixflx is an executable that comes with MusiXTeX):

pdftex myfile.tex
musixflx myfile.tex
pdftex myfile.tex

I really like TeXShop's syntax colouring as I'm still rather new at all this,
so I tried setting musixflx as my "personal script"; in that case, if I use
the Typeset window to switch back and forth between "Pdftex" and "Personal
Script", everything works great.  What I'd really like, though, is to write a
single "personal script" that accomplishes all three passes.  However, I've
now tried writing a perl script do to this and am having trouble understanding
what TeXShop expects from a "personal script". Is it not just passing the name
of the .tex file as an argument?  If so, shouldn't my script (below) work?

The script works fine if I use it on the command line.

In TeXShop, in both cases, the console comes up blank and no output file is
generated (my script doesn't seem to be called at all).  The script file is
definitely in my path (it's in the same directory as musixflx which, as I said,
works fine).

Any help on this would be appreciated!

Dan Friedman

musixtex.pl (expects tex file name as an arg; "musixtex.pl myfile.tex" works
fine from the command line):


cmd("pdftex", $ARGV[0]);
cmd("musixflx", $ARGV[0]);
cmd("pdftex", $ARGV[0]);

sub cmd {

	my ($cmd, $file) = @_;

    print STDERR "\n'$cmd $file'...\n";
    open CMD, "$cmd $file 2>&1 |"
            or die "Uh-oh: $!";

    while (<CMD>) {
    	print STDERR "$_";
    print STDERR "\n...finished '$cmd $file'.\n";

Mac TeX info, resources, and news can be found at:
List archives can be found at:
Threaded list archives can be found at:
See message headers for list info.

More information about the MacOSX-TeX mailing list