# [Dev-luatex] Fwd: [lltx] linebreak_filter problems

Patrick Gundlach patrick at gundla.ch
Sun Jun 10 20:58:30 CEST 2012

(wrong list, forwarded)

Von: Frank Mittelbach <frank.mittelbach at latex-project.org>
Betreff: [lltx] linebreak_filter problems
Datum: 10. Juni 2012 16:50:26 MESZ
An: <lualatex-dev at tug.org>

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{%
end
callback.register("linebreak_filter", hpackparagraph)
}%
\par
}

\setbox0\vbox{ABC\par
\showthe\lastnodetype
}

\setbox0\vbox{ABC\partest
\showthe\lastnodetype
}

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

thanks
frank