Next: How to start an
Up: Windows
Previous: Windows
Converting Windows graphics files (powerpoint, minitab graphs) to
postscript for inclusion in Latex documents
- In newer versions of Powerpoint, you may be able to save directly
as a ps file.
- One way that seems to work well is to print the graphic to a file
rather than to the printer from within your Windows application. Start
to print as you usually would, but instead of actually hitting 'print',
click the box that says 'save to a file' and save as file.eps.
- move the file to a UNIX box.
- >dos2UNIX file.eps # this gets rid of the M
characters in the dos file; I'm not sure if this step is needed
- run >ps2epsi file.eps file2.eps - this adds a bounding box
and gets rid of some Windows garbage from the beginning of the eps
file
- include file2.eps in your Latex document; make sure that Latex knows to only use the clipped part of the figure or you may get a bunch of whitespace in your document. To do this, syntax of the following sort should work should work:
\epsfig{file=file.ps,clip=}
\includegraphics[clip]{file.eps}
- To extract a graphic from a Powerpoint file, I've had some success
with the following recipe.
- save the graphic from within Powerpoint as a png file
- convert to a jpeg file using MS photoeditor
- insert in a Lyx or Latex file
- use pdflatex to produce the pdf output
- Theoretically, the following should work, but I've had problems with
the clarity of the jpeg figure when moved to UNIX, and I've also had
problems with the bounding box. But here's the approach anyway: Save
the file as a jpeg file and then use pdflatex. One disadvantage of
this method is that pdflatex does not handle postscript figures, so
you can't mix jpeg and ps figures. But you can convert your ps figures to pdf or jpeg
and include them that way using the \includegraphics
command as below.
- Save the file as a jpeg file directly in the Windows app.
- Crop in Photoshop or some other Windows graphics package, or move
to UNIX, and crop in xv
- In your Latex file,
- \usepackage[pdftex]{graphics} in your
preamble
- \includegraphics{file.jpg} to include the
figure
- compile your Latex file and convert directly to pdf using pdflatex:
>pdflatex file.tex
- The following has worked for me in the past, but some of the graphics
don't come out as well as they seem to with the above method. I believe
the basic problem lies in creating a ps file (based on vector graphics)
from a pixel-based file, such as bmp, jpeg, etc., but my knowledge
in this area is scant. This conversion tends to result in a much less
clear figure and in one that is very large.
- Make your powerpoint (or other) file. You may want to make your
line widths thicker than usual and make your text bold.
- save your powerpoint (or other) file as a .bmp file. (jpeg, tiff,
and gif seem to give splotchy images when converted to eps/ps; this
happens when using the jpeg2ps utility as well).
- move to a Linux machine and do ">convert file.bmp
file.ps". Then, to get a tight bounding box, do ">ps2epsi
file.ps file.epsi". If the box is not quite as you want
it, you can manually edit the bounding box line in the .epsi file,
but ps2epsi usually does a nice job.
- include the figure in your LaTeX file
Next: How to start an
Up: Windows
Previous: Windows
Chris Paciorek
2006-04-02