summaryrefslogtreecommitdiff
path: root/tex/context/base/mlib-pps.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2013-08-28 23:08:00 +0200
committerHans Hagen <pragma@wxs.nl>2013-08-28 23:08:00 +0200
commit944d2c4b1bfa004f6d6eb0aefb0c80bda272c0df (patch)
tree2793a0e023f93abd1f73a3ed902c8a3c8f68e0f1 /tex/context/base/mlib-pps.lua
parent6636e93b03360741f50b4f809b086b6cbf342abd (diff)
downloadcontext-944d2c4b1bfa004f6d6eb0aefb0c80bda272c0df.tar.gz
beta 2013.08.28 23:08
Diffstat (limited to 'tex/context/base/mlib-pps.lua')
-rw-r--r--tex/context/base/mlib-pps.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/tex/context/base/mlib-pps.lua b/tex/context/base/mlib-pps.lua
index 4a887150d..96d5c092f 100644
--- a/tex/context/base/mlib-pps.lua
+++ b/tex/context/base/mlib-pps.lua
@@ -809,6 +809,7 @@ local function tx_reset()
end
local fmt = formatters["%s %s %s % t"]
+local pat = lpeg.tsplitat(":")
local function tx_analyze(object,prescript) -- todo: hash content and reuse them
local tx_stage = prescript.tx_stage
@@ -817,6 +818,12 @@ local function tx_analyze(object,prescript) -- todo: hash content and reuse them
local tx_number = tonumber(prescript.tx_number)
local s = object.postscript or ""
local c = object.color -- only simple ones, no transparency
+ if #c == 0 then
+ local txc = prescript.tx_color
+ if txc then
+ c = lpegmatch(pat,txc)
+ end
+ end
local a = prescript.tr_alternative
local t = prescript.tr_transparency
local h = fmt(tx_number,a or "?",t or "?",c)