Adding LaTEX Fonts to Graphics
The psfrag package allows you to replace PostScript fonts with LaTeX fonts in PostScript graphics (for example, pi with the symbol $\pi$). The package uses a LaTeX syntax for defining the diagram and the PostScript language for rendering the diagram. It is very powerful, but can be a bit tedious.
To install psfrag on your system:
- Go to the psfrag distribution folder (alternate site), and download psfrag.ins and psfrag.dtx to a temporary location. Note that Windows may try to give them .txt extension, in which case you will have to rename them.
- Run latex psfrag.ins, which should create psfrag.sty and psfrag.pro
- Make a folder called psfrag under the existing c:\texmf\dvips folder. Copy the psfrag.pro file there.
- Make a folder called psfrag under the existing c:\usr\latex\texinputs folder which you made on installation.
- Select "Start-Programs-MiKTeX-MiKTeX Options" and press "Refresh Now" to update the filename database.
- Download both the example psfdemo.tex and graphics file matlab.eps Note: make sure you save the latter file with .eps extension
- Run latex psfrageg then dvips psfrageg This should produce psfrageg.ps which can be viewed with GhostView.