[luatex] rounding errors with node.dimensions?

Hans Hagen pragma at wxs.nl
Wed Apr 13 10:17:42 CEST 2016


On 4/13/2016 9:52 AM, Frank Mittelbach wrote:
> I'm looking for a simple way to determine if a paragraph breaking (by
> tex.linebreak) has some overfull boxes inside.
>
> My simple idea was to traverse the resulting list from tex.linebreak and
> use node.dimensions to compare for each hbox
>
>   -  n.width    width of the box
>
> with
>
>   - node.dimensions( n.glue_set, n.glue_sign, n.glue_order, n.head )
>
> which should give me the internal width of all nodes inside with the
> glue setting applied (at least that's the way I understand the manual).

such calculations are in floats

you can try tex.sp(result) to do rounding



-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
       tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl
-----------------------------------------------------------------


More information about the luatex mailing list