diff options
author | Karl Berry <karl@freefriends.org> | 2011-04-28 22:38:29 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2011-04-28 22:38:29 +0000 |
commit | a20e7c7a16f354351041a738cca750cfde65bcda (patch) | |
tree | 8c8aea75fa6dc67370613a1e083ef48d38890d2d /Master/texmf-dist/scripts/musixtex | |
parent | 502b428dee94827e6f7db02bd8c5d1ef7984d6aa (diff) |
musixtex (28apr11)
git-svn-id: svn://tug.org/texlive/trunk@22240 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts/musixtex')
-rwxr-xr-x | Master/texmf-dist/scripts/musixtex/Windows/musixflx.bat | 3 | ||||
-rwxr-xr-x | Master/texmf-dist/scripts/musixtex/Windows/musixtex.bat | 3 | ||||
-rw-r--r-- | Master/texmf-dist/scripts/musixtex/doc/musixflx.1 | 7 | ||||
-rw-r--r-- | Master/texmf-dist/scripts/musixtex/doc/musixflx.pdf | bin | 0 -> 4339 bytes | |||
-rw-r--r-- | Master/texmf-dist/scripts/musixtex/doc/musixtex.1 | 39 | ||||
-rw-r--r-- | Master/texmf-dist/scripts/musixtex/doc/musixtex.pdf | bin | 0 -> 3951 bytes | |||
-rwxr-xr-x | Master/texmf-dist/scripts/musixtex/musixtex.lua | 66 |
7 files changed, 77 insertions, 41 deletions
diff --git a/Master/texmf-dist/scripts/musixtex/Windows/musixflx.bat b/Master/texmf-dist/scripts/musixtex/Windows/musixflx.bat index d24a84b1cc7..684441ebb3d 100755 --- a/Master/texmf-dist/scripts/musixtex/Windows/musixflx.bat +++ b/Master/texmf-dist/scripts/musixtex/Windows/musixflx.bat @@ -1,5 +1,6 @@ :: wrapper script to call musixflx.lua
-:: Usage: musixflx basename[.mx1 | .tex]
+:: 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 index ede163de69c..70c136972de 100755 --- a/Master/texmf-dist/scripts/musixtex/Windows/musixtex.bat +++ b/Master/texmf-dist/scripts/musixtex/Windows/musixtex.bat @@ -1,5 +1,6 @@ :: wrapper script to call musixtex.lua
-:: Usage: musixtex basename[.tex]
+:: 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/doc/musixflx.1 b/Master/texmf-dist/scripts/musixtex/doc/musixflx.1 index 33548ef4b88..a3c214535e2 100644 --- a/Master/texmf-dist/scripts/musixtex/doc/musixflx.1 +++ b/Master/texmf-dist/scripts/musixtex/doc/musixflx.1 @@ -5,9 +5,10 @@ musixflx \- process mx1 files (the second pass of 3-pass MusiXTeX typesetting) .SH SYNOPSIS -.RI [ texlua ] -.B musixflx.lua -.IR jobname [ .mx1 " | " .tex ] +[ texlua ] +.B musixflx[.lua] +.I jobname +[ .mx1 | .tex ] [ .I debugmode ] diff --git a/Master/texmf-dist/scripts/musixtex/doc/musixflx.pdf b/Master/texmf-dist/scripts/musixtex/doc/musixflx.pdf Binary files differnew file mode 100644 index 00000000000..506805a49c0 --- /dev/null +++ b/Master/texmf-dist/scripts/musixtex/doc/musixflx.pdf diff --git a/Master/texmf-dist/scripts/musixtex/doc/musixtex.1 b/Master/texmf-dist/scripts/musixtex/doc/musixtex.1 index e7902ab7594..1a233867a9f 100644 --- a/Master/texmf-dist/scripts/musixtex/doc/musixtex.1 +++ b/Master/texmf-dist/scripts/musixtex/doc/musixtex.1 @@ -1,40 +1,49 @@ .\" This manpage is licensed under the GNU Public License -.TH MUSIXTEX 1 2011-04-21 "musixtex version 0.2" "" +.TH MUSIXTEX 1 2011-04-25 "musixtex version 0.3" "" .SH NAME -musixtex \- processes a MusiXTeX file using [pdf]etex -> musixflx -> [pdf]etex [ -> dvips -> ps2pdf ] and -then deletes intermediate files +musixtex \- processes a MusiXTeX file and then deletes intermediate files .SH SYNOPSIS -[ -.IR texlua -] -.BR musixtex.lua +[ texlua ] +.B musixtex[.lua] [ -.IR options +.IR option ] +[ .IR jobname [ .tex ] +] .SH OPTIONS .TP 8 -.BR -v +.B -v output program name and version number, and quit .TP -.BR -h +.B -h output usage summary and quit .TP -.BR -p -changes the TeX processor from -.BR etex (1) -to +.B -p +changes the TeX processor to .BR pdfetex (1) -(and doesn't run dvips and ps2pdf) +(and doesn't run +.BR dvips (1) +and +.BR ps2pdf (1) +) +.TP +.B -d +changes the dvi processor to +.BR dvipdfm (1) +.TP +.B -s +stops processing at the dvi file .SH SEE ALSO .BR etex (1), .BR pdfetex (1), .BR musixflx (1), +.BR dvipdfm (1), .BR dvips (1), .BR ps2pdf (1). .br diff --git a/Master/texmf-dist/scripts/musixtex/doc/musixtex.pdf b/Master/texmf-dist/scripts/musixtex/doc/musixtex.pdf Binary files differnew file mode 100644 index 00000000000..8fe95568e7b --- /dev/null +++ b/Master/texmf-dist/scripts/musixtex/doc/musixtex.pdf diff --git a/Master/texmf-dist/scripts/musixtex/musixtex.lua b/Master/texmf-dist/scripts/musixtex/musixtex.lua index 3d8c4482e0f..c567af06950 100755 --- a/Master/texmf-dist/scripts/musixtex/musixtex.lua +++ b/Master/texmf-dist/scripts/musixtex/musixtex.lua @@ -1,9 +1,9 @@ #!/usr/bin/env texlua -VERSION = "0.2" +VERSION = "0.3" --[[ - musixtex.lua: runs [pdf]etex -> musixflx -> [pdfe]tex [ -> dvips -> ps2pdf ] + musixtex.lua: processes a MusiXTeX file and then deletes intermediate files (c) Copyright 2011 Bob Tennent rdt@cs.queensu.ca @@ -27,6 +27,9 @@ VERSION = "0.2" ChangeLog: + version 0.3 2011-04-25 RDT + Add -d (dvipdfm) and -s (stop at dvi) options. + version 0.2 2011-04-21 RDT Allow basename.tex as filename. Add -p option for pdfetex processing. @@ -34,14 +37,13 @@ VERSION = "0.2" --]] - -tex = "etex" -musixflx = "musixflx" -dvips = "dvips -q" -ps2pdf = "ps2pdf" - function usage() - print("Usage: [texlua] musixtex.lua [options] basename[.tex]") + print("Usage: [texlua] musixtex.lua [option] [basename[.tex]]") + print("options: -v version") + print(" -h help") + print(" -p pdfetex") + print(" -d dvipdfm") + print(" -s stop at dvi") end function whoami () @@ -49,8 +51,9 @@ function whoami () end if #arg == 0 then + whoami() usage() - os.exit(1) + os.exit(0) end narg = 1 @@ -63,9 +66,19 @@ elseif arg[narg] == "-h" then os.exit(0) end -while narg ~= #arg do +-- defaults: +tex = "etex" +musixflx = "musixflx" +dvi = "dvips -q" +ps2pdf = "ps2pdf" + +if narg < #arg then if arg[narg] == "-p" then - tex = "pdfetex" + tex = "pdfetex"; dvi = ""; ps2pdf = "" + elseif arg[narg] == "-d" then + tex = "etex"; dvi = "dvipdfm"; ps2pdf = "" + elseif arg[narg] == "-s" then + tex = "etex"; dvi = ""; ps2pdf = "" else print("Argument \"".. arg[narg] .. "\" ignored.") end @@ -94,21 +107,32 @@ end whoami() print("Processing ".. basename .. ".tex") os.remove( basename .. ".mx2" ) -if - (os.execute(tex .. " " .. basename) == 0) - and (os.execute(musixflx .. " " .. basename) == 0) - and (os.execute(tex .. " " .. basename) == 0) - and (tex == "pdfetex" or (os.execute(dvips .. " -o " .. basename ..".ps " .. basename) == 0) ) - and (tex == "pdfetex" or (os.execute(ps2pdf .. " " .. basename .. ".ps " .. basename .. ".pdf") == 0) ) +if (os.execute(tex .. " " .. basename) == 0) and + (os.execute(musixflx .. " " .. basename) == 0) and + (os.execute(tex .. " " .. basename) == 0) and + (dvi == "" or (os.execute(dvi .. " " .. basename) == 0)) and + (ps2pdf == "" or (os.execute(ps2pdf .. " " .. basename .. ".ps") == 0) ) then - print(basename .. ".pdf generated.") + if dvi ~= "" then + print(basename .. ".pdf generated.") + end exit_code = 0 else - print("musixtex processing fails.") + print("Musixtex processing fails.") +--[[ uncomment for debugging + print("tex = ", tex) + print("dvi = ", dvi) + print("ps2pdf = ", ps2pdf) +--]] exit_code = 3 end + +-- clean-up: os.remove( basename .. ".mx1" ) os.remove( basename .. ".mx2" ) -os.remove( basename .. ".dvi" ) +if dvi ~= "" then + os.remove( basename .. ".dvi" ) +end os.remove( basename .. ".ps" ) + os.exit( exit_code ) |