> Could somebody kindly point me to an understandable explanation
> of how to use xfig produced figures in LyX?
> Help file Userguide tells me to check for detailed explanation
> under ImbeddedObjects but there I canĀ“t find any detailed
> explanation.

Just FYI, here is my current preferred method,
for the types of equation-heavy figures I tend
to have.

First, include the following in the preamble:

\usepackage{color}
\usepackage{graphics}
\usepackage[scanall]{psfrag}

Now in your actual .fig images you use special text
replacement-tags (without setting the "special" flag
on the xfig text).  These tags are just placeholders
which will then be replaced by the final text,
defined from within LyX.

The replacements are specified by strings like

\psfrag{FOURIERTRANSFORM}{<insert LyX text here>}

The text FOURIERTRANSFORM is what you would include
in your actual image.  By skillfully choosing these
labels the images can be reasonably comprehensible
even without the conversions.

Within LyX, the whole "\psfrag{FOURIERTRANSFORM}{"
is a red TeX box, as is the final "}".  But the
<insert LyX text here> part between them can be
arbitrary, normal LyX text (within reason).

In particular, it can include LyX math-boxes for
equation-editing.  This is extremely convenient when
you have complicated formulas (and when you are no
longer used to entering the LaTeX strings for
everything).

I wrote a simple tutorial on this stuff in 2001,
but it no longer seems to be out on the web.  It
does need some updating, but many things are the
same.

BTW, the "psfrag" way to include arbitrary text
like $x_2$ in images is to have the string
\tex{$x_2$} in the original image.

Anyway, the advantages of the general psfrag
substitution method in LyX are that you can scale
the text-size of any substitution from within LyX,
and you can use the math-editor boxes rather than
having to use the LaTeX math strings.

Ideally, of course, we all want the best of all
the worlds as things progress.  It would be nice
if all the methods were compatible.  I'm still
looking into and considering how the psfrag
stuff could be compatible with the external-file
pstex stuff.  The external-file mechanism in LyX
is actually rather general and customizable.

In the future (however distant) it would be
nice if we could use a LyX math-box to edit the
equations in a previewed figure, and to have the
results displayed in the final equation form....




Reply via email to