summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/scripts/oberdiek/luacolor.lua
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/scripts/oberdiek/luacolor.lua')
-rw-r--r--Master/texmf-dist/scripts/oberdiek/luacolor.lua20
1 files changed, 13 insertions, 7 deletions
diff --git a/Master/texmf-dist/scripts/oberdiek/luacolor.lua b/Master/texmf-dist/scripts/oberdiek/luacolor.lua
index 073eceb613d..f05a4a0bf8f 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: 2011/04/23 v1.6
+-- Version: 2011/11/01 v1.8
--
-- Copyright (C) 2007, 2009-2011 by
-- Heiko Oberdiek <heiko.oberdiek at googlemail.com>
@@ -37,7 +37,7 @@
--
module("oberdiek.luacolor", package.seeall)
function getversion()
- tex.write("2011/04/23 v1.6")
+ tex.write("2011/11/01 v1.8")
end
local ifpdf
if tonumber(tex.pdfoutput) > 0 then
@@ -75,7 +75,7 @@ function dvidetect()
local v = tex.box[0]
assert(v.id == node.id("hlist"))
for v in node.traverse_id(node.id("whatsit"), v.head) do
- if v and v.subtype == 3 then -- special
+ if v and v.subtype == node.subtype("special") then
local data = v.data
for pattern, driver in pairs(patterns) do
if string.find(data, pattern) then
@@ -94,6 +94,9 @@ local map = {
n = 0,
}
function get(color)
+ tex.write("" .. getvalue(color))
+end
+function getvalue(color)
local n = map[color]
if not n then
n = map.n + 1
@@ -101,12 +104,15 @@ function get(color)
map[n] = color
map[color] = n
end
- tex.write("" .. n)
+ return n
end
local attribute
function setattribute(attr)
attribute = attr
end
+function getattribute()
+ return attribute
+end
local LIST = 1
local LIST_LEADERS = 2
local COLOR = 3
@@ -118,9 +124,9 @@ local node_types = {
[node.id("glyph")] = COLOR,
[node.id("disc")] = COLOR,
[node.id("whatsit")] = {
- [3] = COLOR, -- special
- [8] = COLOR, -- pdf_literal
- [14] = COLOR, -- pdf_refximage
+ [node.subtype("special")] = COLOR,
+ [node.subtype("pdf_literal")] = COLOR,
+ [node.subtype("pdf_refximage")] = COLOR,
},
[node.id("glue")] =
function(n)