(wrong list, forwarded)

Von: Frank Mittelbach <[email protected]>
Betreff: [lltx] linebreak_filter problems
Datum: 10. Juni 2012 16:50:26 MESZ
An: <[email protected]>

Hi folks,

can somebody help me to identify if I do something wrong or if there is a bug 
with linebreak_filter.

Th problem is documented at length in

http://tex.stackexchange.com/questions/59176/lastnodetype-not-working-as-expected-in-luatex

In a nutshell I try to replace (at certain times) TeX's linebreaking algorithm 
and replace it with a simple version that just packs up the hlist into an hbox 
and returns that.

If I do that the resulting box appears on the current vertical list (ie is seen 
via \showlists) but at the same time

\lastnotetype  returns -1
\lastbox       picks up a void box

ie to some parts of TeX the list appears to be empty. Here is an MWE

\def\partest{%
  \directlua{%
    function hpackparagraph  (head)
      return node.hpack(head)
    end
    callback.register("linebreak_filter", hpackparagraph)
 }%
 \par
}

\setbox0\vbox{ABC\par
{\tracingonline1\showboxbreadth\maxdimen\showboxdepth\maxdimen\showlists}%
 \showthe\lastnodetype
}

\setbox0\vbox{ABC\partest
{\tracingonline1\showboxbreadth\maxdimen\showboxdepth\maxdimen\showlists}%
 \showthe\lastnodetype
}


Any ideas what goes wrong or how I should alter things to make this possible?

thanks
frank


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

Reply via email to