viewing long pages, evince seems to choke on simple test file

Mike Marchywka marchywka at hotmail.com
Tue Sep 10 01:43:53 CEST 2019


On Tue, Sep 10, 2019 at 12:32:37AM +0200, Reinhard Kotucha wrote:
> On 2019-09-09 at 11:46:05 -0600, Doug McKenna wrote:
> 
>  > Mike Marchywka wrote:
>  >
>  > >| Was there some reason known for this
>  > >| or as the other response suggested this
>  > >| was back in the day of 32 or 16 bit integers?
>  >
>  > TeX uses 32-bits as the word size of integers, with the upper 16
>  > bits the signed integer part of a fixed point "Dimension" and the
>  > lower 16 bits for the fractional part.  But the connection to the
>  > real world is that the low-order 16 bits measure 1/65536th of a
>  > point, each point being 72.27 per inch.  Had these bits measured
>  > 1/10000th of a point, Knuth would have avoided some input/output
>  > round-off problems, and would have increased the dynamic range of a
>  > Dimension by a factor of 6 or so, with attendant loss of precision.
>  > C'est la vie.
> 
> I don't think that Knuth would have avoided any rounding errors by
> using decimal numbers.  Computers still use the binary system
> internally.  Rounding errors occur when you convert binary numbers to
> decimal and vice versa.  Of course, this is quite confusing to humans.
> But keep in mind that even the decimal number 0.1 cannot be
> represented in the binary system with a finite amount of binary
> digits.

Well, you just do the rounding for humans usually.
What exactly are those numerator, denominator, and magnification
in the dvi preamble supposed to do? 
I was going to suggest rationals with scaled page size left to the
final display device to turn into actual dimensions but most typoggraphical
professionals don't like scaling AFAICT. Rationals are nice because they
are exact and it is also easy to print fractions.  With 32bit
numerator and denominator I think it gives you good resolution and
dynamic range compared to just a 64 bit range with fixed 1 bit steps
although maybe someone has looked into it more. This also
can let you maybe defer divisions a little and since 64 bit support
is common now there is little effort in multiplying 32 bit numbers. 

> 
> Given that Knuth did not consider printing on toilet paper, his
> decision was quite reasonable.  He used floating point numbers at the
> beginning but switched to fixed point integer numbers when he noticed
> that he got different results on different machines.
> 
> Sure, more than 32 bit for dimensions would be quite nice in some
> special cases but after all, he wrote TeX in order to write his own
> books in the first place.  Much more annoying is the limited range in
> Metapost because you often have to do extensive calculations in order
> to determine dimensions, hence intermediate results are likely to
> cause an overfow.
> 
>  > On today's 64-bit machines, one (ahem!) might configure a
>  > TeX-language interpreter at compile time to use [48:16] fixed-point
>  > arithmetic, which would allow a single page to be about 30 million
>  > miles long.  Sadly, that unrolled scroll would make it only about
>  > 20% of the way to Mars.
> 
> This doesn't make much sense either because PDF (at least 1.4) has similar
> limitations.  Only a homemade DVI driver could extend the range, but
> it could also scale the page so that the range of TeX's dimensions can
> be left as it is.
> 
> BTW, there is a nice TUGboat article by Nelson Beebe about different
> representations of numbers and their quirks:
> 
>   https://tug.org/TUGboat/tb28-3/tb90beebe.pdf
> 
> Regards,
>   Reinhard
> 
> --
> ------------------------------------------------------------------
> Reinhard Kotucha                            Phone: +49-511-3373112
> Marschnerstr. 25
> D-30167 Hannover                    mailto:reinhard.kotucha at web.de
> ------------------------------------------------------------------

-- 

mike marchywka
306 charles cox
canton GA 30115
USA, Earth 
marchywka at hotmail.com
404-788-1216
ORCID: 0000-0001-9237-455X



More information about the texhax mailing list