diff options
author | Karl Berry <karl@freefriends.org> | 2017-06-05 23:10:36 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-06-05 23:10:36 +0000 |
commit | 8ae0bfe59439c53d308919a522cdc02f17d58ec2 (patch) | |
tree | 994d89e0e318ee6e0eb5b192cc78a7f3d7ed0470 /Build/source/texk | |
parent | 327cd87d4221068ab573a3504626efee4617a231 (diff) |
ptex2pdf (5jun17)
git-svn-id: svn://tug.org/texlive/trunk@44470 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk')
-rwxr-xr-x | Build/source/texk/texlive/linked_scripts/ptex2pdf/ptex2pdf.lua | 120 | ||||
-rwxr-xr-x | Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl | 16 |
2 files changed, 76 insertions, 60 deletions
diff --git a/Build/source/texk/texlive/linked_scripts/ptex2pdf/ptex2pdf.lua b/Build/source/texk/texlive/linked_scripts/ptex2pdf/ptex2pdf.lua index b2c983f24ee..395bac6c0a4 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 = "0.9" +VERSION = "20170604.0" AUTHOR = "Norbert Preining" AUTHOREMAIL = "norbert@preining.info" SHORTDESC = "Convert Japanese TeX documents to pdf" @@ -9,7 +9,8 @@ LONGDESC = [[ Main purpose of the script is easy support of Japanese typesetting engines in TeXworks. As TeXworks typesetting setup does not allow for multistep processing, this script runs one of the ptex based -programs (ptex, uptex, eptex, platex, uplatex) followed by dvipdfmx. +programs (ptex, uptex, eptex, euptex, platex, uplatex) followed +by dvipdfmx. ]] USAGE = [[ [texlua] ptex2pdf[.lua] { option | basename[.tex] } ... @@ -28,9 +29,9 @@ options: -v version LICENSECOPYRIGHT = [[ Originally based on musixtex.lua from Bob Tennent. -(c) Copyright 2016 by Japanese TeX Development Community -(c) Copyright 2013-2016 Norbert Preining norbert@preining.info -(c) Copyright 2012 Bob Tennent rdt@cs.queensu.ca +(c) Copyright 2016-2017 Japanese TeX Development Community +(c) Copyright 2013-2017 Norbert Preining norbert@preining.info +(c) Copyright 2012 Bob Tennent rdt@cs.queensu.ca This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the @@ -73,62 +74,61 @@ Under Preferences > Typesetting add new entries, for example: for ptex files: -| Setting | Value | -|-------------|------------------| -| Name: | pTeX to pdf | -| Program: | ptex2pdf | -| Arguments: | -ot | -| | $synctexoption | -| | $fullname | - +| Setting | Value | +|-------------|--------------------| +| Name: | pTeX (ptex2pdf) | +| Program: | ptex2pdf | +| Arguments: | -ot | +| | $synctexoption | +| | $fullname | for platex files: -| Setting | Value | -|-------------|----------------| -| Name: | pLaTeX to pdf | -| Program: | ptex2pdf | -| Arguments: | -l | -| | -ot | -| | $synctexoption | -| | $fullname | +| Setting | Value | +|-------------|--------------------| +| Name: | pLaTeX (ptex2pdf) | +| Program: | ptex2pdf | +| Arguments: | -l | +| | -ot | +| | $synctexoption | +| | $fullname | for uptex files: -| Setting | Value | -|-------------|----------------| -| Name: | upTeX to pdf | -| Program: | ptex2pdf | -| Arguments: | -u | -| | -ot | -| | $synctexoption | -| | $fullname | +| Setting | Value | +|-------------|--------------------| +| Name: | upTeX (ptex2pdf) | +| Program: | ptex2pdf | +| Arguments: | -u | +| | -ot | +| | $synctexoption | +| | $fullname | for uplatex files: -| Setting | Value | -|-------------|----------------| -| Name: | upLaTeX to pdf | -| Program: | ptex2pdf | -| Arguments: | -l | -| | -u | -| | -ot | -| | $synctexoption | -| | $fullname | +| Setting | Value | +|-------------|--------------------| +| Name: | upLaTeX (ptex2pdf) | +| Program: | ptex2pdf | +| Arguments: | -l | +| | -u | +| | -ot | +| | $synctexoption | +| | $fullname | If you need special kanji encodings for one of these programs, -add the respective `-kanji` option after the `$synctexoption`. Example: +add the respective `-kanji` option with the `$synctexoption`. Example: for platex files in SJIS encoding: -| Setting | Value | -|-------------|-----------------------------| -| Name: | pLaTeX/SJIS to pdf | -| Program: | ptex2pdf | -| Arguments: | -l | -| | -ot | -| | $synctexoption -kanji=sjis | -| | $fullname | +| Setting | Value | +|-------------|----------------------------| +| Name: | pLaTeX/SJIS (ptex2pdf) | +| Program: | ptex2pdf | +| Arguments: | -l | +| | -ot | +| | -kanji=sjis $synctexoption | +| | $fullname | ]] DEVELPLACE = "http://github.com/texjporg/ptex2pdf" @@ -168,6 +168,10 @@ CHANGELOG = [[ update copyright and development place (now in texjp) support 'flag=val' to specify option values only allow one (1) filename argument +- version 20170603.0 + start version number in the format YYYYMMDD.0 + better support for cp932 windows filenames + first replace all backslash chars to slash chars ]] @@ -242,6 +246,14 @@ function whoami () print("This is " .. NAME .. " version ".. VERSION .. ".") end +function print_ifdebug(message) -- for debugging: accepts only one argument + --print("DEBUG: " .. message) -- uncomment for debugging +end + +function slashify(str) -- replace "\" with "/", mainly for path strings on cp932 windows + return (tostring(str):gsub("[\x81-\x9f\xe0-\xfc]?.", { ["\\"] = "/" })) +end + if #arg == 0 then usage() os.exit(0) @@ -360,7 +372,8 @@ kpse.set_program_name(tex) if ( filename == "" ) then print("No filename argument given, exiting.") os.exit(1) -else +else + filename = slashify(filename) if ( kpse.find_file(filename) == nil ) then -- try .tex extension if ( kpse.find_file(filename .. ".tex") == nil ) then @@ -380,9 +393,10 @@ else -- if it has already an extension, we need to drop it to get the dvi name bname = string.gsub(filename, "^(.*)%.[^.]+$", "%1") end - -- filename may contain "/" or "\", but the intermediate output is written + -- filename may contain "/", but the intermediate output is written -- in current directory, so we need to drop it - bname = string.gsub(bname, "^.*[/\\](.*)$", "%1") + -- note that all "\" has been replaced with "/" + bname = string.gsub(bname, "^.*/(.*)$", "%1") end -- we are still here, so we found a file @@ -410,10 +424,8 @@ if (os.execute(tex .. " " .. texopts .. " \"" .. filename .. "\"") == 0) and end else print("ptex2pdf processing of " .. filename .. " failed.\n") - --[[ uncomment for debugging - print("tex = ", tex) - print("dvipdf = ", dvipdf) - --]] + print_ifdebug("tex = " .. tex) + print_ifdebug("dvipdf = " .. dvipdf) os.exit(2) end diff --git a/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl b/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl index 043246810df..4fad43ea7a6 100755 --- a/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl +++ b/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl @@ -1,13 +1,13 @@ #!/usr/bin/env perl -# $Id: tlmgr.pl 44422 2017-05-19 15:07:25Z karl $ +# $Id: tlmgr.pl 44452 2017-06-04 23:45:39Z karl $ # # Copyright 2008-2017 Norbert Preining # This file is licensed under the GNU General Public License version 2 # or any later version. # -my $svnrev = '$Revision: 44422 $'; -my $datrev = '$Date: 2017-05-19 17:07:25 +0200 (Fri, 19 May 2017) $'; +my $svnrev = '$Revision: 44452 $'; +my $datrev = '$Date: 2017-06-05 01:45:39 +0200 (Mon, 05 Jun 2017) $'; my $tlmgrrevision; my $prg; if ($svnrev =~ m/: ([0-9]+) /) { @@ -2559,8 +2559,12 @@ sub action_update { # if --list is given: nothing # other options just change the behavior if (!($opts{"list"} || @ARGV || $opts{"all"} || $opts{"self"})) { - tlwarn("$prg update: specify --list, --all, --self, or a list of package names.\n"); - return ($F_ERROR); + if ($opts{"dry-run"}) { + $opts{"list"} = 1; # update -n same as update -n --list + } else { + tlwarn("$prg update: specify --list, --all, --self, or a list of package names.\n"); + return ($F_ERROR); + } } init_tlmedia_or_die(); @@ -8883,7 +8887,7 @@ This script and its documentation were written for the TeX Live distribution (L<http://tug.org/texlive>) and both are licensed under the GNU General Public License Version 2 or later. -$Id: tlmgr.pl 44422 2017-05-19 15:07:25Z karl $ +$Id: tlmgr.pl 44452 2017-06-04 23:45:39Z karl $ =cut # to remake HTML version: pod2html --cachedir=/tmp tlmgr.pl >/tmp/tlmgr.html |