@echo off if .%1.==.. goto HELP pushd C:\Program Files\Lilypond\usr\bin if exist python.exe ( if exist python.exe.off del python.exe.off ren python.exe python.exe.off ) if exist python2.4.exe ( if exist python2.4.exe.off del python2.4.exe.off ren python2.4.exe python2.4.exe.off ) popd set TEXENG=pdflatex if .%2.==.-xe. ( set TEXENG=xelatex ) if .%2.==.-ps. ( set TEXENG=latex ) set TEMP=c:\usr\temp set PATH=c:\usr\python26;c:\Program Files\Lilypond\usr\bin;%PATH% if .%2.==.-ps. ( lilypond-book.py %~n1.lytex ) else ( lilypond-book.py --pdf %~n1.lytex ) if exist %~n1.tex %TEXENG% %~n1 if .%2.==.-ps. ( dvips -Pdl %~n1 call ps2pdf %~n1.ps ) set TEXENG= goto END :HELP echo Usage : %0 filename[.lytex] [-xe/-ps] :END