[tex-k] Where does conversion of PostScript pts to TeX pts occur?
Doug McKenna
doug at mathemaesthetics.com
Mon Jan 28 02:11:12 CET 2019
Thanks for all the info on my question.
I've now spent some time perusing the WEB sources for pdftex to see what units it traffics in and I noticed something that may or may not be a bug. I'm guessing not after all these years (or perhaps it's now a feature), but I'm not sure why, and can't really think through the consequences.
The source file is pdftex.web, as found in the git repository that Tom R. mentioned:
<https://github.com/TeX-Live/texlive-source/blob/trunk/texk/web2c/pdftexdir/pdftex.web>
A line in the initialization code reads:
one_bp := 65782; {65781.76}
This is the closest [16:16] fixed-point value for 72.27 / 72.0 = 1.00375.
But TeX thinks that 1bp is actually the fixed-point integer 65781, as demonstrated by executing this TeX code:
\newdimen\onebigpoint \onebigpoint=1bp
\newcount\testbpvalue \testbpvalue=\onebigpoint
\the\testbpvalue
So pdftex is using a rounded up value (which is closer to the true value), but TeX is rounding down (and always will).
This strikes me as a potential problem when comparing bigpoint dimension values.
Perhaps there are no consequences to any of this, but I just thought I'd mention it for the cogniscenti listening to see if there's an explanation. There's no comments in the code on the motivation for rounding it up even though TeX rounds down.
- Doug McKenna
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/tex-k/attachments/20190127/58c856f5/attachment.html>
More information about the tex-k
mailing list