summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/colo-ini.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2022-12-21 18:00:37 +0100
committerContext Git Mirror Bot <phg@phi-gamma.net>2022-12-21 18:00:37 +0100
commit36355f3d0c23357fccf2c76b3e9605a41cae519d (patch)
tree7b2bfa701a21ed8b075deba24112583461706770 /tex/context/base/mkiv/colo-ini.lua
parent8f472c629a996f1c08281198210354a253d7f56b (diff)
downloadcontext-36355f3d0c23357fccf2c76b3e9605a41cae519d.tar.gz
2022-12-21 17:12:00
Diffstat (limited to 'tex/context/base/mkiv/colo-ini.lua')
-rw-r--r--tex/context/base/mkiv/colo-ini.lua18
1 files changed, 15 insertions, 3 deletions
diff --git a/tex/context/base/mkiv/colo-ini.lua b/tex/context/base/mkiv/colo-ini.lua
index 5bfe4635c..de319be46 100644
--- a/tex/context/base/mkiv/colo-ini.lua
+++ b/tex/context/base/mkiv/colo-ini.lua
@@ -43,6 +43,7 @@ local texsetattribute = tex.setattribute
local texgetattribute = tex.getattribute
local texgetcount = tex.getcount
local texgettoks = tex.gettoks
+local texiscount = tex.iscount
local texgetmacro = tokens.getters.macro
local a_color = attributes.private('color')
@@ -82,8 +83,19 @@ local function synccolorclone(name,clone)
valid[name] = clone
end
-local function synccolorcount(name,n)
- counts[name] = n
+local synccolorcount if CONTEXTLMTXMODE > 0 then
+-- local prefix = texgetmacro("??colornumber")
+-- for k, v in next, counts do
+-- counts[k] = texiscount(prefix..k)
+-- print(k,v,counts[k])
+-- end
+ synccolorcount = function(name,n)
+ counts[name] = texiscount(n)
+ end
+else
+ synccolorcount = function(name,n)
+ counts[name] = n
+ end
end
local stack = { }
@@ -1139,7 +1151,7 @@ local setcolormodel = colors.setmodel
implement {
name = "synccolorcount",
actions = synccolorcount,
- arguments = { "string", "integer" }
+ arguments = { "string", CONTEXTLMTXMODE > 0 and "string" or "integer" }
}
implement {