[luatex] behavior of buildpage_filter ?

Hans Hagen pragma at wxs.nl
Mon Apr 4 00:56:32 CEST 2016


On 4/3/2016 9:48 PM, Frank Mittelbach wrote:
> Am 11.03.16 um 14:35 schrieb Hans Hagen:
>> On 3/10/2016 8:56 PM, Frank Mittelbach wrote:
>>> Am 10.03.16 um 20:33 schrieb Hans Hagen:
>>>> indeed, this is a known issue and it's on my list to look into that
>>>> (one
>>>> can check for the location, at least that's what i do as a way out for
>>>> now); we probably need an additional callback but not for the next
>>>> release (as one might need to adapt code due to a break in
>>>> compatibility)
>>>
>>> ok good, so much the better if it is already known. yeah one can program
>>> around it, even though it is again a bit painful :-)
>>
>> indeed and i must admit that when i ran into it long ago that it took me
>> a while to realize that i needed to ignore those; anyway, i checked what
>> i had in mind with this ...
>>
>> ... it's pre_box, box, pre_adjust and adjust which are the ones in post
>> line break and these are not followed by an actual break which happens a
>> bit later with its own call ...
>>
>> ... i'll move these four to a new callback contribute_filter
>>
>> (but for now, you'd better check for these 4 cases)
>
> Hi Hans,
>
> looks like the issue is not just resolved by looking for pre_box, box,
> pre_adjust and adjust and ignoring those.
>
> If you typeset a \vbox on the main vertical list then one gets 2 calls
> to buildpage_filter and both are with context "box". The first one seems
> to be the internal one during the actual build of the box and the second
> one a real buildpage but claiming the wrong context (or the first one
> claims the one context depending on what "box" is supposed to mean.
>
> Above you said you have a workaround checking for "location". Can you
> tell me what you mean by this?

I have no time now for a detailed response but the 0.90 version no 
longer calls the four troublesome cases but they go their own callback
contribute_filter (called with pre_box (when needed), pre_adjust(when 
needed), box (always) and adjust (when needed) and like before just 
before the box callback there is an append_to_vlist callback

if you use more than one callback in some solution you still might need 
to do some housekeeping but that all depends on what one wants to do

Hans


ps. For those doing things with glue: in recent versions access to glue 
properties is possible without messing with glue specs; in the > .90 
versions glue specs are completely gone (except as glue register 
structure). This makes interfacing from lua somewhat more convenient 
(and it's also somewhat more robust).

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


More information about the luatex mailing list