Source : http://graphics.stanford.edu/lab/howto/xfig_latex.html
alias xfig='xfig -geometry 950x700+50+20 -metric -startgridmode 3 -specialtext -latexfonts -startlatexFont default'
- Use the normal method in xfig for adding text, but set the "special text" mode using the "Text flags" menu at the bottom of the screen for math mode.
- To input LaTex set the "special text" mode using the "Text flags" menu at the bottom of the screen.
- Then use text tool and
write $...$
to switch to math-mode. - Type the equation.
- Export the figure from xfig : using the format "Combined PS/LaTeX (PS part)".
- Two files would be created: foo.pstex and foo.pstex_t
- Now save the following as some file, say create-xfig-eps and make it executable -
cp $1.pstex_t temp.pstex_t
cp $1.pstex .temp.pstex
echo "\documentclass{article}
\usepackage{epsfig}
\usepackage{color}
\setlength{\textwidth}{100cm}
\setlength{\textheight}{100cm}
\begin{document}
\pagestyle{empty}
\input{.temp.pstex_t}
\end{document}" > temp.tex
latex temp.tex
dvips -E temp.dvi -o $1.eps
rm temp.*
- cp the files file.pstex* in the same directory and run the create-xfig-eps script as
create-xfig-eps foo
No extension is needed. But it doesn't check also whether foo exists. So be careful and copy the file before otherwise the rm might erase else.
- The foo.eps is the file needed.
alias xfig='xfig -geometry 950x700+50+20 -metric -startgridmode 3 -specialtext -latexfonts -startlatexFont default'
Comments