[luatex] post_linebreak_filter (partly) broken?

Frank Mittelbach frank.mittelbach at latex-project.org
Fri Mar 11 17:47:53 CET 2016


Am 11.03.16 um 14:00 schrieb Hans Hagen:
>> My guess is that  this is again a single global variable that is being
>> reused in several places (ie the hpack_filter ???) so that it gets
>> clobbered depending on what linebreak does
>
> It's a local variable passed to a function by value and not changed in
> between so can you check if it's not a latex callback wrapper that is
> obscuring it? (What groupcoude is shown in pre and not in post?)

no latex involved :-)

I did set up pre_linebreak_filter to find out the cases where line 
breaking happens on the main vertical list (in contrast to being done in 
a box, say). Then inside pre_linebreak_filter I run

   tex.linebreak

several times with different looseness (you cann see all my reports 
coming together :-) ) and record the different results

Then in post_linebreak_filter I replace the generated paragraph node 
list with something special (basically to drop it) and to be able to 
find out about the para on the contribution list (which I look at in 
buildpage_filter). Could probably be done differently but that was the 
simplest way to get this working for me.

Anyway, I only want to kill paragraphs if they are on the main vertical 
list but let the others through in normal typesetting so in 
post_linebreak_filter I go

  if groupcode == "" then ...

only that now groupcode is alway empty while in pre_linebreak_filter it 
was "vbox" or "adjusted..." etc depending on where I put paragraphs in 
my test file

so perhaps calling tex.linebreak kills its value

does this help?

frank


More information about the luatex mailing list