|
[Rivet-svn] r2369 - trunk/binblackhole at projects.hepforge.org blackhole at projects.hepforge.orgTue Mar 30 22:57:36 BST 2010
Author: buckley Date: Tue Mar 30 22:57:35 2010 New Revision: 2369 Log: Adding --pdfpng option Modified: trunk/bin/make-plots Modified: trunk/bin/make-plots ============================================================================== --- trunk/bin/make-plots Mon Mar 29 15:17:29 2010 (r2368) +++ trunk/bin/make-plots Tue Mar 30 22:57:35 2010 (r2369) @@ -1526,6 +1526,8 @@ dvipsargs += ' -f | ps2eps > %s.eps 2> /dev/null' % filename elif opts.OUTPUT_FORMAT == "PNG": dvipsargs += ' -f | convert -density 250 -flatten - %s.png' % filename + elif opts.OUTPUT_FORMAT == "PDFPNG": + dvipsargs += ' -f | ps2pdf - > %s.pdf && convert -density 100 -flatten %s.pdf %s.png' % (filename, filename, filename) elif opts.OUTPUT_FORMAT == "PSPNG": dvipsargs += ' -o %s.ps && convert -density 100 -flatten %s.ps %s.png' % (filename, filename, filename) else: @@ -1544,6 +1546,11 @@ shutil.copy(outpath, os.path.join(cwd,dirname)) outpath = os.path.join(tempdir, outbasename+".png") shutil.copy(outpath, os.path.join(cwd,dirname)) + elif opts.OUTPUT_FORMAT == "PDFPNG": + outpath = os.path.join(tempdir, outbasename+".pdf") + shutil.copy(outpath, os.path.join(cwd,dirname)) + outpath = os.path.join(tempdir, outbasename+".png") + shutil.copy(outpath, os.path.join(cwd,dirname)) else: outpath = os.path.join(tempdir, outname) if os.path.exists(outpath): @@ -1638,6 +1645,8 @@ help="Create Encapsulated PostScript output.") parser.add_option("--png", dest="OUTPUT_FORMAT", action="store_const", const="PNG", default="PS", help="Create PNG output.") + parser.add_option("--pdfpng", dest="OUTPUT_FORMAT", action="store_const", const="PDFPNG", default="PS", + help="Create PDF and PNG output.") parser.add_option("--pspng", dest="OUTPUT_FORMAT", action="store_const", const="PSPNG", default="PS", help="Create PS and PNG output.") parser.add_option("--tex", dest="OUTPUT_FORMAT", action="store_const", const="TEX", default="PS",
More information about the Rivet-svn mailing list |