MathGroup Archive 1994

[Date Index] [Thread Index] [Author Index]

Search the Archive

Fixing PS files for import

  • To: mathgroup at yoda.physics.unc.edu
  • Subject: Fixing PS files for import
  • From: claudio at uclink.berkeley.edu
  • Date: Mon, 4 Apr 94 16:17:05 PST

> It would be very appreciated if you could help me with the following
> problem. I am trying to prepare a Mathematica graph for import in for
> example Ghostview to view it. How do convert the "raw" postscript from
> Mathematica to the "ordinary" postscript understood by Ghostview?

> I run the Windows version 1.0 of Mathematica v.2 on a PC. This version does
> not seem to have a direct way of doing the above.

I'm not sure what you mean by version 1.0 of Mathematica v.2 but with
Mathematica 2.1 and 2.2, there's an option to export a cell as
postscript or eps.  If your Mathematica version doesn't support this, 
you'll have to do it manually.

To do it manually, you need to use the \winmath\ps.txt file and make a 
few variable substitutions.  Here's a sed script to do them for you:

s/$left/0.000/
s/$bottom/0.000/
s/$right/612.000/
s/$top/792.000/
s/$date//
s/$preview//
s/$lmarg/0.000/
s/$rmarg/0.000/
s/$bmarg/0.000/
s/$tmarg/0.000/
s/$width/8.500/
s/$height/11.000/
s/$transform//
s/$nodistort/true/

If you don't have sed, just do it manually.  You need to replace any 
occurrence of $left in ps.txt with 0.000, delete any occurrence of 
$transform, etc..  

When you're done with that, replace the $body line with your Mathematica 
postscript file.  Now, you'll have a real postscript file viewable with 
GhostView.  

    - Claudio Fahey <claudio at uclink.berkeley.edu>






  • Prev by Date: COMPMED 94 FINAL SCHEDULE
  • Next by Date: Problem with Input in a notebook
  • Previous by thread: COMPMED 94 FINAL SCHEDULE
  • Next by thread: Problem with Input in a notebook