MathGroup Archive 1998

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

Search the Archive

Re: EPS file generation, that's compatible with GhostView, and includes all fonts

  • To: mathgroup at smc.vnet.net
  • Subject: [mg14666] Re: EPS file generation, that's compatible with GhostView, and includes all fonts
  • From: Timo Felbinger <timof at uranos.quantum.physik.uni-potsdam.de>
  • Date: Sat, 7 Nov 1998 02:10:22 -0500
  • Organization: University of Potsdam
  • References: <71rlv1$9qi$4@dragonfly.wolfram.com>
  • Sender: owner-wri-mathgroup at wolfram.com

On 5 Nov 1998, noname wrote:

> I guess, I was not the only one, having this EPS file problem: Trying to
> include EPS files into a LaTeX document messed up the whole page, it
> did not print out as it would from Mathematica, etc.
> 
> The problem, as mentioned on Wolfram's homepage, is due to the fact,
> that Matematica does not include the Type-1 fonts in the EPS file.
> 
> I have found a solution to that problem, but it is requirering the Adobe
> Acrobat software package:
 
[ ---lengthy procedure snipped--- ]
 
> If anybody can come up with a easier solution, maybe not requireing the
> Adobe Acrobat, I would appreciate getting the trick :-).

The following mathematica function can be used to create a valid
EPS-file  from a graphics object:

  CreateEPS[ filename_, graphics_ ] := (
    channel = "! sed '/^%%EndProlog$/r /Users/timof/ma/mathfonts.eps' >
" <> filename <> ".eps";
    Display[ channel, graphics, "EPS" ];
    Close[ channel ];
  )

This will use `sed' to insert a file (here:
`/Users/timof/ma/mathfonts.eps') below the `%%EndProlog' line, which I
believe is an appropriate position for  font definitions. The explicit
`CLose' is required when `Display' is called  with a pipeline instead
of a filename.

The inserted file should contain the required font definitions (for me,
typically Math1Mono and Math2Mono). It looks like this:

  %%BeginResource: font Math1Mono
  %%BeginFont: Math1Mono
  %!PS-AdobeFont-1.0: Math1Mono 001.000
  %%CreationDate: 1/31/97 at 11:40 AM
   
    [ ---lots of lines snipped--- ]
   
  0000000000000000000000000000000000000000000000000000000000000000
  cleartomark{restore}if

  %%EndFont
  %%EndResource

  %%BeginResource: font Math2Mono
  %%BeginFont: Math2Mono
  %!PS-AdobeFont-1.0: Math2Mono 001.000
  %%CreationDate: 1/31/97 at 1:02 PM
   
    [ ---lots of lines snipped--- ]
   
  0000000000000000000000000000000000000000000000000000000000000000
  cleartomark{restore}if

  %%EndFont
  %%EndResource

You have to create it once, either from the Type1 fonts that come with
Mathematica, or by  stealing the font definitions from a "complete"
EPS-file.

-- 

Timo Felbinger   (Timo.Felbinger at quantum.physik.uni-potsdam.de) Quantum
Physics Group
Institute of Physics
University of Potsdam, Germany



  • Prev by Date: Re: Help please, Agility of Power Series
  • Next by Date: Re: Re: Can I get ComplexExpand to really work?
  • Previous by thread: EPS file generation, that's compatible with GhostView, and includes all fonts
  • Next by thread: I have A Problem