Hi Hans,
So, if there has been serious issues not resolved (the last year) let me
know.
I've been having two issues with parfillskip nodes in LMTX that I
haven't been able to figure out myself. Neither of them are particularly
serious, but the first one is quite annoying.
(The below is mostly copied from an earlier email, "Callbacks (and
nodes) in LuaMetaTeX")
1. In LMTX, calling "tex.linebreak" produces a
luatex warning > tex: left parfill skip is gone
warning. I don't get this warning in Plain LuaTeX, LuaLaTeX, or
MkIV, so I think that it's specific to LuaMetaTeX. The LuaMetaTeX
manual hardly mentions "left parfill skip"/"parfillleftskip", so I'm
not too sure what to do to avoid this warning.
Any call to "tex.linebreak" seems to produce this warning. Here's a
minimal example:
\startluacode
function test(head)
tex.linebreak(node.copylist(head))
return head
end
nodes.tasks.appendaction("processors", "after", "test")
\stopluacode
\starttext
Hello!
\stoptext
And a less minimal example:
% From CTAN or modules.contextgarden.net
\usemodule[lua-widow-control]
\starttext
\dorecurse{10}{\samplefile{knuth}}
\stoptext
With the lwc module, I call "tex.linebreak" twice for every
paragraph, so these warning messages get quite annoying. The log
file for compiling the lwc manual
https://github.com/gucci-on-fleek/lua-widow-control/runs/6946059955?check_suite_focus=true#check-step-9
is 22000 lines long, most of which are "left parfill skip" warnings.
2. The LuaMetaTeX manual says that "pre_linebreak_filter" is called
_after_ the parfillskip glue has been added, but this doesn't seem
to be the case. With LuaLaTeX/Plain LuaTeX/MkIV, this is true, but
the node list passed to the callback in MkXL is missing the
parfillskip.
This code:
\startluacode
function test(head)
local last = node.slide(head)
print "START"
for i=1,3 do
print(last)
print(
node.type(last.id),
node.subtypes(last.id)[last.subtype],
last.width,
last.stretchorder,
last.stretch
)
last = last.prev
end
print "STOP"
return head
end
nodes.tasks.appendaction("processors", "after", "test")
\stopluacode
\starttext
Hello!
\stoptext
with MkXL produces:
START
nil : glue spaceskip>
gluespaceskip 341648 0 384354
2258 : glyph unset>
glyph nil 213792 nil nil
2521 : glyph unset>
glyph nil 385140 nil nil
STOP
START
nil : glue userskip>
glueuserskip0 2 65536
2357 : glyph unset>
glyph nil 385140 nil nil
2611 : rule strut>
rulestrut 0 nil nil
STOP
but with MkIV produces:
START
nil : glue 15>
glueparfillskip 0 nil 65536
1041 : penalty 2>
penalty linepenalty nil nil nil
1239 : glyph 256>
glyph nil 213792 nil nil
STOP
START
nil : glue 0>
glueuserskip0 nil 65536
1479 : glyph 256>
glyph nil 385140 nil nil
1375 : hlist 2>
hlist box 0 nil nil
STOP
This problem isn't very serious at all since I can work around it
fairly easily, but I'm including it since it's so closely related
to the issue above.
I _think_ that both of these are engine bugs, but I may just misreading
the docs or missing something completely. Please let me know if you have
any solutions.
Thanks,
-- Max
___
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___