Getting latex fonts in xfig figures

Sometimes you need to label your figures with mathematical symbols matching the mathematical symbols in your written text. Xfig allows you to do this. Here is one way to achieve this:
  1. When you click on the text mode in xfig click on the "Text flags" tab. Three options appear. One of them is "Special flag". Change this option from "Normal" to "Special".
  2. Once you have changed the Special flag to "Special" all the text you will type can be rendered in latex. Put the mathematical text between dollar signs as is normally done to get math mode in latex.
  3. When you're done with the figure and you open the "Export" window, under "Language" choose "Combined PS/Latex (both parts)". This will generate two files. Suppose your figure file was "lec1-ring.fig" then you will find "lec1-ring.pstex" and "lec1-ring.pstex_t" have been generated.
  4. Make sure you include the "color" package and "graphicx" in your latex file's headers:
  5. Now include the figure where you want it by putting text similar to this:
    \caption{Constructing the two sequences.}
    Note that the file with the extension "pstex_t" is the one which is included. This file includes the "pstex" file in its body.
  6. Run latex and enjoy the results!

Amitabha Bagchi