summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/scripts
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-07-27 21:06:35 +0000
committerKarl Berry <karl@freefriends.org>2019-07-27 21:06:35 +0000
commit6bef83deb7557e3f77db24324e41b44b69548a5d (patch)
tree8c233845613b1512435e52d0786ad2fd75dc816f /Master/texmf-dist/scripts
parentec76c86235312c3a03dc62b40b28398a25cfe975 (diff)
oberdiek (27jul19)
git-svn-id: svn://tug.org/texlive/trunk@51756 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts')
-rw-r--r--Master/texmf-dist/scripts/oberdiek/luacolor.lua52
-rw-r--r--Master/texmf-dist/scripts/oberdiek/magicnum.lua13
-rw-r--r--Master/texmf-dist/scripts/oberdiek/oberdiek.luatex.lua5
-rw-r--r--Master/texmf-dist/scripts/oberdiek/oberdiek.magicnum.lua13
-rw-r--r--Master/texmf-dist/scripts/oberdiek/oberdiek.pdftexcmds.lua56
-rwxr-xr-xMaster/texmf-dist/scripts/oberdiek/pdfatfi.pl5
-rw-r--r--Master/texmf-dist/scripts/oberdiek/pdftexcmds.lua56
7 files changed, 108 insertions, 92 deletions
diff --git a/Master/texmf-dist/scripts/oberdiek/luacolor.lua b/Master/texmf-dist/scripts/oberdiek/luacolor.lua
index 0d3f1ce9262..816667d6397 100644
--- a/Master/texmf-dist/scripts/oberdiek/luacolor.lua
+++ b/Master/texmf-dist/scripts/oberdiek/luacolor.lua
@@ -9,7 +9,7 @@
-- This is a generated file.
--
-- Project: luacolor
--- Version: 2018/11/22 v1.11
+-- Version: 2019/07/25 v1.12
--
-- Copyright (C) 2007, 2009-2011 by
-- Heiko Oberdiek <heiko.oberdiek at googlemail.com>
@@ -34,16 +34,13 @@
-- luacolor-test1.tex, luacolor-test2.tex, luacolor-test3.tex,
-- luacolor.lua,
--
-module("oberdiek.luacolor", package.seeall)
-function getversion()
- tex.write("2018/11/22 v1.11")
-end
-local ifpdf
-if tonumber(tex.outputmode or tex.pdfoutput) > 0 then
- ifpdf = true
-else
- ifpdf = false
+oberdiek = oberdiek or {}
+local luacolor = oberdiek.luacolor or {}
+oberdiek.luacolor = luacolor
+function luacolor.getversion()
+ tex.write("2019/07/25 v1.12")
end
+local ifpdf = tonumber(tex.outputmode or tex.pdfoutput) > 0
local prefix
local prefixes = {
dvips = "color ",
@@ -70,7 +67,7 @@ local function info(msg, term)
texio.write_nl(target, "Package luacolor info: " .. msg .. ".")
texio.write_nl(target, "")
end
-function dvidetect()
+function luacolor.dvidetect()
local v = tex.box[0]
assert(v.id == node.id("hlist"))
for v in node.traverse_id(node.id("whatsit"), v.head) do
@@ -92,10 +89,10 @@ end
local map = {
n = 0,
}
-function get(color)
- tex.write("" .. getvalue(color))
+function luacolor.get(color)
+ tex.write("" .. luacolor.getvalue(color))
end
-function getvalue(color)
+function luacolor.getvalue(color)
local n = map[color]
if not n then
n = map.n + 1
@@ -106,22 +103,23 @@ function getvalue(color)
return n
end
local attribute
-function setattribute(attr)
+function luacolor.setattribute(attr)
attribute = attr
end
-function getattribute()
+function luacolor.getattribute()
return attribute
end
local LIST = 1
local LIST_LEADERS = 2
-local COLOR = 3
+local LIST_DISC = 3
+local COLOR = 4
local RULE = node.id("rule")
local node_types = {
[node.id("hlist")] = LIST,
[node.id("vlist")] = LIST,
[node.id("rule")] = COLOR,
[node.id("glyph")] = COLOR,
- [node.id("disc")] = COLOR,
+ [node.id("disc")] = LIST_DISC,
[node.id("whatsit")] = {
[node.subtype("special")] = COLOR,
[node.subtype("pdf_literal")] = COLOR,
@@ -160,14 +158,18 @@ local function traverse(list, color, dry)
if not list then
return color
end
- if get_type(list) ~= LIST then
+ local head
+ if get_type(list) == LIST then
+ head = list.head
+ elseif get_type(list) == LIST_DISC then
+ head = list.replace
+ else
texio.write_nl("!!! Error: Wrong list type: " .. node.type(list.id))
return color
end
- local head = list.head
for n in node.traverse(head) do
local t = get_type(n)
- if t == LIST then
+ if t == LIST or t == LIST_DISC then
color = traverse(n, color, dry)
elseif t == LIST_LEADERS then
local color_after = traverse(n.leader, color, DRY_TRUE)
@@ -199,10 +201,14 @@ local function traverse(list, color, dry)
end
end
end
- list.head = head
+ if get_type(list) == LIST then
+ list.head = head
+ else
+ list.replace = head
+ end
return color
end
-function process(box)
+function luacolor.process(box)
local color = ""
local list = tex.getbox(box)
traverse(list, color, DRY_FALSE)
diff --git a/Master/texmf-dist/scripts/oberdiek/magicnum.lua b/Master/texmf-dist/scripts/oberdiek/magicnum.lua
index ab615756ab2..42d38f5d9b6 100644
--- a/Master/texmf-dist/scripts/oberdiek/magicnum.lua
+++ b/Master/texmf-dist/scripts/oberdiek/magicnum.lua
@@ -9,7 +9,7 @@
-- This is a generated file.
--
-- Project: magicnum
--- Version: 2016/05/16 v1.5
+-- Version: 2019/07/25 v1.6
--
-- Copyright (C) 2007, 2009-2011 by
-- Heiko Oberdiek <heiko.oberdiek at googlemail.com>
@@ -37,9 +37,11 @@
-- magicnum-test1.tex, magicnum-test2.tex, magicnum-test3.tex,
-- magicnum-test4.tex, magicnum.lua, oberdiek.magicnum.lua.
--
-module("oberdiek.magicnum", package.seeall)
-function getversion()
- tex.write("2016/05/16 v1.5")
+oberdiek = oberdiek or {}
+local magicnum = oberdiek.magicnum or {}
+oberdiek.magicnum = magicnum
+function magicnum.getversion()
+ tex.write("2019/07/25 v1.6")
end
local data = {
["tex.catcode"] = {
@@ -209,7 +211,7 @@ local data = {
["setorigin"] = 0
}
}
-function get(name)
+function magicnum.get(name)
local startpos, endpos, category, entry =
string.find(name, "^(%a[%a%d%.]*)%.(-?[%a%d]+)$")
if not entry then
@@ -235,5 +237,6 @@ function get(name)
end
tex.write(value)
end
+
--
-- End of File `magicnum.lua'.
diff --git a/Master/texmf-dist/scripts/oberdiek/oberdiek.luatex.lua b/Master/texmf-dist/scripts/oberdiek/oberdiek.luatex.lua
index 49d26283b93..524567a6086 100644
--- a/Master/texmf-dist/scripts/oberdiek/oberdiek.luatex.lua
+++ b/Master/texmf-dist/scripts/oberdiek/oberdiek.luatex.lua
@@ -9,7 +9,7 @@
-- This is a generated file.
--
-- Project: luatex
--- Version: 2016/05/16 v0.6
+-- Version: 2019/07/25 v0.7
--
-- Copyright (C) 2007, 2009, 2010 by
-- Heiko Oberdiek <heiko.oberdiek at googlemail.com>
@@ -37,8 +37,7 @@
-- luatex-test1.tex, luatex-test2.tex, luatex-test3.tex,
-- luatex-test4.tex, luatex-test5.tex, oberdiek.luatex.lua.
--
-module("oberdiek.luatex", package.seeall)
-function kpse_module_loader(module)
+local function kpse_module_loader(module)
local script = module .. ".lua"
local file = kpse.find_file(script, "texmfscripts")
if file then
diff --git a/Master/texmf-dist/scripts/oberdiek/oberdiek.magicnum.lua b/Master/texmf-dist/scripts/oberdiek/oberdiek.magicnum.lua
index 20b5818d231..5d6c9229320 100644
--- a/Master/texmf-dist/scripts/oberdiek/oberdiek.magicnum.lua
+++ b/Master/texmf-dist/scripts/oberdiek/oberdiek.magicnum.lua
@@ -9,7 +9,7 @@
-- This is a generated file.
--
-- Project: magicnum
--- Version: 2016/05/16 v1.5
+-- Version: 2019/07/25 v1.6
--
-- Copyright (C) 2007, 2009-2011 by
-- Heiko Oberdiek <heiko.oberdiek at googlemail.com>
@@ -37,9 +37,11 @@
-- magicnum-test1.tex, magicnum-test2.tex, magicnum-test3.tex,
-- magicnum-test4.tex, magicnum.lua, oberdiek.magicnum.lua.
--
-module("oberdiek.magicnum", package.seeall)
-function getversion()
- tex.write("2016/05/16 v1.5")
+oberdiek = oberdiek or {}
+local magicnum = oberdiek.magicnum or {}
+oberdiek.magicnum = magicnum
+function magicnum.getversion()
+ tex.write("2019/07/25 v1.6")
end
local data = {
["tex.catcode"] = {
@@ -209,7 +211,7 @@ local data = {
["setorigin"] = 0
}
}
-function get(name)
+function magicnum.get(name)
local startpos, endpos, category, entry =
string.find(name, "^(%a[%a%d%.]*)%.(-?[%a%d]+)$")
if not entry then
@@ -235,5 +237,6 @@ function get(name)
end
tex.write(value)
end
+
--
-- End of File `oberdiek.magicnum.lua'.
diff --git a/Master/texmf-dist/scripts/oberdiek/oberdiek.pdftexcmds.lua b/Master/texmf-dist/scripts/oberdiek/oberdiek.pdftexcmds.lua
index a48a2759e8e..b9381f2a1d6 100644
--- a/Master/texmf-dist/scripts/oberdiek/oberdiek.pdftexcmds.lua
+++ b/Master/texmf-dist/scripts/oberdiek/oberdiek.pdftexcmds.lua
@@ -9,7 +9,7 @@
-- This is a generated file.
--
-- Project: pdftexcmds
--- Version: 2018/09/10 v0.29
+-- Version: 2019/07/25 v0.30
--
-- Copyright (C) 2007, 2009-2011 by
-- Heiko Oberdiek <heiko.oberdiek at googlemail.com>
@@ -38,12 +38,14 @@
-- pdftexcmds-test-shell.tex, pdftexcmds-test-escape.tex,
-- oberdiek.pdftexcmds.lua, pdftexcmds.lua.
--
-module("oberdiek.pdftexcmds", package.seeall)
+oberdiek = oberdiek or {}
+local pdftexcmds = oberdiek.pdftexcmds or {}
+oberdiek.pdftexcmds = pdftexcmds
local systemexitstatus
-function getversion()
- tex.write("2018/09/10 v0.29")
+function pdftexcmds.getversion()
+ tex.write("2019/07/25 v0.30")
end
-function strcmp(A, B)
+function pdftexcmds.strcmp(A, B)
if A == B then
tex.write("0")
elseif A < B then
@@ -77,7 +79,7 @@ local function utf8_to_byte(str)
end
return table.concat(t)
end
-function escapehex(str, mode)
+function pdftexcmds.escapehex(str, mode)
if mode == "byte" then
str = utf8_to_byte(str)
end
@@ -87,7 +89,7 @@ function escapehex(str, mode)
end
)))
end
-function unescapehex(str, mode, patch)
+function pdftexcmds.unescapehex(str, mode, patch)
local a = 0
local first = true
local result = {}
@@ -151,9 +153,9 @@ function unescapehex(str, mode, patch)
result = utf8
end
local unpack = _G["unpack"] or table.unpack
- tex.settoks(toks, string.char(unpack(result)))
+ tex.settoks(pdftexcmds.toks, string.char(unpack(result)))
end
-function escapestring(str, mode)
+function pdftexcmds.escapestring(str, mode)
if mode == "byte" then
str = utf8_to_byte(str)
end
@@ -170,7 +172,7 @@ function escapestring(str, mode)
end
)))
end
-function escapename(str, mode)
+function pdftexcmds.escapename(str, mode)
if mode == "byte" then
str = utf8_to_byte(str)
end
@@ -191,7 +193,7 @@ function escapename(str, mode)
end
)))
end
-function filesize(filename)
+function pdftexcmds.filesize(filename)
local foundfile = kpse.find_file(filename, "tex", true)
if foundfile then
local size = lfs.attributes(foundfile, "size")
@@ -200,7 +202,7 @@ function filesize(filename)
end
end
end
-function filemoddate(filename)
+function pdftexcmds.filemoddate(filename)
local foundfile = kpse.find_file(filename, "tex", true)
if foundfile then
local date = lfs.attributes(foundfile, "modification")
@@ -237,7 +239,7 @@ function filemoddate(filename)
end
end
end
-function filedump(offset, length, filename)
+function pdftexcmds.filedump(offset, length, filename)
length = tonumber(length)
if length and length > 0 then
local foundfile = kpse.find_file(filename, "tex", true)
@@ -252,41 +254,41 @@ function filedump(offset, length, filename)
filehandle:seek("set", offset)
end
local dump = filehandle:read(length)
- escapehex(dump)
+ pdftexcmds.escapehex(dump)
filehandle:close()
end
end
end
end
-function mdfivesum(str, mode)
+function pdftexcmds.mdfivesum(str, mode)
if mode == "byte" then
str = utf8_to_byte(str)
end
- escapehex(md5.sum(str))
+ pdftexcmds.escapehex(md5.sum(str))
end
-function filemdfivesum(filename)
+function pdftexcmds.filemdfivesum(filename)
local foundfile = kpse.find_file(filename, "tex", true)
if foundfile then
local filehandle = io.open(foundfile, "rb")
if filehandle then
local contents = filehandle:read("*a")
- escapehex(md5.sum(contents))
+ pdftexcmds.escapehex(md5.sum(contents))
filehandle:close()
end
end
end
local basetime = 0
-function resettimer()
+function pdftexcmds.resettimer()
basetime = os.clock()
end
-function elapsedtime()
+function pdftexcmds.elapsedtime()
local val = (os.clock() - basetime) * 65536 + .5
if val > 2147483647 then
val = 2147483647
end
tex.write(string.format("%d", val))
end
-function shellescape()
+function pdftexcmds.shellescape()
if os.execute then
if status
and status.luatex_version
@@ -308,7 +310,7 @@ function shellescape()
tex.write("0")
end
end
-function system(cmdline)
+function pdftexcmds.system(cmdline)
systemexitstatus = nil
texio.write_nl("log", "system(" .. cmdline .. ") ")
if os.execute then
@@ -318,20 +320,20 @@ function system(cmdline)
texio.write("log", "disabled.")
end
end
-function lastsystemstatus()
+function pdftexcmds.lastsystemstatus()
local result = tonumber(systemexitstatus)
if result then
local x = math.floor(result / 256)
tex.write(result - 256 * math.floor(result / 256))
end
end
-function lastsystemexit()
+function pdftexcmds.lastsystemexit()
local result = tonumber(systemexitstatus)
if result then
tex.write(math.floor(result / 256))
end
end
-function pipe(cmdline, patch)
+function pdftexcmds.pipe(cmdline, patch)
local result
systemexitstatus = nil
texio.write_nl("log", "pipe(" .. cmdline ..") ")
@@ -363,9 +365,9 @@ function pipe(cmdline, patch)
end
result = temp
end
- tex.settoks(toks, result)
+ tex.settoks(pdftexcmds.toks, result)
else
- tex.settoks(toks, "")
+ tex.settoks(pdftexcmds.toks, "")
end
end
--
diff --git a/Master/texmf-dist/scripts/oberdiek/pdfatfi.pl b/Master/texmf-dist/scripts/oberdiek/pdfatfi.pl
index 0b832a32010..b4c34bcf531 100755
--- a/Master/texmf-dist/scripts/oberdiek/pdfatfi.pl
+++ b/Master/texmf-dist/scripts/oberdiek/pdfatfi.pl
@@ -29,8 +29,8 @@ $^W=1; # turn warning on
my $prj = 'pdfatfi';
my $file = "$prj.pl";
my $program = uc($&) if $file =~ /^\w+/;
-my $version = "2.7";
-my $date = "2016/05/16";
+my $version = "2.9";
+my $date = "2019/07/24";
my $author = "Heiko Oberdiek";
my $copyright = "Copyright (c) 2005-2010, 2012 by $author.";
#
@@ -39,6 +39,7 @@ my $copyright = "Copyright (c) 2005-2010, 2012 by $author.";
# 2006/08/16 v2.2: Included in DTX file of attachfile2.dtx.
# 2010/09/27 v2.6: Keys ModDateTZ and CreationDateTZ added.
# 2016/05/16 v2.8: Option --version added.
+# 2019/07/24 v2.9: adapted version to attachfile2 version.
#
use POSIX qw(strftime); # %z is used (GNU)
diff --git a/Master/texmf-dist/scripts/oberdiek/pdftexcmds.lua b/Master/texmf-dist/scripts/oberdiek/pdftexcmds.lua
index 960c2aeb5cc..22ce15b3d2f 100644
--- a/Master/texmf-dist/scripts/oberdiek/pdftexcmds.lua
+++ b/Master/texmf-dist/scripts/oberdiek/pdftexcmds.lua
@@ -9,7 +9,7 @@
-- This is a generated file.
--
-- Project: pdftexcmds
--- Version: 2018/09/10 v0.29
+-- Version: 2019/07/25 v0.30
--
-- Copyright (C) 2007, 2009-2011 by
-- Heiko Oberdiek <heiko.oberdiek at googlemail.com>
@@ -38,12 +38,14 @@
-- pdftexcmds-test-shell.tex, pdftexcmds-test-escape.tex,
-- oberdiek.pdftexcmds.lua, pdftexcmds.lua.
--
-module("oberdiek.pdftexcmds", package.seeall)
+oberdiek = oberdiek or {}
+local pdftexcmds = oberdiek.pdftexcmds or {}
+oberdiek.pdftexcmds = pdftexcmds
local systemexitstatus
-function getversion()
- tex.write("2018/09/10 v0.29")
+function pdftexcmds.getversion()
+ tex.write("2019/07/25 v0.30")
end
-function strcmp(A, B)
+function pdftexcmds.strcmp(A, B)
if A == B then
tex.write("0")
elseif A < B then
@@ -77,7 +79,7 @@ local function utf8_to_byte(str)
end
return table.concat(t)
end
-function escapehex(str, mode)
+function pdftexcmds.escapehex(str, mode)
if mode == "byte" then
str = utf8_to_byte(str)
end
@@ -87,7 +89,7 @@ function escapehex(str, mode)
end
)))
end
-function unescapehex(str, mode, patch)
+function pdftexcmds.unescapehex(str, mode, patch)
local a = 0
local first = true
local result = {}
@@ -151,9 +153,9 @@ function unescapehex(str, mode, patch)
result = utf8
end
local unpack = _G["unpack"] or table.unpack
- tex.settoks(toks, string.char(unpack(result)))
+ tex.settoks(pdftexcmds.toks, string.char(unpack(result)))
end
-function escapestring(str, mode)
+function pdftexcmds.escapestring(str, mode)
if mode == "byte" then
str = utf8_to_byte(str)
end
@@ -170,7 +172,7 @@ function escapestring(str, mode)
end
)))
end
-function escapename(str, mode)
+function pdftexcmds.escapename(str, mode)
if mode == "byte" then
str = utf8_to_byte(str)
end
@@ -191,7 +193,7 @@ function escapename(str, mode)
end
)))
end
-function filesize(filename)
+function pdftexcmds.filesize(filename)
local foundfile = kpse.find_file(filename, "tex", true)
if foundfile then
local size = lfs.attributes(foundfile, "size")
@@ -200,7 +202,7 @@ function filesize(filename)
end
end
end
-function filemoddate(filename)
+function pdftexcmds.filemoddate(filename)
local foundfile = kpse.find_file(filename, "tex", true)
if foundfile then
local date = lfs.attributes(foundfile, "modification")
@@ -237,7 +239,7 @@ function filemoddate(filename)
end
end
end
-function filedump(offset, length, filename)
+function pdftexcmds.filedump(offset, length, filename)
length = tonumber(length)
if length and length > 0 then
local foundfile = kpse.find_file(filename, "tex", true)
@@ -252,41 +254,41 @@ function filedump(offset, length, filename)
filehandle:seek("set", offset)
end
local dump = filehandle:read(length)
- escapehex(dump)
+ pdftexcmds.escapehex(dump)
filehandle:close()
end
end
end
end
-function mdfivesum(str, mode)
+function pdftexcmds.mdfivesum(str, mode)
if mode == "byte" then
str = utf8_to_byte(str)
end
- escapehex(md5.sum(str))
+ pdftexcmds.escapehex(md5.sum(str))
end
-function filemdfivesum(filename)
+function pdftexcmds.filemdfivesum(filename)
local foundfile = kpse.find_file(filename, "tex", true)
if foundfile then
local filehandle = io.open(foundfile, "rb")
if filehandle then
local contents = filehandle:read("*a")
- escapehex(md5.sum(contents))
+ pdftexcmds.escapehex(md5.sum(contents))
filehandle:close()
end
end
end
local basetime = 0
-function resettimer()
+function pdftexcmds.resettimer()
basetime = os.clock()
end
-function elapsedtime()
+function pdftexcmds.elapsedtime()
local val = (os.clock() - basetime) * 65536 + .5
if val > 2147483647 then
val = 2147483647
end
tex.write(string.format("%d", val))
end
-function shellescape()
+function pdftexcmds.shellescape()
if os.execute then
if status
and status.luatex_version
@@ -308,7 +310,7 @@ function shellescape()
tex.write("0")
end
end
-function system(cmdline)
+function pdftexcmds.system(cmdline)
systemexitstatus = nil
texio.write_nl("log", "system(" .. cmdline .. ") ")
if os.execute then
@@ -318,20 +320,20 @@ function system(cmdline)
texio.write("log", "disabled.")
end
end
-function lastsystemstatus()
+function pdftexcmds.lastsystemstatus()
local result = tonumber(systemexitstatus)
if result then
local x = math.floor(result / 256)
tex.write(result - 256 * math.floor(result / 256))
end
end
-function lastsystemexit()
+function pdftexcmds.lastsystemexit()
local result = tonumber(systemexitstatus)
if result then
tex.write(math.floor(result / 256))
end
end
-function pipe(cmdline, patch)
+function pdftexcmds.pipe(cmdline, patch)
local result
systemexitstatus = nil
texio.write_nl("log", "pipe(" .. cmdline ..") ")
@@ -363,9 +365,9 @@ function pipe(cmdline, patch)
end
result = temp
end
- tex.settoks(toks, result)
+ tex.settoks(pdftexcmds.toks, result)
else
- tex.settoks(toks, "")
+ tex.settoks(pdftexcmds.toks, "")
end
end
--