MathGroup Archive 1999

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

Search the Archive

HOW BEST for figs: Mathematica -> Textures -> PDF ? (long)

  • To: mathgroup at smc.vnet.net
  • Subject: [mg18630] HOW BEST for figs: Mathematica -> Textures -> PDF ? (long)
  • From: campbell at beloit.edu (Paul J. Campbell)
  • Date: Tue, 13 Jul 1999 01:01:43 -0400
  • Organization: Beloit College
  • Sender: owner-wri-mathgroup at wolfram.com

Thank you to all correspondents for their replies. Here I summarize what I
learned from the responses plus my own experiments.

HARDWARE: Power Macintosh G3, LaserWriter IINT.

SOFTWARE: Mac OS 8.6, LaserWriter 8.6.5, Mathematica 3.0.1 PPC, Adobe
Acrobat 2.1, Textures 1.8, Adobe Acrobat Distiller 3.0, Adobe Illustrator
6.0. 

GOAL: An EPS file that gives a preview in Textures that is the correct
size and that prints with the right fonts.

WHAT WORKS BEST
In Mathematica: Set File -> Printing Settings -> Printing Options?  to a
top margin of 0.5 in and other margins to 0.0. Also, set File -> Printing
Settings -> Page Setup to Paper: US Letter and select PostScript Options
-> Precision Bitmap Alignment. Click the graphic (not the cell).and select
File -> Print Selection? 

In the LaserWriter print dialog, select Destination -> File. Set the
options in  Save as File to Format: AcrobatPDF, with the boxes Embed All
Fonts, ASCII Format, and Make Font Subsets all checked. Under the option
Font Settings, set Preferred Format -> Type 1 and check the boxes Always
download needed fonts and Never generate Type 42 format. 

Use Acrobat 2.1 to open the PDF produced and select Print. Select
Destination -> File. Set the options in Save as File to Format: EPS Mac
Standard Preview, with PostScript Level: Level 1 Compatible, Data Format:
ASCII, and Font Inclusion: All But Standard 13. Set the options in Font
Settings as above.

Once included in a Textures document, the EPS has a preview, appears on
screen and prints with the right Mathematica fonts, and prints without
error to a PostScript Level 1 printer. (However, Courier gets substituted
for the author's Geneva-Bold, which causes some spacing irregularities and
make it necessary to enlarge the left or the right margin.)

For the final steps to produce the complete PDF document that includes the
figure, select the typeset window and choose Print. Select Destination ->
File. Set the options in Save as File to Format: PostScript Job, with
PostScript Level: Level 1 Compatible, Data Format: ASCII, and Font
Inclusion: All But Standard 13. Set the options in Font Settings as above.

[Printing directly to PDF format may work here---I haven't tried it.]

Then use Distiller to process the PS file to a PDF file, with Job Options?
as follows: 
--General: Compatibility: Acrobat 2.1
--Font Embedding: Embed All Fonts and Subset Fonts below 99%.
--Advanced: Distill with prologue.ps/epilogue.ps (I don't know if this
makes any difference)
Also, set Font Locations to search Mathematica 3.0 Files:System Files:
Fonts:Type 1

The resulting PDF appears on screen and prints with the correct fonts.

WHAT DOESN'T WORK
If margins are set all to 0.0, top of figure  in PDF is cut off. Printing
the EPS file from the EPS file cuts off more.  Other settings can produce
excess space on sides.

Use Graphic Converter (with Mac-GhostScript 5.50) to add a preview to EPS
printed from Mathematica. [Tried this; result has wrong fonts,  and
preview produced fails to scale with scale factor in Textures.]

Just Print Selection to an EPS file. [No matter how you set the print
dialog, you don't get a preview; and the size of the figure is wrong due
to Mathematica setting magnification of graphic to 80% for output. Latter
problem can be fixed by changing the setting in Mathematica---thanks to
P.J. Hinton for instructions on how.]

Printing the selection to Illustrator format produces a \015 error when
Illustrator 6.0 is used to try to open the file. [Mathematica Mac version
seems not completely adapted to the Mac; Wolfram folks know about this
problem but haven't patched it.] (Thanks to Karl Unterkofler for the
suggestion, who suggested this approach, and for whom it may work in a
later version of Illustrator.)

Printing the selection to EPS, opening in Illustrator 6.0, and then saving
in Illustrator EPS format produces a file that has a preview in Textures
with the correct fonts but printing from Textures gives font substitutions
for Mathematica fonts. Printing the Textures typeset window to an EPS and
processing with Distiller (as above) results in a PDF file that gives an
error message when loaded ("Some text in the font and character Math1 128
could not be displayed or printed correctly. The font could not be
reencoded."). The screen version looks OK; however, the printed version
has some of the characters correct but others still wrong: for example, a
"pi" comes out right but the horizontal bar in "pi over 2" is missing.

FURTHER SUGGESTIONS FROM RESPONDENTS

Use the new Adobe PS 8.6 driver released 6/99. (Thanks to Michael J.
Sharpe). [Haven't tried it yet.]

Produce PICT versions of the figures with desired resolution via optional
parameters of Display[], viz., 

Display[filename<>".pict",gr,"PICT",ImageResolution->150,ImageSize->850. 

(Thanks to Dan Truong). [A good idea, but whenever possible I prefer
smaller size of EPS files.]

To get a high-quality bitmap, size the graphic to final dimensions, select
it, choose Magnification of 200% or 300%, choose "re-render Graphics," go
back to 100%; the graphic should now appear to be anti-aliased
(desirable). Then Save Selection as Bitmap ICT (not plain or "object"
PICT). (Thanks to Russell Towle.) [The problem for me is that I need to
choose the final size interactively, hence prefer scaling later.]

Remove the Mathematica TrueType fonts (in suitcase in Fonts:Macintosh)
selectively---that is, leave one size of each font. (Thanks to Michael J.
Sharpe.) [Haven't tried this.]

Protect problematic characters with a style wrapper that forces the kernel
to emit MPS that just refers to the font in question. Here is an example
where we set the text style of the graphic to use an italic font
variation, but we protect the Math font character with StyleForm.

Plot[
  Sin[x] ,{x,0,2Pi}, 
  TextStyle -> {FontSlant -> Italic},
  PlotLabel -> 
    SequenceForm[
      "The sine curve\nbetween 0 and 2",
      StyleForm["\[Pi]", FontSlant -> Plain]
    ]
]

This problem also showed up in early releases of Mathematica, and it has
been addressed in subsequent versions.

(Thanks to P.J. Hinton.) [I haven't tried this.]

Markus van Almsick has uploaded onto MathSource a set of Textures Metrics
for Mathematica fonts, at 

http://www.mathsource.com/Content/General/Utilities/0209-720

Thanks again to all correspondents for their replies. Please send further
comments to me directly.


  • Prev by Date: Re: Re: LaTex on a Mac
  • Next by Date: Re: Not Plotting Vertical Assymptotes
  • Previous by thread: Printing code formatted with spaces and tabs
  • Next by thread: Re(2): Re: RE: Re: Re: easiest way to sort a list?