Hi Frank,

Here's the whole story:

function oneliner(head)
    local h = node.hpack(head)
local d = tex.baselineskip.width - tex.nest[tex.nest.ptr].prevdepth - h.height
    tex.nest[tex.nest.ptr].prevdepth = h.depth
    tex.nest[tex.nest.ptr].prevgraf  = 1
    local n
    if d < tex.lineskiplimit then
        n = 1
        d = tex.lineskip
    else
        n = 2
    end
    local s = node.new("glue_spec")
    local n = node.new("glue",n)
    s.width = d
    n.spec = s
    return node.insert_before(h,h,n)
end

-- the function also has to take care of adding proper skips
-- before (and if needed after) and setting some parameters

callback.register("linebreak_filter",oneliner)

Hans


-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
    tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------


_______________________________________________
dev-luatex mailing list
[email protected]
http://www.ntg.nl/mailman/listinfo/dev-luatex

Reply via email to