Re: xfig and LyX

2012-10-29 Thread Georg Baum
Wolfgang Engelmann wrote:

> Could you tell me, whether this 'bring together both' is a task for xfig
> or for grafics/external material on the lyx side?


It is a LyX issue. xfig (or any other program) does not know (and should not 
need to know) about the internals of file inclusion of LyX.


Georg



Re: xfig and LyX

2012-10-28 Thread Wolfgang Engelmann
Am Freitag, 26. Oktober 2012, 20:40:30 schrieb Georg Baum:
> Wolfgang Engelmann wrote:
> > Am Dienstag, 23. Oktober 2012, 21:23:11 schrieb Georg Baum:
> > 
> > Thanks, Georg,
> > 
> > but I have still not managed to get the greek letter displayed in the
> > .fig file in LyX. If you don't mind, I would like to send you a
> > minimal lyx file and the fig file privately (together 10kb) for a
> > trial. May I?
> 
> Sure, I can have a look. But I can't promise that I'll find the problem
> ;-)
> 
> 
> Georg
Thanks, Georg,

now I got it. 
I am translating Georg's hint for entering .fig files with greek letters in 
Lyx, since other people might have a problem with it too.

You imported the xfig-file as a grafic. But in this case the special mechanism 
for exchanging the text does not work. Instead, a direct .eps/.pdf is 
produced with the same text as in xfig (e.g. $\alpha$)

If you enter the grafic via insert>file>external material 
and chose in the dialog type xfig, $\alpha$ is given as desired by α.

You are not the first one who was fooled by it by not noticing the small 
difference between these two methods of including grafics. 
Therefore exists since more than 10 years the plan to bring together both, 
but nobody has so far implemented it.

Thanks again, Georg.

Could you tell me, whether this 'bring together both' is a task for xfig or 
for grafics/external material on the lyx side?

Wolfgang


Re: xfig and LyX

2012-10-26 Thread Georg Baum
Wolfgang Engelmann wrote:

> Am Dienstag, 23. Oktober 2012, 21:23:11 schrieb Georg Baum:
> 
> Thanks, Georg,
> 
> but I have still not managed to get the greek letter displayed in the .fig
> file in LyX. If you don't mind, I would like to send you a minimal lyx
> file and the fig file privately (together 10kb) for a trial. May I?

Sure, I can have a look. But I can't promise that I'll find the problem ;-)


Georg



Re: xfig and LyX

2012-10-24 Thread Wolfgang Engelmann
Am Dienstag, 23. Oktober 2012, 21:23:11 schrieb Georg Baum:

Thanks, Georg,

but I have still not managed to get the greek letter displayed in the .fig 
file in LyX. If you don't mind, I would like to send you a minimal lyx file 
and the fig file privately (together 10kb) for a trial. May I?

Wolfgang


Re: xfig and LyX

2012-10-23 Thread Georg Baum
Wolfgang Engelmann wrote:

> But I can't get it work.
> I am using Lyx 2.1.0
> and I have transfig installed which contains fig2dev
> 
> What I did:
> In xfig (3.2.5b):
> Text flags > special flag >special >set
> Text-font > use Postscript Fonts > use Latex font >
> jumps back to Fonts Menu
> #not sure what to select here

You need to do this before entering the text. Then it works for me. I don't 
know how to change these settings for existing text. It looks like they are 
some global settings that only influence newly created text.

> in the fig graphic I have a text with $\alpha$
> 
> In Lyx under
> - >tools>preferences>file handling
> converter definitions FIG>EPS
> ->converter fig2dev -L eps $$i $$o
> extra flag is empty and save apply is greyed out
> #not sure whether this is correct

You should not define anything related to xfig yourself here. If this 
converter is defined in your preferences file, please delete it from there. 
If it is in the syntax.default file (which is created by reconfigure) then 
it is fine.

> The fonts in Lyx I have selected are
> Roman -Palatino
> SanSerif Helvetia
> Typewriter ComputerModern

These should not matter.

> I have reconfigured Lyx
> 
> I insert the .fig file with
> -> File
> -> External material (Xfig's Template)
> and see the graphic with  $\alpha$
> 
> But the pdf file does not show the greek alpha, but still $\alpha$.
> 
> I am not sure what I do wrong. Is it on the xfig side or the lyx side?

Probably xfig.


Georg



Re: Xfig and LyX

2008-07-11 Thread Abdelrazak Younes

Allen L. Barker wrote:


> Yes, if you mark the text field as LateX in xfig the equation
> will be latex compiled and previewed on LyX screen. At least
> it works in 1.6, maybe there's a bug in 1.5...
>
> You need the instant-preview package and dvipng installed for
> this to work.

Are these packages installed by default in the normal LyX
setups (such as on a recent Fedora Linux)?


Dunno...



If not, how should one install the packages?  Are there any
other side-effects to the packages?


Dunno...



From within xfig, do you need to both select the text field
as special and select it to use the latex-font?


Dunno...

I just "use it" on Windows :-)

Hopefully someone else will answer your questions...

Abdel.



Re: Xfig and LyX

2008-07-11 Thread Allen L. Barker


> Yes, if you mark the text field as LateX in xfig the equation
> will be latex compiled and previewed on LyX screen. At least
> it works in 1.6, maybe there's a bug in 1.5...
>
> You need the instant-preview package and dvipng installed for
> this to work.

Are these packages installed by default in the normal LyX
setups (such as on a recent Fedora Linux)?

If not, how should one install the packages?  Are there any
other side-effects to the packages?

From within xfig, do you need to both select the text field
as special and select it to use the latex-font?





Re: Xfig and LyX

2008-07-11 Thread Abdelrazak Younes

Allen L. Barker wrote:


> Yes xifg previewing can already been done thanks to fig2dev which
> is part of the xfig program. Just use the external material inset
> (Inset->File->External Material) and choose XFig in the combo. In
> the display tab, select 'preview'.

I think you are missing my point.

Yes, I agree with you that LyX can already preview the xfig
images.

But, can it preview the math text like $x_2$ in its final
form?


Yes, if you mark the text field as LateX in xfig the equation will be 
latex compiled and previewed on LyX screen. At least it works in 1.6, 
maybe there's a bug in 1.5...

You need the instant-preview package and dvipng installed for this to work.



I have not found any way for doing that, and I was suggesting
a possibility...

I have tried the External Material type of inset, but it still
displays $x_2$ as $x_2$.


See above, it should work. But I am not sure this will be compatible 
with your psfrag methods as this method uses the pstex_t format (or 
pdftex_t).


Abdel.



Re: Xfig and LyX

2008-07-11 Thread Allen L. Barker


> Yes xifg previewing can already been done thanks to fig2dev which
> is part of the xfig program. Just use the external material inset
> (Inset->File->External Material) and choose XFig in the combo. In
> the display tab, select 'preview'.

I think you are missing my point.

Yes, I agree with you that LyX can already preview the xfig
images.

But, can it preview the math text like $x_2$ in its final
form?

I have not found any way for doing that, and I was suggesting
a possibility...

I have tried the External Material type of inset, but it still
displays $x_2$ as $x_2$.









Re: Xfig and LyX

2008-07-11 Thread Abdelrazak Younes

Allen L. Barker wrote:


 > I have often used fig2ps (from sourceforge) to transform .fig files
 > to .eps and then include the resulting eps file in LyX. (I don't
 > remember what started me doing this; there was a problem of
 > complexity in my figure a few years ago and this provided the
 > solution.)
 >
 > It is possible to force specialtext from hte fig2ps command line.

I checked out fig2ps and it is a neat program.

I have been playing around with the converters in LyX,
but I still am not completely clear on all the details
of how they are operating.

It seems like you could define a converter to use
the fig2ps program automatically, without having to
do it by hand.

Even more interesting, it seems like you could use
a fig2ps type of program as a converter to get a
preview with the actual math symbols, rather than
something with the usual $x_2$ types of strings...

This type of thing, if it works, should work both
with a graphics include as well as with an external
file include...

Any suggestions, critiques, or comments?  It would
be very nice to have a preview which included the
actual math, if that could be done easily.  But
maybe such a thing can already be done in a way I
am not familiar with?


Yes xifg previewing can already been done thanks to fig2dev which is 
part of the xfig program. Just use the external material inset 
(Inset->File->External Material) and choose XFig in the combo. In the 
display tab, select 'preview'.


Abdel.



Re: Xfig and LyX

2008-07-11 Thread Allen L. Barker


> I have often used fig2ps (from sourceforge) to transform .fig files
> to .eps and then include the resulting eps file in LyX. (I don't
> remember what started me doing this; there was a problem of
> complexity in my figure a few years ago and this provided the
> solution.)
>
> It is possible to force specialtext from hte fig2ps command line.

I checked out fig2ps and it is a neat program.

I have been playing around with the converters in LyX,
but I still am not completely clear on all the details
of how they are operating.

It seems like you could define a converter to use
the fig2ps program automatically, without having to
do it by hand.

Even more interesting, it seems like you could use
a fig2ps type of program as a converter to get a
preview with the actual math symbols, rather than
something with the usual $x_2$ types of strings...

This type of thing, if it works, should work both
with a graphics include as well as with an external
file include...

Any suggestions, critiques, or comments?  It would
be very nice to have a preview which included the
actual math, if that could be done easily.  But
maybe such a thing can already be done in a way I
am not familiar with?




Re: Xfig and LyX

2008-07-03 Thread A. Scottedward Hodel

On Jun 25, 2008, at 9:21 AM, 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.

I have quite a number of xfig produced files which are all exported  
as .eps

files and inserted in the LyX document as floats.

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?

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 am using version 1.5.4 of LyX
Has 1.5.5 or 1.6 a feature to insert fig files directly and the rest  
is done

by the program?

Thanks a lot

Wolfgang


I have often used fig2ps (from sourceforge) to transform .fig files  
to .eps and then include the resulting eps file in LyX.  (I don't  
remember what started me doing this; there was a problem of complexity  
in my figure a few years ago and this provided the solution.)


It is possible to force specialtext from hte fig2ps command line.

The entry in my Makefile (running X-windows on a Mac) is
%.eps : %.fig
@echo "Making $@ from $<"
@fig2ps --forcespecial --add=epsfig \
  --input=$(HOME)/aub/2120/notes/2120headf.tex \
  --bbox=dvips --eps $<
rm `find . -name "*.fig2ps.tmp.*" -print`

A. Scottedward Hodel [EMAIL PROTECTED]
http://homepage.mac.com/hodelas/tar





Re: Xfig and LyX

2008-06-26 Thread curtis osterhoudt


/* original message below **/

- Original Message 
From: Georg Baum <[EMAIL PROTECTED]>
To: lyx-users@lists.lyx.org
Sent: Thursday, June 26, 2008 11:55:17 AM
Subject: Re: Xfig and LyX



> With other words, I have to redo all my fig files and add (or copy, if I
> find out how the localization of the text is done in pstex_t)?

If they miss the flag, then you simply need to set the flag in the .fig file
(manually or with a script).




Georg
/* original message above **/


Does anyone know of such a script to set the "special" flag post-facto? I 
have a Mathematica program I've been using to do it, but if someone has a quick 
perl file or bash script (or something analogous on Windows), that would be 
very helpful. 

  Thanks!
   Curtis O.



  

Re: Xfig and LyX

2008-06-26 Thread Georg Baum
Wolfgang Engelmann wrote:

>  with  external template way  you mean the way I and Rich use, i.e. export
>  fig
> to eps and insert in Lyx?

No. I mean what Abdel uses: Insert->File->External Material and then choose
the xfig template. In the file dialog you specify the .fig file. If you
want to edit the .fig file from within LyX press cklick on the file and
then press the edit button in the dialog that opens.

> Does it mean, I have to create the fig file after having started
> xfig -specialtext and xfig then puts my text in the pstex_t file with
> location marks etc?

No, the -specialtext switch is only the default for new textboxes. Therefore
it is useful, but it does not change existing ones. How the text is output
to LaTeX depends on the flags that are stored in the .fig file, not on
the -specialtext switch.

> With other words, I have to redo all my fig files and add (or copy, if I
> find out how the localization of the text is done in pstex_t)?

If they miss the flag, then you simply need to set the flag in the .fig file
(manually or with a script). No ned to look at pstex_t. Then you include
all .fig files as external material, and maybe set the preamble command
mentioned by Vasek.

> textbox is pstex_t?

No, a textbox is what you get when you press the big T in xfig and where you
enter your text.

> How does xfig find out the size and font I used in the document, or does
> it make latex take it over?

It does not find it out. It puts the text in a file that is processed by
LaTeX.


Georg



Re: Xfig and LyX

2008-06-26 Thread Wolfgang Engelmann
Am Donnerstag, 26. Juni 2008 07:28 schrieb Vaclav Smidl:
> Hi Wolfgang,
> I also prefer having the fontsize in figures equal to that of the
> surrounding text.
>
> > > If the special flag was set you encountered a bug, either in xfig,
> > > fig2dev or in LyX. Otherwise just set the flag, and the text should be
> > > typeset by LaTeX.
> >
> > How does xfig find out the size and font I used in the document, or does
> > it make latex take it over?
>
> To do that, you really need the "special" flag switched on for strings in
> xfig. If you did not do it in your xfig files, you can change it quite
> efficiently using "update" functionality in xfig gui, or by a script on raw
> xfig file format. All strings are terminated by \001 so it is easy to
> detect them and the special flag is just one of the numbers in front of the
> text. Do not remember which one, you can easily find it out by diffing two
> files, one with and one without the special flag.
>
> As a second step, redefine latex macro SetFigFont in the preamble:
> either
> \gdef\SetFigFont#1#2#3#4#5{\relax}
> or
> \gdef\SetFigFontNFSS#1#2#3#4#5{\relax}
> depending on the xfig version. Check one of your .pdftex_t file which
> version is used in it.
>
> Then, all texts will be typeset by the active font in latex.
>
> Hope this helps,
> Vasek

Vasek, this is a very valuable information and I am thankful.
Wolfgang


Re: Xfig and LyX

2008-06-26 Thread Vaclav Smidl
Hi Wolfgang,
I also prefer having the fontsize in figures equal to that of the surrounding 
text.

> > If the special flag was set you encountered a bug, either in xfig,
> > fig2dev or in LyX. Otherwise just set the flag, and the text should be
> > typeset by LaTeX.
>
> How does xfig find out the size and font I used in the document, or does it
> make latex take it over?

To do that, you really need the "special" flag switched on for strings in 
xfig. If you did not do it in your xfig files, you can change it quite 
efficiently using "update" functionality in xfig gui, or by a script on raw 
xfig file format. All strings are terminated by \001 so it is easy to detect 
them and the special flag is just one of the numbers in front of the text. Do 
not remember which one, you can easily find it out by diffing two files, one 
with and one without the special flag.

As a second step, redefine latex macro SetFigFont in the preamble:
either
\gdef\SetFigFont#1#2#3#4#5{\relax}
or 
\gdef\SetFigFontNFSS#1#2#3#4#5{\relax}
depending on the xfig version. Check one of your .pdftex_t file which version 
is used in it.

Then, all texts will be typeset by the active font in latex.

Hope this helps,
Vasek



Re: Xfig and LyX

2008-06-25 Thread Abdelrazak Younes

Wolfgang Engelmann wrote:

Am Mittwoch, 25. Juni 2008 13:58 schrieb Abdelrazak Younes:

Wolfgang Engelmann wrote:

Could somebody kindly point me to an understandable explanation of how to
use xfig produced figures in LyX?

Use the external inset ("Inset->File->External Material") and choose the
XFig template. You should also select "preview" in the display combo AFAIR.


Thats what I did, Abdel.


I don't think so. As I said, try Inset->File->External Material

Abdel.



Re: Xfig and LyX

2008-06-25 Thread Wolfgang Engelmann
Am Mittwoch, 25. Juni 2008 18:51 schrieb Georg Baum:
> Wolfgang Engelmann wrote:
> > Am Mittwoch, 25. Juni 2008 13:26 schrieb Rich Shepard:
> >>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.
>
> The external template way is supposed to be easier, since it does the
> exporting automatically, so you can't get outdated figures because you
> forgot to export.
 with  external template way  you mean the way I and Rich use, i.e. export fig 
to eps and insert in Lyx?
>
> >> > 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?
>
> The special flag is a property of each text box that you have to set
> individually. AFAIK the -specialtext switch only sets that as default for
> new text. If you have a lot of files that you need to convert it would
> probably easy to write a small script that does this.
>
> > 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 pstex_t file reads like:
>
> You should not need to worry about pstex_t and friends if you use the
> external template. LyX is supposed to create all needed files
> automatically, whether you use pdflatex or the traditional DVI. The only
> decision you have to make is whether you want to use the special flag or
> not: If you use it, the text will be typeset by LaTeX, and you can use
> math, own commands that are defined in ERT or the preamble etc. The size
> and font would also be adjusted through LaTeX commands. If you do not use
> the special flag the text will appear as is in the final document, and you
> set the font, size etc. in xfig.
Does it mean, I have to create the fig file after having started 
xfig -specialtext and xfig then puts my text in the pstex_t file with 
location marks etc?
With other words, I have to redo all my fig files and add (or copy, if I find 
out how the localization of the text is done in pstex_t)?
>
> >  I just did not get it yet, some step might be missing (perhaps something
> >  in
> > the preamble
>
> You do not need to set anything in the preamble unless you use the xfig
> special text flag and inserted nonstandard commands in a textbox
textbox is pstex_t?
> of the 
> xfig file yourself.
>
> >> > 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.
>
> If the special flag was set you encountered a bug, either in xfig, fig2dev
> or in LyX. Otherwise just set the flag, and the text should be typeset by
> LaTeX.
How does xfig find out the size and font I used in the document, or does it 
make latex take it over?

Will experiment tomorrow a bit, but perhaps clarifying my (stupid) questions 
helps to reduce the experimenting time. Thanks a lot, Georg

Wolfgang


Re: Xfig and LyX

2008-06-25 Thread Georg Baum
Wolfgang Engelmann wrote:

> Am Mittwoch, 25. Juni 2008 13:26 schrieb Rich Shepard:
>>
>>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.

The external template way is supposed to be easier, since it does the
exporting automatically, so you can't get outdated figures because you
forgot to export.

>> > 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?

The special flag is a property of each text box that you have to set
individually. AFAIK the -specialtext switch only sets that as default for
new text. If you have a lot of files that you need to convert it would
probably easy to write a small script that does this.

> 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
> pstex_t file reads like:

You should not need to worry about pstex_t and friends if you use the
external template. LyX is supposed to create all needed files
automatically, whether you use pdflatex or the traditional DVI. The only
decision you have to make is whether you want to use the special flag or
not: If you use it, the text will be typeset by LaTeX, and you can use
math, own commands that are defined in ERT or the preamble etc. The size
and font would also be adjusted through LaTeX commands. If you do not use
the special flag the text will appear as is in the final document, and you
set the font, size etc. in xfig.

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

You do not need to set anything in the preamble unless you use the xfig
special text flag and inserted nonstandard commands in a textbox of the
xfig file yourself.

>> > 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.

If the special flag was set you encountered a bug, either in xfig, fig2dev
or in LyX. Otherwise just set the flag, and the text should be typeset by
LaTeX.


Georg



Re: Xfig and LyX

2008-06-25 Thread Rich Shepard

On Wed, 25 Jun 2008, Wolfgang Engelmann wrote:


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?


Wolfgang,

  No. I size the text in the figure to the figure (keeping in mind that it
will probably be smaller in the document), and pay no attention to the font
size relative to the text. The image is its own entity and the text should
be scaled to the graphics ... and clarity.


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).


  I've not done this. I create the figures separately, then insert them in
floats. If they're not readable in the pdf, I adjust the text size and try
again. For my purposes, 10pt or 12pt text in the figure is perfectly
readable.

  When I start a new figure, I change the default font (lower right corner
of the bottom) to 'postscript fonts' and select Palatino-Roman. Depending on
how much text will be in the figure, I leave the default size at 12pt (light
text) or reduce it to 10pt (a lot of text). Then I create the figure and
export it as .eps and put it in the document.

HTH,

Rich

--
Richard B. Shepard, Ph.D.   |  IntegrityCredibility
Applied Ecosystem Services, Inc.|Innovation
 Voice: 503-667-4517  Fax: 503-667-8863


Re: Xfig and LyX

2008-06-25 Thread Wolfgang Engelmann
Am Mittwoch, 25. Juni 2008 13:58 schrieb Abdelrazak Younes:
> Wolfgang Engelmann wrote:
> > Could somebody kindly point me to an understandable explanation of how to
> > use xfig produced figures in LyX?
>
> Use the external inset ("Inset->File->External Material") and choose the
> XFig template. You should also select "preview" in the display combo AFAIR.
>
Thats what I did, Abdel. See also my answer to Rich

Wolfgang
> > I am using version 1.5.4 of LyX
> > Has 1.5.5 or 1.6 a feature to insert fig files directly and the rest is
> > done by the program?
>
> 1.5.5 is the same as 1.5.4 in this regard. 1.6 will save you on choosing
> "preview" on the display combo, that's all.
>
> Abdel.


Re: Xfig and LyX

2008-06-25 Thread Wolfgang Engelmann
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 
pstex_t file reads like:
\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


Re: Xfig and LyX

2008-06-25 Thread Abdelrazak Younes

Wolfgang Engelmann wrote:
Could somebody kindly point me to an understandable explanation of how to use 
xfig produced figures in LyX? 


Use the external inset ("Inset->File->External Material") and choose the 
XFig template. You should also select "preview" in the display combo AFAIR.



I am using version 1.5.4 of LyX
Has 1.5.5 or 1.6 a feature to insert fig files directly and the rest is done 
by the program?


1.5.5 is the same as 1.5.4 in this regard. 1.6 will save you on choosing 
"preview" on the display combo, that's all.


Abdel.



Re: Xfig and LyX

2008-06-25 Thread 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.


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

--
Richard B. Shepard, Ph.D.   |  IntegrityCredibility
Applied Ecosystem Services, Inc.|Innovation
 Voice: 503-667-4517  Fax: 503-667-8863

Re: xfig and LyX

2002-10-25 Thread Jean-Marc Lasgouttes
> "Andre" == Andre Poenitz <[EMAIL PROTECTED]> writes:

Andre> On Fri, Oct 25, 2002 at 02:47:35PM +0200, Jean-Marc Lasgouttes
Andre> wrote:
>> This problem should be fixed now.

Andre> It is still crashing. Insert an ExternalInset in a new doc,
Andre> change type to Xfig, do not enter a name. Save, reload. Press
Andre> Shift-End to mark "everything", Press . Boom.

OK, so the ReplaceEnvironmentPath thingie should be moved as last in
the function. However, it strikes me that the command is called through
system() and thus the environment variables will be interpreted
correctly there (yes, I did check the fact). Therefore I propose the
following patch.

Lars?

JMarc


Index: src/insets/ChangeLog
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/ChangeLog,v
retrieving revision 1.532
diff -u -p -r1.532 ChangeLog
--- src/insets/ChangeLog	25 Oct 2002 12:46:01 -	1.532
+++ src/insets/ChangeLog	25 Oct 2002 13:34:17 -
@@ -1,3 +1,8 @@
+2002-10-25  Jean-Marc Lasgouttes  <[EMAIL PROTECTED]>
+
+	* insetexternal.C (doSubstitution): do not try to replace
+	environment variables, this is done when executing the command
+
 2002-10-24  Jean-Marc Lasgouttes  <[EMAIL PROTECTED]>
 
 	* insetexternal.C (doSubstitution): change order of substitution
Index: src/insets/insetexternal.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetexternal.C,v
retrieving revision 1.51
diff -u -p -r1.51 insetexternal.C
--- src/insets/insetexternal.C	25 Oct 2002 12:46:01 -	1.51
+++ src/insets/insetexternal.C	25 Oct 2002 13:34:17 -
@@ -245,7 +245,6 @@ string const InsetExternal::doSubstituti
 	result = subst(result, "$$FPath", filepath);
 	result = subst(result, "$$Tempname", tempname_);
 	result = subst(result, "$$Sysdir", system_lyxdir);
-	result = ReplaceEnvironmentPath(result);
 
 	// Handle the $$Contents(filename) syntax
 	if (contains(result, "$$Contents(\"")) {



Re: xfig and LyX

2002-10-25 Thread Andre Poenitz
On Fri, Oct 25, 2002 at 02:47:35PM +0200, Jean-Marc Lasgouttes wrote:
> This problem should be fixed now.

It is still crashing. Insert an ExternalInset in a new doc, change type
to Xfig, do not enter a name. Save, reload. Press Shift-End to mark
"everything", Press . Boom. 


#0  0x0841842d in boost::re_detail::_priv_match_data >::_priv_match_data (this=0xbfffe178, m=@0xbfffe3a4, 
a=0x8772be8 "$Contents(\".asc\")ragraph: 0", b=0x8772bf9 "ragraph: 0", 
states=0)
at ../../../lyx-devel/boost/boost/regex/detail/regex_match.hpp:219
#1  0x0841b347 in bool boost::regex_match,
char, boost::regex_traits, allocator > (
first=0x8772be8 "$Contents(\".asc\")ragraph: 0", 
last=0x8772bf9 "ragraph: 0", m=@0xbfffe3a4, e=@0xbfffe35c, flags=0)
at ../../../lyx-devel/boost/boost/regex/detail/regex_match.hpp:1706
#2  0x08401cbb in regexMatch (a=@0xbfffe404, pattern=@0xbfffe410)
at ../../../lyx-devel/boost/boost/regex/detail/regex_match.hpp:1757
#3  0x083f14e9 in ReplaceEnvironmentPath (path=@0xbfffe48c)
at ../../../lyx-devel/src/support/filetools.C:828
#4  0x0825a65b in InsetExternal::doSubstitution (this=0x8796158, 
buffer=0x8789858, s=@0x878f974)
at ../../../lyx-devel/src/insets/insetexternal.C:248
#5  0x08258b86 in InsetExternal::write (this=0x8796158, format=@0xbfffe50c, 
buf=0x8789858, os=@0xbfffe554)
at ../../../lyx-devel/src/insets/insetexternal.C:151
#6  0x08258e94 in InsetExternal::ascii (this=0x8796158, buf=0x8789858, 
os=@0xbfffe554) at ../../../lyx-devel/src/insets/insetexternal.C:165
#7  0x0817fae7 in Paragraph::asString (this=0x87960e8, buffer=0x8789858, 




Re: xfig and LyX

2002-10-25 Thread Jean-Marc Lasgouttes
> "Nirmal" == Nirmal Govind <[EMAIL PROTECTED]> writes:

>>  Maybe your problem is that you do not include the color package
>> (\usepackage{color} in Preamble)
>> 

Nirmal> Yes, that was it!! Thanks a lot.. the problem with the crash
Nirmal> in 1.3.0cvs (when including a .fig directly using external
Nirmal> material) still remains.. so Wayan, I'm attaching a .fig file
Nirmal> here and this is the error that 1.3.0cvs gives when it
Nirmal> crashes:

This problem should be fixed now.

JMarc



Re: xfig and LyX

2002-10-22 Thread Andre Poenitz
On Tue, Oct 22, 2002 at 11:25:51AM -0400, Nirmal Govind wrote:
> Lyx 1.2 includes External Material without any problems, so I've been
> able to include the attached .fig file and view the DVI and PS output..
> the cvs version crashes consistently.. with the error that I'd posted
> earlier.. I updated my cvs version 2 days ago I think..

It crashes pretty quickly:

gdb) bt
#0  0x40317587 in memcpy () from /lib/libc.so.6
#1  0x40256ec7 in string_char_traits::copy ()
   from /usr/lib/libstdc++-libc6.2-2.so.3
#2  0x08256b17 in basic_string,
__default_alloc_template >::Rep::copy ()
#3  0x08256b6a in basic_string,
__default_alloc_template >::Rep::clone ()
#4  0x0825bde9 in basic_string,
__default_alloc_template >::Rep::grab ()
#5  0x0825ae95 in basic_string,
__default_alloc_template >::basic_string ()
#6  0x082e9148 in ExternalTemplate::ExternalTemplate ()
#7  0x082240aa in ControlExternal::getTemplate ()
#8  0x081bc213 in FormExternal::input ()


But the code in question (ExternalTemplate::ExternalTemplate()) looks
harmless, so I'd guess something corrupted the stack/heap earlier...

Andre'

-- 
Those who desire to give up Freedom in order to gain Security,
will not have, nor do they deserve, either one. (T. Jefferson)



Re: xfig and LyX

2002-10-22 Thread I Wayan Warmada

On Tue, 22 Oct 2002, Nirmal Govind wrote:

| Sorry... my bad, I forgot to attach the file.. here it is.. not
| attaching the lyx file since I can reproduce the crash by just including
| this fig file in an otherwise empty document (and including the color
| package)
|
| Regarding using input/include.. yes, that's how I'm doing it right now..
| the earlier problem when this didn't work was due to not including the
| color package. Now that's resolved..

yes, you need a color package. I have tried to run with lyx-1.3.0cvs
(installed 2weeks ago) without problem...

| Lyx 1.2 includes External Material without any problems, so I've been
| able to include the attached .fig file and view the DVI and PS output..
| the cvs version crashes consistently.. with the error that I'd posted
| earlier.. I updated my cvs version 2 days ago I think..

maybe the problem is inserting fig file in new cvs version...

Wayan




Re: xfig and LyX

2002-10-22 Thread Nirmal Govind
> 
> I don't find your attachment. I have made an article (in Indonesia)
> about inserting fig and tex graphics format in lyx-1.2.x series (I put
> on my website, sorry my English is bad). I have no problem using
> insert external material with lyx-1.3.0cvs (have installed last
> 2weeks) --> DVI, PS, PDF no problem.

Sorry... my bad, I forgot to attach the file.. here it is.. not
attaching the lyx file since I can reproduce the crash by just including
this fig file in an otherwise empty document (and including the color
package)

Regarding using input/include.. yes, that's how I'm doing it right now..
the earlier problem when this didn't work was due to not including the
color package. Now that's resolved.. 

Lyx 1.2 includes External Material without any problems, so I've been
able to include the attached .fig file and view the DVI and PS output..
the cvs version crashes consistently.. with the error that I'd posted
earlier.. I updated my cvs version 2 days ago I think..

Thanks,
nirmal


qingeg.fig
Description: Binary data


Re: xfig and LyX

2002-10-22 Thread I Wayan Warmada

On Tue, 22 Oct 2002, Nirmal Govind wrote:

| Yes, that was it!! Thanks a lot.. the problem with the crash in 1.3.0cvs
| (when including a .fig directly using external material) still remains..
| so Wayan, I'm attaching a .fig file here and this is the error that
| 1.3.0cvs gives when it crashes:

I don't find your attachment. I have made an article (in Indonesia) about
inserting fig and tex graphics format in lyx-1.2.x series (I put on my
website, sorry my English is bad). I have no problem using insert external
material with lyx-1.3.0cvs (have installed last 2weeks) --> DVI, PS, PDF
no problem.

Wayan




Re: xfig and LyX

2002-10-22 Thread Jean-Marc Lasgouttes
> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes:

Angus> Where's the file? (.lyx and .fig)

Angus> Incidentally, can you not use the Include inset for this? That
Angus> way you can get a preview of the figure with 1.3.0cvs.

This is what he was doing before being advised to use external inset,
I think :)

JMarc



Re: xfig and LyX

2002-10-22 Thread Angus Leeming
On Tuesday 22 October 2002 2:49 pm, Nirmal Govind wrote:
> > Maybe your problem is that you do not include the color
> > package (\usepackage{color} in Preamble)
>
> Yes, that was it!! Thanks a lot.. the problem with the crash
> in 1.3.0cvs (when including a .fig directly using external
> material) still remains.. so Wayan, I'm attaching a .fig file
> here and this is the error that 1.3.0cvs gives when it
> crashes:
>
> Received unhandled X11 event
> Type: 13 Target: 0x3c0009c
>
> lyx: SIGFPE signal caught
> LyX: Attempting to save document newfile4.lyx
>  /root/newfile4.lyx.emergency
>   Save seems successful. Phew.
> Bye.
> Segmentation fault
>
> The crash occurs when I try to view the DVI output after I
> include a fig file as "External Material"..  I'm cc'ing the
> devel group also...
>
> Thanks,
> nirmal

Where's the file? (.lyx and .fig)

Incidentally, can you not use the Include inset for this? 
That way you can get a preview of the figure with 1.3.0cvs.

Regards,
Angus



Re: xfig and LyX

2002-10-22 Thread Nirmal Govind
> 
> Maybe your problem is that you do not include the color package
> (\usepackage{color} in Preamble)
> 

Yes, that was it!! Thanks a lot.. the problem with the crash in 1.3.0cvs
(when including a .fig directly using external material) still remains..
so Wayan, I'm attaching a .fig file here and this is the error that
1.3.0cvs gives when it crashes:

Received unhandled X11 event
Type: 13 Target: 0x3c0009c

lyx: SIGFPE signal caught
LyX: Attempting to save document newfile4.lyx
 /root/newfile4.lyx.emergency
  Save seems successful. Phew.
Bye.
Segmentation fault

The crash occurs when I try to view the DVI output after I include a fig
file as "External Material"..  I'm cc'ing the devel group also...

Thanks,
nirmal





Re: xfig and LyX

2002-10-22 Thread Andre Poenitz
On Mon, Oct 21, 2002 at 03:39:14PM -0400, Nirmal Govind wrote:
> \put(10351,-5236){\makebox(0,0)[lb]{\smash{\SetFigFont{12}{14.4}{\rmdef
> ault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}$M_1$}%
> }}}
> 
> For some reason I think it doesn't like SetFigFont or so.. is this part
> of standard Latex? 

No, I don't think so. But if you use fig2dev -L it produces the definition
of SetFigFont:

\begingroup\makeatletter\ifx\SetFigFont\undefined%
\gdef\SetFigFont#1#2#3#4#5{%
  \reset@font\fontsize{#1}{#2pt}%
  \fontfamily{#3}\fontseries{#4}\fontshape{#5}%
  \selectfont}%
\fi\endgroup%
\begin{picture}(1410,778)(398,-247)
[...]

Maybe your problem is that you do not include the color package
(\usepackage{color} in Preamble)

Andre'

-- 
Those who desire to give up Freedom in order to gain Security,
will not have, nor do they deserve, either one. (T. Jefferson)



Re: xfig and LyX

2002-10-21 Thread I Wayan Warmada

On Mon, 21 Oct 2002, Nirmal Govind wrote:

| Nope I hadn't.. but just tried it now and my 1.3.0cvs version crashed.
| So I tried 1.2 and still get the same Latex errors saying "Undefined
| Control Sequence }}}" .. my previous reply on this has the error message
| and the lines in the xfig exported .pstex_t file that latex seems to be
| complaining about. I can send you the file if you'd like to try it
| out...

That probably because of the LaTeX tag inserted in fig or LaTeX tag
created by Xfig were wrong. For example, if I made a graphic with gnuplot
a degree symbol in german keyboard (if it was defined as a set encoding
bla-bla-bla) was wrong defined by Xfig (for pstex_t).

Could you send the fig or pstex* files?
Perhaps, I can try next 3 hrs... I have use 1.3.0cvs without any problem
for both pstex_t and fig format.

Regards,

Wayan




Re: xfig and LyX

2002-10-21 Thread Nirmal Govind
> 
> Did you try using Insert->External Material->xfig ?
> 

Nope I hadn't.. but just tried it now and my 1.3.0cvs version crashed.
So I tried 1.2 and still get the same Latex errors saying "Undefined
Control Sequence }}}" .. my previous reply on this has the error message
and the lines in the xfig exported .pstex_t file that latex seems to be
complaining about. I can send you the file if you'd like to try it
out...

Thanks,
nirmal





Re: xfig and LyX

2002-10-21 Thread Nirmal Govind
> 
> remove the filter then type *.pstex_t you can select the list.

Ok.. I did that but still the problem of the undefined control sequence
remains.. on further investigation, I think the problem is with fonts
that XFig exports.. the error I get is:

(qingeg.pstex_t 
! Undefined control sequence.
 ... }{\mddefault }{\updefault }{\color 
  [rgb]{0,0,0}$M_1$}
l.14 }}}


The line in the .pstex_t file is:

\put(10351,-5236){\makebox(0,0)[lb]{\smash{\SetFigFont{12}{14.4}{\rmdef
ault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}$M_1$}%
}}}

For some reason I think it doesn't like SetFigFont or so.. is this part
of standard Latex? 

nirmal







Re: xfig and LyX

2002-10-21 Thread Dekel Tsur
On Mon, Oct 21, 2002 at 12:36:28AM -0400, Nirmal Govind wrote:
> Hi.. I'm trying to use the combined latex/PS export feature in xfig and
> have a couple of qns.. 
> 
> 1. While including the *.pstex_t part in LyX, should I be using
> Insert->Include File-> Input or Include or Verbatim? Reason I ask is
> that Include and Input have a pre-specified filter of .tex|.lyx so it
> won't find any .pstex_t file so looks like Verbatim is the only choice.
> 
> 2. I tried using input and include using ERT and verbatim using LyX's
> "Include File" and Latex gives me a bunch of errors saying there's an
> "undefined control sequence }}}" in the included file. This "}}}" is at
> the end of the .pstex_t file and seems pretty legitimate to me. 
> 
> Any ideas on what's wrong? How do I fix this?

Did you try using Insert->External Material->xfig ?



Re: xfig and LyX

1999-09-01 Thread Andre' Poenitz

> 
> Can one use xfig from within LyX to draw
> pictures? The current drawing icon just includes  
> the eps file, but is it possible to activate
> xfig instead?

Unfortunately not. I actually think it could (and should) be
implemented but it has not been done yet.

Andre'


--
Andre' Poenitz, TU Chemnitz, Fakultaet fuer Mathematik
[EMAIL PROTECTED] ... +49 3727 58 1381