summaryrefslogtreecommitdiff
path: root/tex/context/base/typo-dub.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/typo-dub.lua')
-rw-r--r--tex/context/base/typo-dub.lua24
1 files changed, 17 insertions, 7 deletions
diff --git a/tex/context/base/typo-dub.lua b/tex/context/base/typo-dub.lua
index 4dc0f21fb..b6581137b 100644
--- a/tex/context/base/typo-dub.lua
+++ b/tex/context/base/typo-dub.lua
@@ -65,10 +65,12 @@ local getid = nuts.getid
local getsubtype = nuts.getsubtype
local getlist = nuts.getlist
local getattr = nuts.getattr
+local setattr = nuts.setattr
local getfield = nuts.getfield
local setfield = nuts.setfield
local remove_node = nuts.remove
+local copy_node = nuts.copy
local insert_node_after = nuts.insert_after
local insert_node_before = nuts.insert_before
@@ -97,11 +99,11 @@ local getfences = directions.getfences
local a_directions = attributes.private('directions')
local a_textbidi = attributes.private('textbidi')
-local a_state = attributes.private('state')
+----- a_state = attributes.private('state')
-local s_isol = fonts.analyzers.states.isol
+----- s_isol = fonts.analyzers.states.isol
--- current[a_state] = s_isol -- maybe better have a special bidi attr value -> override (9) -> todo
+----- current[a_state] = s_isol -- maybe better have a special bidi attr value -> override (9) -> todo
local remove_controls = true directives.register("typesetters.directions.removecontrols",function(v) remove_controls = v end)
----- analyze_fences = true directives.register("typesetters.directions.analyzefences", function(v) analyze_fences = v end)
@@ -817,20 +819,26 @@ local function apply_to_list(list,size,head,pardir)
elseif id == glue_code then
if enddir and getsubtype(current) == parfillskip_code then
-- insert the last enddir before \parfillskip glue
- head = insert_node_before(head,current,new_textdir(enddir))
+ local d = new_textdir(enddir)
+-- setfield(d,"attr",copy_node(getfield(current,"attr")))
+ head = insert_node_before(head,current,d)
enddir = false
done = true
end
elseif id == whatsit_code then
if begindir and getsubtype(current) == localpar_code then
-- local_par should always be the 1st node
- head, current = insert_node_after(head,current,new_textdir(begindir))
+ local d = new_textdir(begindir)
+-- setfield(d,"attr",copy_node(getfield(current,"attr")))
+ head, current = insert_node_after(head,current,d)
begindir = nil
done = true
end
end
if begindir then
- head = insert_node_before(head,current,new_textdir(begindir))
+ local d = new_textdir(begindir)
+-- setfield(d,"attr",copy_node(getfield(current,"attr")))
+ head = insert_node_before(head,current,d)
done = true
end
local skip = entry.skip
@@ -840,7 +848,9 @@ local function apply_to_list(list,size,head,pardir)
end
end
if enddir then
- head, current = insert_node_after(head,current,new_textdir(enddir))
+ local d = new_textdir(enddir)
+-- setfield(d,"attr",copy_node(getfield(current,"attr")))
+ head, current = insert_node_after(head,current,d)
done = true
end
if not entry.remove then