Re: Display is wrong
- To: mathgroup at smc.vnet.net
- Subject: [mg9598] Re: Display is wrong
- From: "P.J. Hinton" <paulh>
- Date: Thu, 13 Nov 1997 23:24:09 -0500
- Organization: Wolfram Research, Inc.
- Sender: owner-wri-mathgroup at wolfram.com
Peter Nyffeler wrote: With all of these PostScript questions, I'm wondering if I'm going to have to write a short course on the perils of PostScript and Mathematica 3.0. :-) > I use Mathematica 3.0.1.1x on Windows NT4.0 > > What I have tried: > 1. Generating a Postscript file with Display["file.ps",out[#]]. - > Result: the postscript file is not an Adobe postscript file and can't > be printed. You are correct, the file is not Adobe PostScript. That's because the code generated in this instance is Mathematica abbreviated PostScript ("MPS") that is understood by the notebook front end's PostScript interpreter. It is not valid for a generic PostScript interpreter as you would find on a printer. You can generate an encapsulated PostScript file using the syntax: Display["filename.eps", graphics object, "EPS"] or better yet, using the front end menu command Edit -> Save Selection As -> EPS. If you are using Mathematia 3.0.0.x, be sure to first download a new copy of PostScriptHeader.tr as mentioned in the FAQ page: http://www.wolfram.com/support/Graphics/Formats/EPS/FrontEndFix.html > 2. I did the same on a SUN and used psfix to make a Adobe postscript > file. - Result: (m/s) became Hm hL and (ASK-23) with Helvetica font > became HASK-23L where H and L are in default font. BIG NOTE HERE: When Mathematica generates PostScript code, it includes requests (findfont) for font families that are unique to Mathematica. They have the form Math[1-5][optional type face]. Cases where these fonts are used include math symbols, Greek characters, dingbats, and (most relevant here) grouping symbols, e.g. parentheses, brackets, and braces. The grouping characters are drawn from these special fonts because they are need to be stretchable in order to accomodate variable height math expressions. The psfix shell script simply adds appropriate header and trailer information to make the Mathematica abbrevated PostScript a valid PostScript file. It does not include any information for defining how the Math font characters should be drawn. When this file goes to your PostScript printer, the interpreter encounters the requests for the Math* fonts (in your case, it's probably Math2) and decides to substitute Courier instead because it doesn't have the Math2 font definied it its memory. The character "H" in Courier has the same character code as "(" in Math2. The same goes for "L" and ")". The fix for this problem is to make sure that the Math* fonts are in your PostScript printer's memory before you try printing the PostScript file. You can do this by following the instructions for your platform at URL: http://www.wolfram.com/support/Systems/All/ManualFontDownload.html > -Why the hell is the psfix file provided with the Windows version not an > exe file? Probably an oversight. psfix has always existed as a Bourne shell script on the Unix platform. Under 2.2 it was not implemented in any way for Windows. The file probably shouldn't be there. > 3. I went back to my NT machine and made a PDF file with > Display["file.pdf",out[#],"PDF"]. > - Result: Opening the file in Acrobat Reader 3.0 gives the warning "The > font 'Math2Mono' contains a bad/BBox". > -The rest is fine. OK I will live with it. I've seen this error message before, and it has been reported. I'm not sure why this is, though. Tip for all you Unix users who use Acrobat Reader: Make sure you include the path to the Mathematica Type 1 fonts on your PSRESOURCEPATH environment variable. For example, if Mathematica 3.0 is installed in /usr/local/mathematica, then you would have something like: PSRESOURCEPATH=/usr/local/mathematica/SystemFiles/Fonts/Type1 This will help you to avoid groteseque font substitutions like Peter saw when he was printing. > 4. Now I would like to get the plot in landscape format. The command is > Display["file.pdf",out[#],"PDF",ImageRotated->True]. -Don't look at the > result. You won't be able to read anything. Could you send an example of this behavior (commands and .pdf file) to support at wolfram.com? I'm sure that if a problem exists, they will be more than happy to pass it along to the developers. -- P.J. Hinton Mathematica Programming Group paulh at wolfram.com Wolfram Research, Inc. http://www.wolfram.com/~paulh/ Disclaimer: Opinions expressed herein are those of the author alone.