>>Date: Tue, 30 Mar 2004 16:52:59 +0200
>>From: Ronald Pagel <[EMAIL PROTECTED]>
>>To: [EMAIL PROTECTED]
>>Subject: Re: eps in a figure is missing in output
>>
>>
>>
>>Georg Baum wrote:
>>> Angus Leeming wrote:
>>>>I suspect that xfig generates an eps file that references the
>>>>foo_1.eps file rather than contains a copy of it. That's why the
>>>>bitmap file shown on the lyx screen works ok, because the bitmap is
>>>>complete.
>>> 
>>> 
>>> At least on my system here (SuSE 9.0) xfig embeds the included file into
>>> the .eps file. I suspect that the preview works because the preview
>>> conversion is done on the original file (and not the file in the temp dir).
>>The .eps (or .pdf or .ps or ...) that xfig generates from the .fig is 
>>ok, because foo_1.eps is embedded.
>>Indeed, the preview in lyx seems to be converted on the original .fig, 
>>whereas the latex run is performed in a temp dir. Then, there exists 
>>only a copy of the .fig but no copy of the files to be embedded into it 
>>(such as foo_1.eps). I understand that a temp dir should be used but 
>>this lot raises a question to the developers: Is it really necessary to 
>>copy the .figs (and apparently not only those) to the temp dir?

IMHO, exporting to .eps from xfig in the original dir and copying .eps
to the tempdir would solve this problem and allow successful compilation
after export to latex, as the .eps will been created on the fly.

Of course, a wrapper or a make (as mentioned earlier) can provide external
updating of .eps figures expported from xfig. Attached is an example.


-- 
Jean-Pierre
#!/usr/local/bin/perl

$| = 1;

if ($ARGV[0] eq "-h" || $ARGV[0] eq "") {
&usage; exit;
}

BOUCLE:    while (@ARGV) {
        $ARG = shift @ARGV;
        ($rac,$suf)=($ARG=~m/(.*?).([a-z]+?)$/); 
          if ($suf ne 'fig') {
  print "$ARG: extension .fig not recognized, skipped\n";
  next BOUCLE;
}  
         `fig2dev -Leps -m 1 -c  $ARG > $rac.eps`;
         print "$ARG: exported to EPS\n";       
    }
                 


sub usage {
    print "Usage: fig2eps [-h(elp)]  <file1> <file2> ... 
(* convention allowed, e. g.  fig2eps *.fig)
Warning: forces scale 1, even if scale set to a different value in the fig file
";
}


  • ... Ronald Pagel
    • ... Пашев Игорь Николаевич
    • ... Angus Leeming
      • ... Angus Leeming
        • ... Georg Baum
          • ... Angus Leeming
          • ... Ronald Pagel
            • ... Georg Baum
            • ... Andre Poenitz
      • ... Ronald Pagel
    • Jean-Pierre.Chretien

Reply via email to