<div dir="ltr">It appears to be a bug. I previously relied on the groupcode to indicate whether a paragraph was in a footnote or other insert, and that functionality suddenly stopped working. Hopefully this can be corrected soon (it may be in the most recent; I only have the older version from TexLive).</div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Apr 1, 2016 at 6:48 PM, Frank Mittelbach <span dir="ltr"><<a href="mailto:frank.mittelbach@latex-project.org" target="_blank">frank.mittelbach@latex-project.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Am 01.04.16 um 18:26 schrieb Frank Mittelbach:<div><div class="h5"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
From the manual I understand that the groupcode argument in the<br>
pre_linebreak_filter callback gives me the context where this paragraph<br>
breaking happens (eg <empty> means main vertical list, vbox means ...)<br>
<br>
Unfortunately that doesn't seem to be true:<br>
<br>
\directlua{<br>
require "ltluatex.lua"<br>
function prelinebreak (head, groupcode)<br>
print()<br>
print(" groupcode in pre_linelinebreak_filter = " ..<br>
groupcode .. " on line " .. tex.inputlineno)<br>
return true<br>
end<br>
luatexbase.add_to_callback("pre_linebreak_filter", prelinebreak, "new<br>
linebreak callback")<br>
}<br>
<br>
<br>
\input tufte<br>
<br>
\vbox{\input tufte }<br>
<br>
\vbox{\input tufte \par} % should report in<br>
vmode but reports main vlist<br>
<br>
\vbox{\begingroup \input tufte \endgroup}<br>
<br>
\vbox{\begingroup \input tufte \par\endgroup} % should report in<br>
vmode but reports main vlist<br>
<br>
looks like the groupcode reported depends on whether it is an explicit<br>
par or the implicit one from the box but not the actual context<br>
<br>
\bye<br>
<br>
is this a bug or do I miss something?<br>
<br>
The above means I can't really determine if a paragraph is in fact on<br>
the main vertical list or hidden inside some box so that it is<br>
unbreakable even if it eventually ends up (as a box) on the main<br>
vertical list.<br>
</blockquote>
<br></div></div>
as a workaround, I guess I can additionally look at the semantic nest pointer and if that is == 1 then I really at at paragraph on the main vertical list and if > 1 then not. Is this the right workaround?<span class="HOEnZb"><font color="#888888"><br>
<br>
frank<br>
</font></span></blockquote></div><br></div>