jfbu / texdimens

Utilities and documentation related to TeX dimensional units
1 stars 0 forks source link

\texdimenwithunit{0pt}{1pt} plain wrong #4

Closed jfbu closed 2 years ago

jfbu commented 2 years ago

This is continuation of #3, after some delay because I managed in the meantime to bring down a server from an Emacs buffer, and decided to flee home after that.

*\message{\texdimenwithunit{0pt}{1pt}}
0.00002
*\message{\the\dimexpr0.00002\dimexpr1pt\relax\relax}
0.00002pt

But 0pt is handled correctly by \texdimenwithunit if second argument is >1pt. The problem here is that the computer guy applied a math formula proven only for conversion ratio >1, not =1. In #3, there is a different problem applying when second argument is <1pt. There the output is technically correct (although not quite pleasing).