Tuesday, November 11, 2003

Kates Playground Watch Free

Creating EPS figures from Windows

This is a question that makes me very often. And the answer is long, I decided to write here once and for all. The question may appear in various forms, being one of the most frequent How I can include a chart in Excel LaTeX?
Whether an Excel chart and any other graphics generated with any Windows program, the procedure is the same (although the Excel chart often has a particular problem I will explain later). It's about having installed a PostScript printer driver (although we have no real printer) and use that driver to "print to file." Thus, the code that is sent to the printer (PS) is stored in a file that can be used as a figure in LaTeX. Unfortunately,

all printer drivers windows that I could prove (even the "official" Adobe) generate EPS bad that needs to be retouched later. I describe the process.

install PS printer. I will assume you have installed Windows XP. In other versions of Windows the process is similar.
(print to file) in the printer model choose Apple Color LaserWriter 12/600 . In fact, any PostScript printer works, but I've always used that and have never had problems, so why change? Finally, do not put it as the default printer! Once installed the printer from the panel printer management in the new press the right button and choose "Properties." In the window that comes in the "General" tab is a button that says "Printing Preferences." Click it, and leaving the window, click "Advanced." This will open a new window which presents a view as a "tree" with the printer options. In the segment called "Document Options", is a branch called "Postscript Options", and it is an option called "PostScript Output Option", which by default windows has been set to "Optimize for speed." You should change that to "Encapsulated Postscript (EPS)." generate PS file. Go to your favorite drawing application. Click the picture and when you list, print it out. When you exit the Print dialog, choose the Apple printer we have installed in the previous step, and hit print. At that time I asked for a name for the file to be generated. Give the name of your choice, and remember what folder you saved it. In a few seconds Windows has finished printing, and file you specified will figure in EPS format (although some Windows versions insist on putting the file extension . Prn , the content is EPS, so you can rename without problems.) If the drivers did not have BoundingBox. The BoundingBox

is a rectangle that indicates which part of the page is what actually contains the drawing. LaTeX this information is important because it will calculate the space occupied by the figure according to

BoundingBox. But does Windows incorrectly

  1. BoundingBox equal to the entire page, so you need an extra step to fix it. Arranging
    1. BoundingBox . For this step you need Ghostview application, but if you're trying to insert LaTeX EPS figures probably already have it right?. Enough to open with ghostview
    file we created in the previous step, and you choose the "File" menu the "PS to EPS." This will create a file that (at least in theory) already have the correct

  2. BoundingBox. To verify you can display it in ghostview, enabling the "Show Bounding Box", you draw a dotted rectangle around the BoundingBox . If this rectangle includes adjusting your figure, everything is perfect. You can include this EPS in a LaTeX document. If you are going to process it with pdflatex, you must convert it to PDF, which can also be done from ghostview Other considerations. If you try to convert the chart was created with Excel, additional problems may arise due to the Excel application itself, because if you select a graphic in this application and sent to print, the result is often wrong (without drawing areas, areas black ...), so its conversion to PS will also be incorrect. The only solution I know this

    bug is to copy the chart from Excel and paste it into another application (Word, for example) from which you can print and smoothly. On the other hand, there is a program (shareware ) called wmf2eps that it helps if you have to do lots of graphics. You've proven that the previous method of printing a file, rename a result, open it in ghostview

  3. and resave it as EPS, can be tedious. Wmf2eps program simplifies the process by allowing you to select the chart in your application, copy and paste it in the program wmf2eps . Once stuck there, pressing a button will be converted to EPS. Actually this program is limited to print the chart to a PS printer (which therefore you must have installed anyway), and then fix the BoundingBox . I hope this information is helpful to someone. If you find any problem in trying to follow these steps or have questions, leave a comment on this blog.

0 comments:

Post a Comment