How to validate and correct negative zero length?

I haven’t seen all your code, but did I see that you’re using repr for comparisons. From what I understood, 0pt and -0pt should be the same positions, but because you’re using repr, they’re not?

#let (x1, x2) = (0pt, -0pt)

= Values #x1 and #x2

Are they the same?
#x1 #x2
#(x1 == x2)

And their `repr`?
#repr(x1) #repr(x2)
#(repr(x1) == repr(x2))

Here, their repr makes a noticeable difference, as it’s strings.

2 Likes