[Tex/LaTex] PS/LaTeX figure exported with Xfig doesn’t render properly

epsexternal filesgraphicsxfig

I just installed the basic version of MiKTeX 2.9 on my Windows XP system. I compile this very simple document (test.tex) with TeXworks, using the default pdfLaTeX command:

\documentclass{article}
\usepackage[dvips]{graphics}
\usepackage{xcolor}
\begin{document}
\begin{figure}[ht]
  \centering
  \input{segment.pstex_t}
  \caption{Segment $s$.}
\end{figure}
\end{document}

Where the input is a simple figure with a segment (a polyline) with a label $s$. After compiling, I get the label in the figure, but not the polyline.

Best Answer

When choosing the export Language "Combined PostScript/LaTeX", Xfig exports a .pstex_t (containing overlay text information) and a .pstex (similar to EPS format) file.

Compile your document using a latex->dvips->ps2pdf sequence to produce the correct output.


In general, you could also remove the graphicx package option dvips, since the correct driver should be detected automatically.