Sanjoy Mahajan wrote:
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 okay: begin scale = (scale.to_i * 1000).to_i if scale.to_i < 10 rescue scale = 1000 end
!
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.
\getfiguredimensions a few lines earlier will calculate the scaled width which is then used Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------