diff options
author | Karl Berry <karl@freefriends.org> | 2012-05-02 21:50:45 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2012-05-02 21:50:45 +0000 |
commit | aa1776c78dfdb456e2228fbceaa886e64e36174c (patch) | |
tree | 7967af7f0f2079a632809a813221918af16ba8cc /Master/texmf-dist/scripts/oberdiek/luacolor-pre065.lua | |
parent | a86d14742b305868a1c2b1f33f1263a6b7d0e03d (diff) |
oberdiek (1may12)
git-svn-id: svn://tug.org/texlive/trunk@26177 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts/oberdiek/luacolor-pre065.lua')
-rw-r--r-- | Master/texmf-dist/scripts/oberdiek/luacolor-pre065.lua | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/Master/texmf-dist/scripts/oberdiek/luacolor-pre065.lua b/Master/texmf-dist/scripts/oberdiek/luacolor-pre065.lua index c564241b311..5590cfe8fb4 100644 --- a/Master/texmf-dist/scripts/oberdiek/luacolor-pre065.lua +++ b/Master/texmf-dist/scripts/oberdiek/luacolor-pre065.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.list) 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) |