Putting Mathematica 3.0 figures into LaTeX

What to do with Mathematica 3.0 graphics in LaTeX? There are different methods, but this discusses going the route Mathematica Graphic to EPS file to PDF file to LaTeX. This works best for Mac OS X folks using the wonderful (and free) TeXShop to typeset LaTeX.

Note: If the numbering of the lists below is a bit off, it could be because of the browser you are using. iCab 4.7.1 has no problem. Microsoft Internet Explorer 5.1 for the Mac does.

  1. You could use the Display command to save a graphic as an EPS file.
    1. Change the working directory, if you haven't done this earlier.
    2. Make the graphic and either
    3. Do not try to save files directly PDF files, or the Classic Layer will crash. Every time, as far as I can tell.

    You may think that this method would always work. Wrong. The graph might still not render correctly as an EPS file. So... try the following:

  2. You could use the Save Selection As... menu item to save the EPS file.
    1. Select the graphic
    2. Use a Save Selection As... and select EPS.
    3. Save the file.
    4. Open the file in BBEdit Lite or Emacs.
    5. Go to line 1149 (cmd-J in BBEdit, M-x goto-line in emacs).
    6. Change the second number to be negative. (This tip comes from a Mathematica user's discussion.)
  3. Then, all you need to do is open up the EPS file using TeXShop - it will translate it into a pdf file. Then, inside LaTeX, just use the \includegraphics command without a suffix. There is an optional [width=] argument for the size.

The graph still might not import properly. Here is list of situations when the PDF has been messed up.


Send Bill comments about this page or go to his main home page

Last Updated Wednesday, May 10, 2006, 13:54