diff options
author | Karl Berry <karl@freefriends.org> | 2013-01-23 00:17:22 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-01-23 00:17:22 +0000 |
commit | 6abfb3cf339805d52fe35992c032041d3111b90c (patch) | |
tree | 56bc3eaff0dde3ee2b9e70a5027e629502237233 /Master/texmf-dist/scripts | |
parent | 9b25c2372447eed1435f05be3b6fe77029b9d420 (diff) |
musixtex 1.15 (21jan13)
git-svn-id: svn://tug.org/texlive/trunk@28909 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts')
-rwxr-xr-x | Master/texmf-dist/scripts/musixtex/Windows/musixflx.bat | 6 | ||||
-rwxr-xr-x | Master/texmf-dist/scripts/musixtex/Windows/musixtex.bat | 6 | ||||
-rwxr-xr-x | Master/texmf-dist/scripts/musixtex/musixtex.lua | 44 |
3 files changed, 30 insertions, 26 deletions
diff --git a/Master/texmf-dist/scripts/musixtex/Windows/musixflx.bat b/Master/texmf-dist/scripts/musixtex/Windows/musixflx.bat deleted file mode 100755 index 684441ebb3d..00000000000 --- a/Master/texmf-dist/scripts/musixtex/Windows/musixflx.bat +++ /dev/null @@ -1,6 +0,0 @@ -:: wrapper script to call musixflx.lua
-:: Usage: musixflx basename[.mx1 | .tex] [debug mode]
-:: Suggested by Tomasz Luczak (Tomek) t34www@googlemail.com
-
-@for /f "delims=" %%I in ('kpsewhich --format=texmfscripts %~n0.lua') do texlua "%%I" %*
-:end
diff --git a/Master/texmf-dist/scripts/musixtex/Windows/musixtex.bat b/Master/texmf-dist/scripts/musixtex/Windows/musixtex.bat deleted file mode 100755 index 70c136972de..00000000000 --- a/Master/texmf-dist/scripts/musixtex/Windows/musixtex.bat +++ /dev/null @@ -1,6 +0,0 @@ -:: wrapper script to call musixtex.lua
-:: Usage: musixtex [options] basename[.tex]
-:: Suggested by Tomasz Luczak (Tomek) t34www@googlemail.com
-
-@for /f "delims=" %%I in ('kpsewhich --format=texmfscripts %~n0.lua') do texlua "%%I" %*
-:end
diff --git a/Master/texmf-dist/scripts/musixtex/musixtex.lua b/Master/texmf-dist/scripts/musixtex/musixtex.lua index 6bac25e8d8a..1386db71fde 100755 --- a/Master/texmf-dist/scripts/musixtex/musixtex.lua +++ b/Master/texmf-dist/scripts/musixtex/musixtex.lua @@ -1,11 +1,11 @@ #!/usr/bin/env texlua -VERSION = "0.4" +VERSION = "0.6" --[[ musixtex.lua: processes MusiXTeX files (and deletes intermediate files) - (c) Copyright 2011 Bob Tennent rdt@cs.queensu.ca + (c) Copyright 2012 Bob Tennent rdt@cs.queensu.ca This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the @@ -26,6 +26,11 @@ VERSION = "0.4" --[[ ChangeLog: + version 0.6 2012-09-14 RDT + Add -1 (one-pass [pdf][la]tex processing) option. + + version 0.5 2011-11-28 RDT + Add -i (retain intermediate files) option. version 0.4 2011-04-30 RDT Allow multiple filenames (and options). @@ -49,6 +54,8 @@ function usage() print(" -p pdfetex (or pdflatex)") print(" -d dvipdfm") print(" -s stop at dvi") + print(" -i retain intermediate files") + print(" -1 one-pass [pdf][la]tex processing") print(" -f restore default processing") end @@ -66,7 +73,9 @@ end tex = "etex" musixflx = "musixflx" dvi = "dvips" -ps2pdf = "ps2pdf" +ps2pdf = "/usr/local/bin/ps2pdf" +intermediate = 1 +passes = 2 exit_code = 0 narg = 1 @@ -94,8 +103,12 @@ repeat dvi = "dvipdfm"; ps2pdf = "" elseif this_arg == "-s" then dvi = ""; ps2pdf = "" + elseif this_arg == "-i" then + intermediate = 0 + elseif this_arg == "-1" then + passes = 1 elseif this_arg == "-f" then - tex = "etex"; dvi = "dvips"; ps2pdf = "ps2pdf" + tex = "etex"; dvi = "dvips"; ps2pdf = "ps2pdf"; intermediate = 1; passes = 2 else filename = this_arg if filename ~= "" and string.sub(filename, -4, -1) == ".tex" then @@ -106,24 +119,27 @@ repeat else print("Processing ".. filename .. ".tex.") os.remove( filename .. ".mx2" ) - if (os.execute(tex .. " " .. filename) == 0) and - (os.execute(musixflx .. " " .. filename) == 0) and + if (passes == 1 or os.execute(tex .. " " .. filename) == 0) and + (passes == 1 or os.execute(musixflx .. " " .. filename) == 0) and (os.execute(tex .. " " .. filename) == 0) and ((tex ~= "latex" and tex ~= "pdflatex") or (os.execute(tex .. " " .. filename) == 0)) and (dvi == "" or (os.execute(dvi .. " " .. filename) == 0)) and (ps2pdf == "" or (os.execute(ps2pdf .. " " .. filename .. ".ps") == 0) ) - then -- clean-up: - os.remove( filename .. ".mx1" ) - os.remove( filename .. ".mx2" ) - if dvi ~= "" then - os.remove( filename .. ".dvi" ) - end + then if ps2pdf ~= "" then print(filename .. ".pdf generated by " .. ps2pdf .. ".") - os.remove( filename .. ".ps" ) end - print("") + if intermediate == 1 then -- clean-up: + os.remove( filename .. ".mx1" ) + os.remove( filename .. ".mx2" ) + if dvi ~= "" then + os.remove( filename .. ".dvi" ) + end + if ps2pdf ~= "" then + os.remove( filename .. ".ps" ) + end + end else print("Musixtex processing of " .. filename .. ".tex fails.\n") exit_code = 2 |