#!/usr/local/bin/perl -i # read a ps file made by maple # and write it with better BB and without the silly black box. eval "\$$1=\$2" while @ARGV && $ARGV[0]=~ /^(\w+)=(.*)/ && shift; while( <> ) { if ( /Creator/ && !/Maple/ ) { print STDERR "warning, creator not Maple\n" ; print STDERR $_ ; } if ( /BoundingBox/ ) { $_ = '%%BoundingBox: 120 120 500 610'."\n" ; } if ( /The following draws a box around the plot/ ) { $_ = <> ; $_ = <> ; $_ = <> ; $_ = <> ; $_ = <> ; $_ = <> ; $_ = <> ; $_ = <> ; $_ = <> ; } print ; }