diff options
author | Context Git Mirror Bot <phg42.2a@gmail.com> | 2015-11-19 20:15:06 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2015-11-19 20:15:06 +0100 |
commit | adc43c3c243ed95215af6fe02d71e393c178da23 (patch) | |
tree | aad04954cbfb0378c65fd2b98e7c924245aad372 /tex/context/base/typo-dua.lua | |
parent | 726a663be481042003566d4614266b940b5a0c91 (diff) | |
download | context-adc43c3c243ed95215af6fe02d71e393c178da23.tar.gz |
2015-11-19 19:15:00
Diffstat (limited to 'tex/context/base/typo-dua.lua')
-rw-r--r-- | tex/context/base/typo-dua.lua | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/tex/context/base/typo-dua.lua b/tex/context/base/typo-dua.lua index 0cf84847d..bbb071f55 100644 --- a/tex/context/base/typo-dua.lua +++ b/tex/context/base/typo-dua.lua @@ -77,9 +77,11 @@ local getid = nuts.getid local getsubtype = nuts.getsubtype local getlist = nuts.getlist local getfield = nuts.getfield -local setfield = nuts.setfield local getprop = nuts.getprop + +local setfield = nuts.setfield local setprop = nuts.setprop +local setchar = nuts.setchar local remove_node = nuts.remove local copy_node = nuts.copy @@ -90,7 +92,6 @@ local nodepool = nuts.pool local new_textdir = nodepool.textdir local nodecodes = nodes.nodecodes -local whatsitcodes = nodes.whatsitcodes local skipcodes = nodes.skipcodes local glyph_code = nodecodes.glyph @@ -98,9 +99,8 @@ local glue_code = nodecodes.glue local hlist_code = nodecodes.hlist local vlist_code = nodecodes.vlist local math_code = nodecodes.math -local dir_code = nodecodes.dir or whatsitcodes.dir -local localpar_code = nodecodes.localpar or whatcodes.localpar -local whatsit_code = nodecodes.whatsit +local dir_code = nodecodes.dir +local localpar_code = nodecodes.localpar local parfillskip_code = skipcodes.skipcodes ----- object_replacement = 0xFFFC -- object replacement character @@ -233,7 +233,7 @@ local function build_list(head) -- todo: store node pointer ... saves loop elseif id == glue_code then -- and how about kern list[size] = { char = 0x0020, direction = "ws", original = "ws", level = 0 } current = getnext(current) - elseif id == dir_code or (id == whatsit_code and getsubtype(current) == dir_code) then + elseif id == dir_code then local dir = getfield(current,"dir") if dir == "+TLT" then list[size] = { char = 0x202A, direction = "lre", original = "lre", level = 0 } @@ -261,7 +261,7 @@ local function build_list(head) -- todo: store node pointer ... saves loop current = getnext(current) while n do local id = getid(current) - if id ~= glyph_code and id ~= glue_code and id ~= dir_code and not (id == whatsit_code and getsubtype(current) == dir_code) then + if id ~= glyph_code and id ~= glue_code and id ~= dir_code then skip = skip + 1 last = id current = getnext(current) @@ -325,7 +325,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) or (id == whatsit_code and getsubtype(head) == localpar_code) then + if id == localpar_code then if getfield(head,"dir") == "TRT" then return 1, "TRT", true else @@ -742,7 +742,7 @@ local function apply_to_list(list,size,head,pardir) if id == glyph_code then local mirror = entry.mirror if mirror then - setfield(current,"char",mirror) + setchar(current,mirror) end if trace_directions then local direction = entry.direction @@ -761,7 +761,7 @@ local function apply_to_list(list,size,head,pardir) done = true end elseif begindir then - if (id == localpar_code) or (id == whatsit_code and getsubtype(current) == localpar_code) then + if id == localpar_code then -- localpar should always be the 1st node local d = new_textdir(begindir) setprop(d,"directions",true) |