At present my musixtex.cmd contains this (thanks to David Allsopp, 28 Jan 2008):

@echo off
if not exist %1.tex goto :EOF
if exist %1.mx2 del %1.mx2
@tex %1 && @musixflx %1 && @tex %1 && @dvips -q* -tA4 %1 && @ps2pdf -sPAPERSIZE#a4 -r300 %1.ps 
%1.pdf && @start " " %1.pdf
:end

because I want to view the .pdf immediately if there is no TeX error
(I like Acrobat Reader better than yap as a viewer).

The trouble is that if I left the previous Acrobat window open, the current call to MiKTeX Ghostscript ps2pdf fails because my .pdf file cannot be overwritten, and I stay with the previous version displayed.

How can my musixtex.cmd automatically test if my .pdf file is being accessed to, and if yes, kill my Acrobat reader task so Ghostscript can
make the new one? I'm under XP.

Regards,

Jean-Pierre Coulon                  [email protected]
_______________________________________________
[email protected] mailing list
http://mailman.nfit.au.dk/mailman/listinfo/icking-music-archive.org-tex-music

Reply via email to