Rik's Treehouse > Babbling in Binary > Tips 'n' Tricks > MikTeX (and LaTeX) |
MikTeX is an excellent freeware version of LaTeX available for the Microsoft Windows 32-bit platforms. The author is serious about maintaining and improving MikTeX and it shows in the final product.
Problem: I want to include an MS Excel chart (or some other graphic) in my LaTeX document. How do I do that?
Solution: You have to print the selected chart/graphic to an Encapsulated PostScript (.eps) file. Then you can use the standard packages to include the .eps file in your document. To print Encapsulated PostScript you will need to set up a PostScript printer driver. I will use the "HP LaserJet IIISi PostScript" driver as an example.
Go to the Add Printer dialog (Start > Printers > Add Printer) and find the HP LaserJet IIISi PostScript in the list. Set it to print to a file (Available ports: FILE:) and finish. Then bring up the Properties dialog for the newly installed driver (File > Properties) and switch to the PostScript tab. Change the PostScript output format to Encapsulated PostScript (EPS) as shown in the image below and hit OK.
Ta-da! You're almost done! Now you just have to print out your chart using the new driver and save it to a file with an .eps extension. There, you've got a file you can include in your LaTeX document!
Problem: My PostScript (.ps) and Acrobat (.pdf) output looks really bad. The typeface is all pixelated. How do I make it smooth?
Solution: The problem is probably that your postscript converter (dvips) is using bitmap fonts. To check this, open the postscript file in a text editor and look for lines that begin with
%DVIPSBitmapFont:
If you find any then you are using bitmap fonts. With MikTeX (version 2) the way to replace them with smooth outline (Type 1) fonts is by downloading the Level 2 package. Then you just need to install it (and maybe refresh your filename database?) and then when you call dvips use the command line "dvips.exe -Ppdf dvifile". This tells the converter to use a configuration file called config.pdf which has all the information for where to locate the outline fonts.
That should solve the problem. If you have a more complicated setup (with non-standard fonts) it might still fail in which case you'll have to edit the dvips configuration files manually. Good luck!
(A quick comparison suggests that postscript files with outline fonts are slightly bigger than those using (600dpi) bitmap fonts but this is more than compensated for by the fact that the output will look good on any screen or printer, regardless of its resolution. Oh, and the converted (with Ghostscript's ps2pdf) Acrobat file is actually smaller with outline fonts.)
[Rik's Office Hours] [Contact Rik] Last updated: Fri Apr 30 2004, 1:55pm |