diff options
Diffstat (limited to 'tex/context/base/mkiv/typo-duc.lua')
-rw-r--r-- | tex/context/base/mkiv/typo-duc.lua | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/tex/context/base/mkiv/typo-duc.lua b/tex/context/base/mkiv/typo-duc.lua index fce40932f..7fd49e54e 100644 --- a/tex/context/base/mkiv/typo-duc.lua +++ b/tex/context/base/mkiv/typo-duc.lua @@ -58,7 +58,6 @@ local textclassdata = characters.textclasses local nuts = nodes.nuts local tonut = nuts.tonut local tonode = nuts.tonode -local nutstring = nuts.tostring local getnext = nuts.getnext local getid = nuts.getid @@ -68,10 +67,13 @@ local getlist = nuts.getlist local getattr = nuts.getattr local getfield = nuts.getfield local getprop = nuts.getprop +local getdir = nuts.getdir local setfield = nuts.setfield local setprop = nuts.setprop local setchar = nuts.setchar +local setdir = nuts.setdir +local setattrlist = nuts.setattrlist local properties = nodes.properties @@ -101,12 +103,6 @@ local setcolor = directions.setcolor local getfences = directions.getfences local a_directions = attributes.private('directions') -local a_textbidi = attributes.private('textbidi') ------ a_state = attributes.private('state') - ------ s_isol = fonts.analyzers.states.isol - ------ 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) @@ -295,7 +291,7 @@ local function build_list(head) -- todo: store node pointer ... saves loop setmetatable(t,mt_space) current = getnext(current) elseif id == dir_code then - local dir = getfield(current,"dir") + local dir = getdir(current) if dir == "+TLT" then t = { } setmetatable(t,mt_lre) @@ -419,7 +415,7 @@ end local function get_baselevel(head,list,size) -- todo: skip if first is object (or pass head and test for localpar) local id = getid(head) if id == localpar_code then - if getfield(head,"dir") == "TRT" then + if getdir(head) == "TRT" then return 1, "TRT", true else return 0, "TLT", true @@ -937,13 +933,13 @@ local function apply_to_list(list,size,head,pardir) setcolor(current,direction,false,mirror) end elseif id == hlist_code or id == vlist_code then - setfield(current,"dir",pardir) -- is this really needed? + setdir(current,pardir) -- is this really needed? elseif id == glue_code then if enddir and getsubtype(current) == parfillskip_code then -- insert the last enddir before \parfillskip glue local d = new_textdir(enddir) local p = properties[d] if p then p.directions = true else properties[d] = { directions = true } end - -- setfield(d,"attr",getfield(current,"attr")) + -- setattrlist(d,current) head = insert_node_before(head,current,d) enddir = false done = true @@ -953,7 +949,7 @@ local function apply_to_list(list,size,head,pardir) -- localpar should always be the 1st node local d = new_textdir(begindir) local p = properties[d] if p then p.directions = true else properties[d] = { directions = true } end - -- setfield(d,"attr",getfield(current,"attr")) + -- setattrlist(d,current) head, current = insert_node_after(head,current,d) begindir = nil done = true @@ -962,7 +958,7 @@ local function apply_to_list(list,size,head,pardir) if begindir then local d = new_textdir(begindir) local p = properties[d] if p then p.directions = true else properties[d] = { directions = true } end - -- setfield(d,"attr",getfield(current,"attr")) + -- setattrlist(d,current) head = insert_node_before(head,current,d) done = true end @@ -976,7 +972,7 @@ local function apply_to_list(list,size,head,pardir) if enddir then local d = new_textdir(enddir) local p = properties[d] if p then p.directions = true else properties[d] = { directions = true } end - -- setfield(d,"attr",getfield(current,"attr")) + -- setattrlist(d,current) head, current = insert_node_after(head,current,d) done = true end |