<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Oct 6, 2020 at 10:00 PM Esger Renkema <<a href="mailto:esgerrenkema@gmail.com">esgerrenkema@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Dear list,<br>
<br>
The function node.rangedimensions(), when applied to vertical lists, <br>
includes contributions of (vertical) glue nodes in the (horizontal) <br>
width. A simple example:<br>
<br>
-------------------------------------------------------------<br>
\setbox0 = \vbox{<br>
     \vskip 10sp<br>
     \hrule width 1sp height 2sp depth 3sp }<br>
\directlua{<br>
     texio.write_nl (string.format(<br>
         '\csstring\%s, \csstring\%s, \csstring\%s',<br>
         node.rangedimensions(tex.box[0], tex.box[0].head))) }<br>
-------------------------------------------------------------<br>
<br>
-------------------------------------------------------------<br>
This is LuaTeX, Version 1.12.0 (TeX Live 2020/Debian)<br>
  restricted system commands enabled.<br>
(./bug.tex<br>
11, 2, 3)<br>
warning  (pdf backend): no pages of output.<br>
Transcript written on bug.log.<br>
-------------------------------------------------------------<br>
<br>
where the fourth line should be 1, 12, 3.<br>
<br>
The cause of this problem seems to be the function natural_sizes() <br>
defined in packaging.c; it looks like it was written with only <br>
horizontal lists in mind.<br>
<br>
This assumption also causes trouble with horizontal rules:<br>
<br>
-------------------------------------------------------------<br>
\setbox0 = \vbox{<br>
     \hrule height 1sp width 2sp<br>
     \hrule height 1sp }<br>
\setbox1 = \vbox{<br>
     \hrule height 1sp width 2sp<br>
     \hrule height 1sp width 2sp }<br>
\directlua{<br>
     texio.write_nl (string.format(<br>
         '\csstring\%s, \csstring\%s, \csstring\%s',<br>
         node.rangedimensions(tex.box[0], tex.box[0].head)))<br>
     texio.write_nl (string.format(<br>
         '\csstring\%s, \csstring\%s, \csstring\%s',<br>
         node.rangedimensions(tex.box[1], tex.box[1].head))) }<br>
-------------------------------------------------------------<br>
<br>
-------------------------------------------------------------<br>
This is LuaTeX, Version 1.12.0 (TeX Live 2020/Debian)<br>
  restricted system commands enabled.<br>
(./bug.tex<br>
-1073741822, 1, 0<br>
4, 1, 0)<br>
warning  (pdf backend): no pages of output.<br>
Transcript written on bug.log.<br>
-------------------------------------------------------------<br>
<br>
where the reported numbers should in both cases be 2, 2, 0.<br>
<br>
Regards,<br>
Esger Renkema<br>
<br>
<br></blockquote><div><br></div><div><br></div><div>Thank you for the report,  I will see asap.</div></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature">luigi<br></div></div>