[luatex] callback documentation

luigi scarso luigi.scarso at gmail.com
Fri Dec 30 12:59:46 CET 2016


On Fri, Dec 30, 2016 at 12:31 PM, David Carlisle <d.p.carlisle at gmail.com> wrote:
> hi,
>
> The new build_page_insert callback is missing its function signature I
> think it's
>
> \startfunctioncall
> function(<string> extrainfo)
>         return <number> skip_register
> end
> \stopfunctioncall
hm no, see  base/mkiv/strc-not.lua


function notes.check_spacing(n,i)
    local gn, pn, mn = texgetglue(n)
    local gi, pi, mi = texgetglue(i > 1 and "s_strc_notes_inbetween"
or "s_strc_notes_before")
    local gt, pt, mt = gn+gi, pn+pi, mn+mi
    if trace_insert then
        report_insert("%s %i: %p plus %p minus %p","always   ",n,gn,pn,mn)
        report_insert("%s %i: %p plus %p minus %p",i > 1 and
"inbetween" or "before   ",n,gi,pi,mi)
        report_insert("%s %i: %p plus %p minus %p","effective",n,gt,pt,mt)
    end
    texsetglue(0,gt,pt,mt) -- for the moment we use skip register 0
    return 0
end

callback.register("build_page_insert", notes.check_spacing)

We will fix it.

>
> Also in the previous section, the description of contribute_filter
> seems a little bit confusing, it is split between [8.4.1
> contribute_filter] and [8.4.2 buildpage_filter and contribute_filter]
> with apparently different tables of the allowed values of the
> extrainfo/group_codes string in each case?
>
>
> David
OK, we will see it .It's related to tex/postlinebreak.w :
 443         if ((vlink(contrib_head) != null))
    444             checked_break_filter(pre_box);
    445         if (pre_adjust_head != pre_adjust_tail) {
    446             append_list(pre_adjust_head, pre_adjust_tail);
    447             checked_break_filter(pre_adjust);
    448         }
    449         pre_adjust_tail = null;
    450         append_to_vlist(just_box,lua_key_index(post_linebreak));
    451         checked_break_filter(box);
    452         if (adjust_head != adjust_tail) {
    453             append_list(adjust_head, adjust_tail);
    454             checked_break_filter(adjust);
    455         }
with
luatexcallbackids.h:#define checked_break_filter(A) if
(!output_active)
lua_node_filter_s(contribute_filter_callback,lua_key_index(A))

-- 
luigi


More information about the luatex mailing list