On 3/11/2016 5:47 PM, Frank Mittelbach wrote:
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?

not much but this is what happens:

pre line break
line break
post line break

these are done after each other and pre/post really get the same group context and theyu use the same callback logic so they report the same group code

however, the callback will not be issued on an empty node, so, if your linebreak removes something, then it can be that the post is not called

is there a < 10 line example available?

Hans

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

Reply via email to