From 2efc5dd6b50aaf251dbf029ce7e738f385a57d79 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 7 May 2013 23:12:20 +0000 Subject: ptex2pdf (7may13) git-svn-id: svn://tug.org/texlive/trunk@30321 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/scripts/ptex2pdf/ptex2pdf.lua | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'Master/texmf-dist/scripts/ptex2pdf') diff --git a/Master/texmf-dist/scripts/ptex2pdf/ptex2pdf.lua b/Master/texmf-dist/scripts/ptex2pdf/ptex2pdf.lua index 618a4ec713e..46e42fa9cf8 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 = "0.3" +VERSION = "0.4" AUTHOR = "Norbert Preining " SHORTDESC = NAME .. ": Convert Japanese TeX documents to pdf" LONGDESC = [[ @@ -94,6 +94,17 @@ for uplatex files: -ot $synctexoption $fullname + +If you need special kanji encodings for one of these programs, +add the respective -kanji option after the $synctexoption. Example: + +for platex files in SJIS encoding: + Name: pLaTeX/SJIS to pdf + Program: ptex2pdf + Arguments: -l + -ot + $synctexoption -kanji=sjis + $fullname ]] DEVELPLACE = "https://git.gitorious.org/tlptexlive/ptex2pdf.git" @@ -108,6 +119,9 @@ CHANGELOG = [[ version 0.3 2013-05-01 NP include the readme in the lua code fix program name for -e -u + version 0.4 2013-05-07 NP + quote the filename with ", so that special chars do survive + add an example for TeXworks for files with different kanji encoding ]] @@ -239,8 +253,8 @@ if not io.open(filename .. ".tex", "r") then exit_code = 1 else print("Processing ".. filename .. ".tex.") - if (os.execute(tex .. " " .. texopts .. " " .. filename) == 0) and - (dvipdf == "" or (os.execute(dvipdf .. " " .. dvipdfopts .. " " .. filename) == 0)) + if (os.execute(tex .. " " .. texopts .. " \"" .. filename .. "\"") == 0) and + (dvipdf == "" or (os.execute(dvipdf .. " " .. dvipdfopts .. " \"" .. filename .. "\"") == 0)) then if dvipdf ~= "" then print(filename .. ".pdf generated by " .. dvipdf .. ".") -- cgit v1.2.3