[luatex] Bug in tex.linebreak ?
Frank Mittelbach
frank.mittelbach at latex-project.org
Thu Mar 10 11:01:51 CET 2016
you are proving my point aren't you?
> \setbox0\hbox{\input tufte }
> \directlua{
> local n,t,head
> head = tex.box[0].head
> n, t = tex.linebreak(node.copy_list(head), {looseness=1})
> print("1.1",t.looseness)
> n, t = tex.linebreak(node.copy_list(head), {looseness=0})
> print("1.2",t.looseness)
> }
> \directlua{
> local n,t,head
> head = tex.box[0].head
> n, t = tex.linebreak(node.copy_list(head), {looseness=1,
> tolerance=4500, pretolerance=100, emergencystretch=655360 })
> print("2.1",t.looseness)
> n, t = tex.linebreak(node.copy_list(head), {looseness=0,
> tolerance=4500, pretolerance=100, emergencystretch=655360 })
> print("2.2",t.looseness)
> }
> \tolerance4500 \pretolerance100 \emergencystretch10pt
> \directlua{
> local n,t,head
> head = tex.box[0].head
> n, t = tex.linebreak(node.copy_list(head), {looseness=1})
> print("3.1",t.looseness)
> n, t = tex.linebreak(node.copy_list(head), {looseness=0})
> print("3.2",t.looseness)
> }
>
> 1.1 0
> 1.2 0
> 2.1 1
> 2.2 1
> 3.1 1
> 3.2 1
1.2 2.2 and 3.2 should show "0" given that we run the linebreaking
with looseness zero but 2.1 and 3.1 still show "1"
and if you add t.prevgraf you can see that it actually does do
looseness correctly:
1.1 0 7
1.2 0 7
2.1 1 8
2.2 1 7
3.1 1 8
3.2 1 7
am I missing something? the first column reports wrong values
frank
More information about the luatex
mailing list