CTAN
Comprehensive TeX Archive Network

Direc­tory language/japanese/ptex2pdf

README.md

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 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 works. As works 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, eu­p­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
         -output-directory '<dir>' directory for created files

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 Live in­stal­la­tion)

Unix

cre­ate a link in one of the bin dirs to the above file, in the 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 Live case:

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

works setup

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

for ptex files:

Set­ting Value
Name: p (ptex2pdf)
Pro­gram: ptex2pdf
Ar­gu­ments: -ot
$sync­tex­op­tion
$full­name

for pla­tex files:

Set­ting Value
Name: p (ptex2pdf)
Pro­gram: ptex2pdf
Ar­gu­ments: -l
-ot
$sync­tex­op­tion
$full­name

for up­tex files:

Set­ting Value
Name: up (ptex2pdf)
Pro­gram: ptex2pdf
Ar­gu­ments: -u
-ot
$sync­tex­op­tion
$full­name

for up­la­tex files:

Set­ting Value
Name: up (ptex2pdf)
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 with the $synctexoption. Ex­am­ple:

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

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

Devel­op­ment place

http://github.com/texj­porg/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 works 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 works 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.7 2015-04-29 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)
  • ver­sion 0.8 2015-06-15 file name checks: first search for arg as is, then try .tex and .ltx (closes github is­sue: 3)
  • ver­sion 0.9 2016-12-12 al­low for files in sub-di­rec­to­ries add -out­put-di­rec­tory op­tion up­date copy­right and de­vel­op­ment place (now in texjp) sup­port 'flag=val' to spec­ify op­tion val­ues only al­low one (1) file­name ar­gu­ment
  • ver­sion 20170603.0 start ver­sion num­ber in the for­mat YYYYMMDD.0 bet­ter sup­port for cp932 win­dows file­names first re­place all back­slash chars to slash chars
  • ver­sion 20170622.0 pass all non-op­tional ar­gu­ments be­fore file­name to en­gine

Copy­right and Li­cense

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

(c) Copy­right 2016-2017 Ja­panese Devel­op­ment Com­mu­nity (c) Copy­right 2013-2017 Nor­bert Prein­ing nor­bert@prein­ing.info (c) Copy­right 2012 Bob Ten­nent rdt@cs.queensu.ca

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.

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

ptex2pdf – Con­vert Ja­panese 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 works. As works 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­ageptex2pdf
Bug trackerhttps://github.com/texj­porg/ptex2pdf/is­sues
Re­pos­i­toryhttps://github.com/texj­porg/ptex2pdf
Ver­sion20170622.0
Li­cense GNU Gen­eral Public Li­cense, ver­sion 2
Copy­right2012 Bob Ten­nent
Main­tainerJa­panese Devel­op­ment Com­mu­nity
Con­tained inTeX Live as ptex2pdf
Topics the doc­u­ment com­pi­la­tion pro­cess
sup­port for type­set­ting Ja­panese
...
Guest Book Sitemap Contact Contact Author