summaryrefslogtreecommitdiff
path: root/tex/context/base/node-rul.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/node-rul.lua')
-rw-r--r--tex/context/base/node-rul.lua28
1 files changed, 19 insertions, 9 deletions
diff --git a/tex/context/base/node-rul.lua b/tex/context/base/node-rul.lua
index 953beb186..5c64c0113 100644
--- a/tex/context/base/node-rul.lua
+++ b/tex/context/base/node-rul.lua
@@ -85,6 +85,9 @@ local variables = interfaces.variables
local dimenfactor = fonts.helpers.dimenfactor
local splitdimen = number.splitdimen
+local v_yes = variables.yes
+local v_foreground = variables.foreground
+
local nodecodes = nodes.nodecodes
local skipcodes = nodes.skipcodes
local whatcodes = nodes.whatcodes
@@ -150,7 +153,7 @@ local function processwords(attribute,data,flush,head,parent) -- we have hlistdi
else
-- possible extensions: when in same class then keep spanning
local newlevel, newclass = floor(aa/1000), aa%1000
---~ strip = not continue or level == 1 -- 0
+ -- strip = not continue or level == 1 -- 0
if f then
if class == newclass then -- and newlevel > level then
head, done = flush(head,f,l,d,level,parent,false), true
@@ -161,7 +164,7 @@ local function processwords(attribute,data,flush,head,parent) -- we have hlistdi
f, l, a = n, n, aa
level, class = newlevel, newclass
d = data[class]
- continue = d.continue == variables.yes
+ continue = d.continue == v_yes
end
else
if f then
@@ -169,8 +172,16 @@ local function processwords(attribute,data,flush,head,parent) -- we have hlistdi
end
f, l, a = nil, nil, nil
end
- elseif f and (id == disc_code or (id == kern_code and n.subtype == kerning_code)) then
- l = n
+-- elseif f and (id == disc_code or (id == kern_code and n.subtype == kerning_code)) then
+-- l = n
+ elseif id == disc_code then
+ if f then
+ l = n
+ end
+ elseif id == kern_code and n.subtype == kerning_code then
+ if f then
+ l = n
+ end
elseif id == hlist_code or id == vlist_code then
if f then
head, done = flush(head,f,l,d,level,parent,strip), true
@@ -188,13 +199,12 @@ local function processwords(attribute,data,flush,head,parent) -- we have hlistdi
if continue then
if id == penalty_code then
l = n
- elseif id == kern_code then
- l = n
+ -- elseif id == kern_code then
+ -- l = n
elseif id == glue_code then
-- catch \underbar{a} \underbar{a} (subtype test is needed)
local subtype = n.subtype
- if continue and n[attribute] and
- (subtype == userskip_code or subtype == spaceskip_code or subskip == xspaceskip_code) then
+ if n[attribute] and (subtype == userskip_code or subtype == spaceskip_code or subskip == xspaceskip_code) then
l = n
else
head, done = flush(head,f,l,d,level,parent,strip), true
@@ -261,7 +271,7 @@ local function flush_ruled(head,f,l,d,level,parent,strip) -- not that fast but a
local colorspace = ma > 0 and ma or f[a_colorspace] or 1
local color = ca > 0 and ca or f[a_color]
local transparency = ta > 0 and ta or f[a_transparency]
- local foreground = order == variables.foreground
+ local foreground = order == v_foreground
local e = dimenfactor(unit,fontdata[f.font]) -- what if no glyph node