[dev-context] texexec --scale=2 buglet (PATCH)
Sanjoy Mahajan
sanjoy at mrao.cam.ac.uk
Wed Nov 29 05:33:26 CET 2006
In documenting as many texexec switches as I can find, I ran across this
buglet:
$ texexec --pages=1 --pdfcopy --scale=2 xyz.pdf
...
! Number too big.
\@@efscale ->2222222222
22222222222222222222222222222222222222222222222222222...
The culprit is line 431 of texexec.rb (v6.2.0):
scale = (scale * 1000).to_i if scale.to_i < 10
where the (scale * 1000) should be (scale.to_i * 1000), otherwise ruby
is doing like Python: with scale as a string, the * 1000 replicates it
1000 times!
While looking at the code, I wondered about the next few lines:
f << "\\definepapersize\n"
f << " [copy]\n"
f << " [width=\\figurewidth,\n"
f << " height=\\figureheight]\n"
Shouldn't the width be \\figurewidth * (scale/1000), and the same idea
for height? Otherwise scale=2000 will expand the figures beyond the
page size.
-Sanjoy
`Our society is run by insane people for insane objectives.' (John Lennon)
More information about the dev-context
mailing list