[Tex/LaTex] some obstacles to incorporating xfig into LaTeX and TeX into xfig

graphics

On a Linux machine, I wanted to incorporate a drawing created in xfig into a LaTeX document. But xfig wasn't allowing me to use any fonts except one microscopic one. Then I found this page (from which I quote below) saying TeX could be incorporated into and xfig document. I thought that might suffice, since I didn't want to use any text except mathematical notation, which isn't done well in xfig's usual fonts anyway. But then I found I could not adjust the size: it's still in that one beensy font. Other than that it looked very good.

I can also run TeXworks on a Windows machine. I found a web page saying it's possible to get xfig for Windows. Is that easy enough that I should consider that alternative? (I heard the manner of incorporating graphics into a LaTeX document is different in that situation, e.g. one must use pdf instead of eps or something like that.)

Appendix: quote from the cited web pave:

This document is shamelessly copy-pasted from http://web.math.auc.dk/~dethlef/Links/latex_figures.html……

Inside xfig, add the LaTeX expressions to the figure, using $…$ to switch to math-mode where necessary. 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.

Export the figure from xfig twice: firstly using the format "Combined PS/LaTeX (PS part)" to a file such as fig1.pstex, secondly using "Combined PS/LaTeX (LaTeX part)" to a file such as fig1.pstex_t.

Create a driver file (e.g., fig1.tex) containing something like:

\documentclass{article}
\usepackage{epsfig}
\usepackage{color} (note: you might not might not need to do this)
\setlength{\textwidth}{100cm}
\setlength{\textheight}{100cm}
\begin{document}
\pagestyle{empty}
\input{fig1.pstex_t}
\end{document}

Run the commands:

latex fig1.tex
dvips -E fig1.dvi -o fig1.eps

You should now have a file named "fig1.eps" which can be included (with scaling and rotation if desired) in other LaTeX documents.

Best Answer

Most users will find default Xfig fonts rather limited. The problem can be easily alleviated using psfrag package. From your description I get a sense that you are not very familiar with Xfig as you have problem rescaling existing fonts. Egreg comment about TikZ was rather misplaced. Xfig is a vector graphics editor while TikZ is languages for producing vector graphics. Over 20 years of using TeX I have found that there are situations in which use of language for producing graphics is preferable to use of vector graphics editors and vise versa. I have been using both myself. I use PSTricks language but also Xfig (also matplotlib and even MATLAB languages). Xfig is an old Unix program but it runs fine on Windows and MAC (Unix with a lots of make up). If you are familiar with Xfig my recommendation would be to stick with it as a vector graphics editor. If you are novice user you might benefit from little research and newer often more capable vector graphics editors.

I am at work right now so I will post MWE latter today.