# Re: Xfig and LyX

Am Mittwoch, 25. Juni 2008 13:26 schrieb Rich Shepard:
> On Wed, 25 Jun 2008, Wolfgang Engelmann wrote:
> > 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.
>
> Wolfgang,
>
>    I can try.
>
> > I have quite a number of xfig produced files which are all exported as
> > .eps files and inserted in the LyX document as floats.
>
>    That's what I've done, too.
>
> > My aim is to have the text of my fig files in the same font and size as
> > the text in the document. This is not the case now.
> >
> > Do I have to use for all my fig files the xfig -specialtext or is there a
> > global command to do that for all files in one run?
>
>    I do not know if you can post-process the typeface, but I made the
> Palatino typeface the standard in Xfig images because that's the standard
> typeface I use in all my documents. This produces the same text appearance
> in both body and images.

Rich, thanks:
What about the size of the text in your fig -> eps file in respect to the size
of the text of the body (that is the document text, I guess?). Do you adjust
it just by comparing it? Thats what I did so far. But what about the pstex
and the pstex_t which you get after running xfig -specialtext? I thought this
is the way to divide the image part of the fig and the text part so that the
latter can be adjusted (by the program) to the font size of my text (and also
to include e.g. greek letters as latex etc). If I check my  pstex file, it
still shows the image and the text, as it was in the normal .fig file. The
\begin{picture}(0,0)%
\includegraphics{S021n.pstex}%
\end{picture}%
\setlength{\unitlength}{3947sp}%
%
\begingroup\makeatletter\ifx\SetFigFontNFSS\undefined%
\gdef\SetFigFontNFSS#1#2#3#4#5{%
[EMAIL PROTECTED]
\fontfamily{#3}\fontseries{#4}\fontshape{#5}%
\selectfont}%
\fi\endgroup%
\begin{picture}(7881,10984)(1694,-10257)
\end{picture}%

perhaps I have to define things (see undefined% in the fifth line)

I just did not get it yet, some step might be missing (perhaps something in
the preamble

Wolfgang
>
> > And how exactly do I get it into the document? Is it the pstex or the
> > pstex_t file or both? Or is this done internally by LyX? With Enter
> > (Einfuegen) File (Datei) external Material I get the fig file but the
> > text of the pdf output is not scaled correctly (nor the fonts). Somehow I
> > haven't caught the way of entering it.
>
>    I've always used Insert -> Float -> Float Figure, then specified the
> file in the dialog box.
>
>    Perhaps I don't understand your concerns well enough.
>
> Rich