xfig and LaTeX

Problem

I have done a picture in xfig. In this picture, there is text. I would like to format this text with LaTeX. How can I do that in less than 7 steps ?

Solution

  1. In xfig, choose the Edit tool.
  2. For each text element that you want to format with LaTeX
    1. Click on it. An edition window will appear.
    2. Set the Special Flag to Special.
    3. Press on the button Done to close the window.
  3. Click on the Export button, on top of xfig's window.
  4. First export your picture in the Combined PS/LaTex (PS part) language.
  5. Then export your picture in the Combined PS/LaTex (LaTeX part) langage.
  6. In your LaTeX file, put the line \input{picture.pstex_t} where you want your picture to appear. (The file picture.pstex_t is the one created by xfig when you exported the LaTeX part of your picture.)
  7. Et voilą !
If you want to center your picture and add a caption, replace the line \input{picture.pstex_t} (step 6) by (thanks Karim):

\begin{figure}
\begin{center}
\input{picture.pstex_t}
\caption{Your caption}
\end{center}
\end{figure}


Quest