summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-06-22 22:34:15 +0000
committerKarl Berry <karl@freefriends.org>2017-06-22 22:34:15 +0000
commitd0f733c30d5967dc2a18e0879479b8fc7d85aabc (patch)
tree234d463a30865f15257f51eac6c12fb98ece3e1a /Master
parent4680f763118709c8f62a781c1c49fb27f47d98a9 (diff)
ptex2pdf (22jun17)
git-svn-id: svn://tug.org/texlive/trunk@44664 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/ptex2pdf/README.md2
-rwxr-xr-xMaster/texmf-dist/scripts/ptex2pdf/ptex2pdf.lua13
2 files changed, 11 insertions, 4 deletions
diff --git a/Master/texmf-dist/doc/latex/ptex2pdf/README.md b/Master/texmf-dist/doc/latex/ptex2pdf/README.md
index 44ac4ec1856..57908ef7ff1 100644
--- a/Master/texmf-dist/doc/latex/ptex2pdf/README.md
+++ b/Master/texmf-dist/doc/latex/ptex2pdf/README.md
@@ -158,6 +158,8 @@ http://github.com/texjporg/ptex2pdf
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
## Copyright and License ##
diff --git a/Master/texmf-dist/scripts/ptex2pdf/ptex2pdf.lua b/Master/texmf-dist/scripts/ptex2pdf/ptex2pdf.lua
index 395bac6c0a4..9885f044aa7 100755
--- a/Master/texmf-dist/scripts/ptex2pdf/ptex2pdf.lua
+++ b/Master/texmf-dist/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 .. ".")