diff options
author | Context Git Mirror Bot <phg42.2a@gmail.com> | 2016-05-21 02:52:16 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2016-05-21 02:52:16 +0200 |
commit | a36f9abf1e0fd7de609dd1840d75bea56ec9e926 (patch) | |
tree | b14349d1a44df698533aa324f6c17d2922bb4b59 /tex/context/base/mkiv/node-aux.lua | |
parent | af172a8db5f7583d0117635edde17eba5619d883 (diff) | |
download | context-a36f9abf1e0fd7de609dd1840d75bea56ec9e926.tar.gz |
2016-05-20 18:46:00
Diffstat (limited to 'tex/context/base/mkiv/node-aux.lua')
-rw-r--r-- | tex/context/base/mkiv/node-aux.lua | 100 |
1 files changed, 1 insertions, 99 deletions
diff --git a/tex/context/base/mkiv/node-aux.lua b/tex/context/base/mkiv/node-aux.lua index ebe113fc6..5ac096f7c 100644 --- a/tex/context/base/mkiv/node-aux.lua +++ b/tex/context/base/mkiv/node-aux.lua @@ -20,7 +20,6 @@ local glyph_code = nodecodes.glyph local hlist_code = nodecodes.hlist local vlist_code = nodecodes.vlist local attributelist_code = nodecodes.attributelist -- temporary -local math_code = nodecodes.math local nuts = nodes.nuts local tonut = nuts.tonut @@ -51,15 +50,11 @@ local hpack_nodes = nuts.hpack local unset_attribute = nuts.unset_attribute local first_glyph = nuts.first_glyph local copy_node = nuts.copy -local copy_node_list = nuts.copy_list +----- copy_node_list = nuts.copy_list local find_tail = nuts.tail local insert_node_after = nuts.insert_after -local isnode = nuts.is_node local getbox = nuts.getbox -local nodes_traverse_id = nodes.traverse_id -local nodes_first_glyph = nodes.first_glyph - local nodepool = nuts.pool local new_glue = nodepool.glue local new_glyph = nodepool.glyph @@ -262,16 +257,6 @@ nuts.unsetattributes = unset_attributes nodes.unsetattribut -- end -- end -- --- if not node.end_of_math then --- function node.end_of_math(n) --- for n in traverse_id(math_code,getnext(next)) do --- return n --- end --- end --- end --- --- nodes.endofmath = node.end_of_math --- -- local function firstline(n) -- while n do -- local id = getid(n) @@ -300,16 +285,6 @@ function nuts.firstcharacter(n,untagged) -- tagged == subtype > 255 end end --- function nodes.firstcharacter(n,untagged) -- tagged == subtype > 255 --- if untagged then --- return nodes_first_glyph(n) --- else --- for g in nodes_traverse_id(glyph_code,n) do --- return g --- end --- end --- end - local function firstcharinbox(n) local l = getlist(getbox(n)) if l then @@ -386,79 +361,6 @@ nodes.tonodes = function(str,fnt,attr) return tonode(head), tonode(tail) end --- local function link(list,currentfont,currentattr,head,tail) --- for i=1,#list do --- local n = list[i] --- if n then --- local tn = isnode(n) --- if not tn then --- local tn = type(n) --- if tn == "number" then --- if not currentfont then --- currentfont = current_font() --- end --- local h, t = tonodes(tostring(n),currentfont,currentattr) --- if not h then --- -- skip --- elseif not head then --- head = h --- tail = t --- else --- setfield(tail,"next",h) --- setfield(h,"prev",t) --- tail = t --- end --- elseif tn == "string" then --- if #tn > 0 then --- if not currentfont then --- currentfont = current_font() --- end --- local h, t = tonodes(n,currentfont,currentattr) --- if not h then --- -- skip --- elseif not head then --- head, tail = h, t --- else --- setfield(tail,"next",h) --- setfield(h,"prev",t) --- tail = t --- end --- end --- elseif tn == "table" then --- if #tn > 0 then --- if not currentfont then --- currentfont = current_font() --- end --- head, tail = link(n,currentfont,currentattr,head,tail) --- end --- end --- elseif not head then --- head = n --- tail = find_tail(n) --- elseif getid(n) == attributelist_code then --- -- weird case --- report_error("weird node type in list at index %s:",i) --- for i=1,#list do --- local l = list[i] --- report_error("%3i: %s %S",i,getid(l) == attributelist_code and "!" or ">",l) --- end --- os.exit() --- else --- setfield(tail,"next",n) --- setfield(n,"prev",tail) --- if getnext(n) then --- tail = find_tail(n) --- else --- tail = n --- end --- end --- else --- -- permitting nil is convenient --- end --- end --- return head, tail --- end - local function link(list,currentfont,currentattr,head,tail) -- an oldie, might be replaced for i=1,#list do local n = list[i] |