CTAN
Comprehensive TeX Archive Network

Direc­tory tex-archive/language/japanese/ptex2pdf

ptex2pdf.lua

Author: Nor­bert Prein­ing Web­site: http://www.prein­ing.info/blog/soft­ware-projects/ptex2pdf/ (in Ja­panese) Li­cense: GPLv2

Con­vert Ja­panese TeX doc­u­ments to pdf

De­scrip­tion

Main pur­pose of the script is easy sup­port of Ja­panese type­set­ting en­gines in TeXworks. As TeXworks type­set­ting setup does not al­low for mul­ti­step pro­cess­ing, this script runs one of the ptex based pro­grams (ptex, up­tex, ep­tex, pla­tex, up­la­tex) fol­lowed by dvipdfmx.

Usage

[texlua] ptex2pdf[.lua] { option | basename[.tex] } ... 
options: -v  version
         -h  help
         --help print full help (installation, TeXworks setup)
         -e  use eptex class of programs
         -u  use uptex class of programs
         -l  use latex based formats
         -s  stop at dvi
         -i  retain intermediate files
         -ot '<opts>' extra options for TeX
         -od '<opts>' extra options for dvipdfmx

In­stal­la­tion

Copy the file ptex2pdf.lua into a di­rec­tory where scripts are found, that is for ex­am­ple

TLROOT/texmf-dist/scripts/ptex2pdf/

(where TLROOT is for ex­am­ple the root of your TeX Live in­stal­la­tion)

Unix

cre­ate a link in one of the bin dirs to the above file, in the TeX Live case:

TLROOT/bin/ARCH/ptex2pdf -> ../../texmf-dist/scripts/ptex2pdf/ptex2pdf.lua

Win­dows

cre­ate a copy of run­script.exe as ptex2pdf.exe, in the TeX Live case:

copy TLROOT/bin/win32/runscript.exe TLROOT/bin/win32/ptex2pdf.exe

TeXworks setup

Un­der Pref­er­ences > Type­set­ting add new en­tries, for ex­am­ple:

for ptex files:

Set­ting Value
Name: pTeX to pdf
Pro­gram: ptex2pdf
Ar­gu­ments: -ot
$sync­tex­op­tion
$full­name

for pla­tex files:

Set­ting Value
Name: pLaTeX to pdf
Pro­gram: ptex2pdf
Ar­gu­ments: -l
-ot
$sync­tex­op­tion
$full­name

for up­tex files:

Set­ting Value
Name: upTeX to pdf
Pro­gram: ptex2pdf
Ar­gu­ments: -u
-ot
$sync­tex­op­tion
$full­name

for up­la­tex files:

Set­ting Value
Name: upLaTeX to pdf
Pro­gram: ptex2pdf
Ar­gu­ments: -l
-u
-ot
$sync­tex­op­tion
$full­name

If you need spe­cial kanji en­cod­ings for one of these pro­grams, add the re­spec­tive -kanji op­tion af­ter the $synctexoption. Ex­am­ple:

for pla­tex files in SJIS en­cod­ing:

Set­ting Value
Name: pLaTeX/SJIS to pdf
Pro­gram: ptex2pdf
Ar­gu­ments: -l
-ot
$sync­tex­op­tion -kanji=sjis
$full­name

Devel­op­ment place

http://github.com/nor­bu­san/ptex2pdf

Changelog

  • ver­sion 0.1 2013-03-08 NP Ini­tial re­lease on blog
  • ver­sion 0.2 2013-03-10 NP im­port into git repos­i­tory sup­port pass­ing op­tions on to tex and dvipdfm add README with TeXworks con­fig op­tions
  • ver­sion 0.3 2013-05-01 NP in­clude the readme in the lua code fix pro­gram name for -e -u
  • ver­sion 0.4 2013-05-07 NP quote the file­name with ", so that spe­cial chars do sur­vive add an ex­am­ple for TeXworks for files with dif­fer­ent kanji en­cod­ing
  • ver­sion 0.5 2014-11-05 NP on Win­dows: set com­mandlineen­cod­ing to utf8 when run­ning up­tex (patch by Akira Kakuto)
  • ver­sion 0.6 2015-03-08 NP cyg­win didn't like the (ac­ci­den­tally in­serted) spaces af­ter the texlua in the she­bang line, and stopped work­ing with "no such pro­gram: "texlua " ..."
  • ver­sion 0.7dev 2015-XX-XX move to github as gi­to­ri­ous will be closed, adapt help out­put to gen­er­ate github fla­vored mark­down check for files us­ing kpath­sea in­stead of open­ing di­rectly, to al­low for in­put of files found by kpath­sea (closes github is­sue 1)

Copy­right and Li­cense

Orig­i­nally based on musix­tex.lua from Bob Ten­nent.

(c) Copy­right 2012 Bob Ten­nent rdt@cs.queensu.ca (c) Copy­right 2013-2015 Nor­bert Prein­ing nor­bert@prein­ing.info

This pro­gram is free soft­ware; you can re­dis­tribute it and/or mod­ify it un­der the terms of the GNU Gen­eral Public Li­cense as pub­lished by the Free Soft­ware Foun­da­tion; ei­ther ver­sion 2 of the Li­cense, or (at your op­tion) any later ver­sion.

This pro­gram is dis­tributed in the hope that it will be use­ful, but WITHOUT ANY WARRANTY; with­out even the im­plied war­ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Gen­eral Public Li­cense for more de­tails.

You should have re­ceived a copy of the GNU Gen­eral Public Li­cense along with this pro­gram; if not, write to the Free Soft­ware Foun­da­tion, Inc., 51 Franklin Street, Fifth Floor, Bos­ton, MA 02110-1301, USA.

Files

Name Size Date Notes
COPYING 18092 2015-04-29 22:25
README 4843 2015-04-29 22:25
README.md 5268 2015-04-29 22:25
ptex2pdf.lua 9680 2015-04-29 22:25

Down­load the con­tents of this pack­age in one zip archive (14.3k).

ptex2pdf – Con­vert Ja­panese TeX doc­u­ments to PDF

The Lua script pro­vides sys­tem-in­de­pen­dent sup­port of Ja­panese type­set­ting en­gines in TeXworks. As TeXworks type­set­ting setup does not al­low for mul­ti­step pro­cess­ing, this script runs one of the ptex-based pro­grams (ptex, up­tex, ep­tex, pla­tex, up­la­tex) fol­lowed by dvipdfmx.

Pack­age De­tailsptex2pdf
Ver­sion0.7 2015-04-29
Li­censeGNU Gen­eral Public Li­cense, ver­sion 2
Copy­right2012 Bob Ten­nent
Main­tainerNor­bert Prein­ing
Con­tained inTeX Live as ptex2pdf
Topics sup­port for type­set­ting Ja­panese
the doc­u­ment com­pi­la­tion pro­cess
Guest Book Sitemap Contact Contact Author