diff options
author | Marius <mariausol@gmail.com> | 2014-01-09 19:40:23 +0200 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2014-01-09 19:40:23 +0200 |
commit | 241b88c2f3f6a0c2479a3cd02552e2bed59a7047 (patch) | |
tree | 7e5a96e9a5953548fb5daeab6da8bd9fe37d50c7 /tex/context/base/node-acc.lua | |
parent | 6091f1997cb58861ee2d0c2b9000430e8238b631 (diff) | |
download | context-241b88c2f3f6a0c2479a3cd02552e2bed59a7047.tar.gz |
beta 2014.01.09 18:27
Diffstat (limited to 'tex/context/base/node-acc.lua')
-rw-r--r-- | tex/context/base/node-acc.lua | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/tex/context/base/node-acc.lua b/tex/context/base/node-acc.lua index 6a1b986bc..59fa031bf 100644 --- a/tex/context/base/node-acc.lua +++ b/tex/context/base/node-acc.lua @@ -31,6 +31,8 @@ local copy_node = nuts.copy local free_nodelist = nuts.flush_list local insert_after = nuts.insert_after +local new_gluespec = nuts.pool.gluespec -- temp hack + local glue_code = nodecodes.glue local kern_code = nodecodes.kern local glyph_code = nodecodes.glyph @@ -53,7 +55,8 @@ local function injectspaces(head) local id = getid(n) if id == glue_code then -- todo: check for subtype related to spacing (13/14 but most seems to be 0) -- if getfield(getfield(n,"spec"),"width") > 0 then -- threshold - if p and p_id == glyph_code then +-- if p and p_id == glyph_code then + if p and getid(p) == glyph_code then local g = copy_node(p) local c = getfield(g,"components") if c then -- it happens that we copied a ligature @@ -61,16 +64,19 @@ local function injectspaces(head) setfield(g,"components",nil) setfield(g,"subtype",256) end - -- p .. g local a = getattr(n,a_characters) - local s = copy_node(getfield(n,"spec")) + -- local s = copy_node(getfield(n,"spec")) + -- this will be fixed in luatex but for now a temp hack (zero test) + local s = getfield(n,"spec") + s = s == 0 and new_gluespec(0) or copy_node(s) + -- setfield(g,"char",32) - insert_after(p,p,g) - -- setfield(p,"next",g) - -- setfield(g,"prev",p) - -- setfield(g,"next",n) - -- setfield(n,"prev",g) setfield(n,"spec",s) + -- insert_after(p,p,g) + setfield(p,"next",g) + setfield(g,"prev",p) + setfield(g,"next",n) + setfield(n,"prev",g) setfield(s,"width",getfield(s,"width") - getfield(g,"width")) if a then setattr(g,a_characters,a) |