Re: Putting Mathematica Graphics into TeX or LaTeX?
- To: mathgroup at christensen.cybernetics.net
- Subject: [mg1775] Re: Putting Mathematica Graphics into TeX or LaTeX?
- From: bauer at kepler.lbm.mw.tu-muenchen.de (Bauer Sebastian)
- Date: Wed, 26 Jul 1995 00:57:52 -0400
- Organization: Lehrstuhl B fuer Mechanik, Technical University Munich
In article <DC3IE0.HMw at wri.com>, Ryan McMahon <mcmahon at utkux.utcc.utk.edu> writes: |> Does anyone know how to take a graphic image |> in mathematica and get a postscript copy of it |> so that is may be used in LaTeX? If you are using a frontend under X-Windows, just select the graphic with the mouse, and paste it into a file. On SUN Solaris there is the function xv_get_sel, with which you can redirect the selection (the graphic in the Mathematica frontend) into a file (select the graphic in the frontend, go into a terminal-window, i.e. xterm, without selecting by mistake anything else and write there "xv_get_sel > file.eps"). Or you can generally open an editor-window (i.e. in emacs), paste the selection (usually with the middle or right mouse button) and save the window as file.eps. There is no need to use psfix - the frontend is using standard PostScript code for graphics. Other then by using the Mathematica Display-Command with psfix later on, the BoundingBox is correct. In the NeXTSTEP version of the frontend, creating the eps-file is even easier: Copy the selected graphic (Cmd-c), then do "Convert Pasteboard" (?) (Cmd-m) and save the graphics from that panel (in the moment I am sitting in front of the SUN at work and not at the NeXTstation at home, so the names of the commands may be incorrect). The second method is - as discribed in the Mathematica-Book - to do i.e. myGraphic = Plot[...]; Display["!psfix -epsf > file.eps", myGraphic]; This runs the graphics produced by the Plot-command (or any other command) through psfix and puts that into the file "file.eps" in the current directory (set with SetDirectory["..."] in Mathematica). I have the feeling, that there is a bug in psfix or it is doing the following intentionally, but anyway, it doesn't set the BoundingBox of the eps-file to the boundaries of the graphics as it is shown in the frontend. So in my opinion the first method by using the select and paste of X-Windows (or the Convert Pasteboard menu-item in the NeXTSTEP frontend) is much better. Sebastian -- Sebstian Bauer <bauer at lbm.mw.tu-muenchen.de> Institute B for Mechanics, Technical University of Munich