diff options
author | Karl Berry <karl@freefriends.org> | 2017-06-22 22:34:15 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-06-22 22:34:15 +0000 |
commit | d0f733c30d5967dc2a18e0879479b8fc7d85aabc (patch) | |
tree | 234d463a30865f15257f51eac6c12fb98ece3e1a /Build/source/texk | |
parent | 4680f763118709c8f62a781c1c49fb27f47d98a9 (diff) |
ptex2pdf (22jun17)
git-svn-id: svn://tug.org/texlive/trunk@44664 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk')
-rwxr-xr-x | Build/source/texk/texlive/linked_scripts/ptex2pdf/ptex2pdf.lua | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/Build/source/texk/texlive/linked_scripts/ptex2pdf/ptex2pdf.lua b/Build/source/texk/texlive/linked_scripts/ptex2pdf/ptex2pdf.lua index 395bac6c0a4..9885f044aa7 100755 --- a/Build/source/texk/texlive/linked_scripts/ptex2pdf/ptex2pdf.lua +++ b/Build/source/texk/texlive/linked_scripts/ptex2pdf/ptex2pdf.lua @@ -1,7 +1,7 @@ #!/usr/bin/env texlua NAME = "ptex2pdf[.lua]" -VERSION = "20170604.0" +VERSION = "20170622.0" AUTHOR = "Norbert Preining" AUTHOREMAIL = "norbert@preining.info" SHORTDESC = "Convert Japanese TeX documents to pdf" @@ -172,6 +172,8 @@ CHANGELOG = [[ start version number in the format YYYYMMDD.0 better support for cp932 windows filenames first replace all backslash chars to slash chars +- version 20170622.0 + pass all non-optional arguments before filename to TeX engine ]] @@ -270,6 +272,7 @@ use_eptex = 0 use_uptex = 0 use_latex = 0 outputdir = "." +prefilename = "" filename = "" bname = "" exit_code = 0 @@ -323,8 +326,10 @@ repeat if filename == "" then filename = this_arg else - print("Multiple filename arguments, only one can be processed, exiting.") - os.exit(1) + -- when emacs tex-mode is used, this will help store "\nonstopmode\input" + print("Multiple filename arguments? OK, I'll take the latter one.") + prefilename = prefilename .. " \"" .. filename .. "\"" + filename = this_arg end end --if this_arg == ... narg = narg+1 @@ -412,7 +417,7 @@ if (outputdir ~= ".") then dvipdfopts = "-o \"" .. bname .. ".pdf\"" end print("Processing ".. filename) -if (os.execute(tex .. " " .. texopts .. " \"" .. filename .. "\"") == 0) and +if (os.execute(tex .. " " .. texopts .. prefilename .. " \"" .. filename .. "\"") == 0) and (dvipdf == "" or (os.execute(dvipdf .. " " .. dvipdfopts .. " \"" .. bname .. ".dvi" .. "\"") == 0)) then if dvipdf ~= "" then print(bname .. ".pdf generated by " .. dvipdf .. ".") |