summaryrefslogtreecommitdiff
path: root/tex/context/base/mkxl/lang-dis.lmt
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/mkxl/lang-dis.lmt')
-rw-r--r--tex/context/base/mkxl/lang-dis.lmt22
1 files changed, 22 insertions, 0 deletions
diff --git a/tex/context/base/mkxl/lang-dis.lmt b/tex/context/base/mkxl/lang-dis.lmt
index 1236ba749..5c4ab1e34 100644
--- a/tex/context/base/mkxl/lang-dis.lmt
+++ b/tex/context/base/mkxl/lang-dis.lmt
@@ -26,6 +26,7 @@ local getsubtype = nuts.getsubtype
local setsubtype = nuts.setsubtype
local getchar = nuts.getchar
local setchar = nuts.setchar
+local getdiscpart = nuts.getdiscpart
local getdisc = nuts.getdisc
local setdisc = nuts.setdisc
local getlanguage = nuts.getlanguage
@@ -39,6 +40,7 @@ local remove_node = nuts.remove
----- flushnode = nuts.flushnode
local nextdisc = nuts.traversers.disc
+local nextglyph = nuts.traversers.glyph
local new_disc = nuts.pool.disc
@@ -48,6 +50,12 @@ local disccodes = nodes.disccodes
local disc_code = nodecodes.disc
local glyph_code = nodecodes.glyph
+local discoptioncodes = tex.discoptioncodes
+local pre_part_code = discoptioncodes.pre
+local post_part_code = discoptioncodes.post
+local replace_part_code = discoptioncodes.replace
+local always_part_code = discoptioncodes.always
+
local explicitdisc_code = disccodes.explicit
local a_visualize = attributes.private("visualizediscretionary")
@@ -76,6 +84,20 @@ function languages.visualizediscretionaries(head)
end
end
end
+ for g in nextglyph, head do
+ if getattr(g,a_visualize) then
+ local c = getdiscpart(g)
+ if c == pre_part_code then
+ setlistcolor(g,"darkmagenta")
+ elseif c == post_part_code then
+ setlistcolor(g,"darkcyan")
+ elseif c == replace_part_code then
+ setlistcolor(g,"darkyellow")
+ elseif c == always_part_code then
+ setlistcolor(g,"darkgray")
+ end
+ end
+ end
return head
end