[tex-k] DVItype does not agree with DVI specification
Igor Liferenko
igor.liferenko at gmail.com
Fri Nov 26 07:29:53 CET 2021
Hi,
Run tex on attached file and then run `dvitype -dpi 600 test'.
We get this output:
439: setrule height 26214, width 7259459 (4x920 pixels)
h:=3596434+7259459=10855893, hh:=1376
We have just typeset a rule. According to DVI specification[1],
we have this case (section 2.6.2):
If x exceeds the bounds outlined above, hh is set to be pixel_round(h+x).
We have x = 7259459, h = 3596434. According to definition of pixel_round
(section 2.6.2), we need to calculate (h+x)*K, where K = 0.00012668 (see
header of dvitype output):
(3596434 + 7259459) * 0.00012668 = 1375.22452524
Rounding algorithm used in pixel_round is called
"Round half away from zero"[2]. So we get 1375.
But dvitype says hh is 1376. Can somebody explain this?
BTW, in section 2.6.2 DVI spec says
abs(hh − pixel_round(Kh))
and
pixel_round(Kh) + sign(dist) * max_drift
which makes no sense, since pixel_round takes DVI units as argument
(Kh is the number of pixels)
Greetings,
Igor
[1]: http://mirrors.ctan.org/dviware/driv-standard/level-0/dvistd0.pdf
[2]: https://en.wikipedia.org/wiki/Rounding
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.tex
Type: application/x-tex
Size: 643 bytes
Desc: not available
URL: <https://tug.org/pipermail/tex-k/attachments/20211126/4610699d/attachment.tex>
More information about the tex-k
mailing list.