I have recently switched from an older version of root (4.00) to a newer one (5.08 ) and I find that the postscript files that it produces cannot be processed properly by psnup. I have been using the command
psnup -2 -pletter file_in.ps file_out.ps
successfully in the past to map two pages onto one. However I now find that the output files contains larger images (which are therefore truncated) than the originals. If I pre-process the postscript file using ps2ps and then use psnup things are okay. It’s as if the root output is corrupt or lacking something that ps2ps corrects or adds.
Is there something I should be doing in my root program to avoid these problems?
We have been obliged to put an empty section:
In the ROOT PS files to make the CUPS printing system happy. See Revision 1.63 here:
root.cern.ch/viewcvs/postscript/ … Script.cxx
psnup, like psresize, is not happy about it. As CUPS is, unfortunately, the leading printing package these days we choose to make it happy rather than other tools like psnup or psresize. ps2ps removes the %%Setup section that’s why psnup is working properly once a ROOT PS file has been processed by ps2ps. The following little script will be as good as ps2ps to make a ROOT PS file compatible with psnup:
cat $1 | sed -e "s/%%BeginSetup//" | sed -e "s/%%EndSetup//" > nup_$1
if you call this script “nup” just do “nup c1.ps” (where c1.ps is a ROOT ps file) and you will get “nup_c1.ps” ready for psnup. You can also make a script doing both in one go (sed and psnup).