On Sat, 27 Dec 2003, Nirmal Govind wrote: > > I usually export the finished figure to eps in xfig when using the figure > > in LyX. This gives you a clean vector based file. > > How does one get the same quality in a final PDF file where an xfig > figure's been included? Using the pdftex option in LyX doesn't > produce good output... does LyX convert the .fig to eps and then do > an epstopdf?
It is included in the pdf typically as an eps. However, an eps can be vector based or it can be bitmap based, depending on how it is made. As you probably know a vector drawing is prefered as it can scale. But, in some cases an bitmap is the only option. A less command on the eps-file will tell you if what it is. A hint is that a bitmap the lines of most of the file are filled with numbers (Hex): FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFBBEE74FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF while a vector based have shorter lines: K q[0 2 0 0 0 0]concat 0 0 S Q 104 G Remember to scroll past the eps-header. > I have LaTeX math in the xfig figure and a direct export from xfig > to jpeg seems to ignore the math... I guess eps is needed so that > LaTeX can process the math? Never use jpg on line-figures, it was made for photos. It will smear your line into the white and make it very hard to read. If you need compressed line-figure bitmaps use png or similar. Maths makes things somewhat more difficult as you need to get the the math through LaTeX. I do not know a lot about this; I am a botanist and I seldom have the need to use figures with math in them ;-). However, there are som pages on the net about this. You can probably google more of them yourself, but here are one: http://graphics.stanford.edu/lab/howto/xfig_latex.html There are some packages that are used to do this more easy, like pstrics (and maybe pictex and latex-picture). > > However, you can get smoother line in LyX when using .fig files > > by adding -S 4 in LyX preferences -> converters: xfig->xpm. > > I see a converter for xfig to ppm but not xfig to xpm... I defined > xifg to xpm now but am not sure if this is going to help with the > pdf file... the figure in the pdf seems the same.. so to summarize, > I guess the question is how do I go from xfig to pdf w/o a loss in > quality? Ok, it doesn't really matter as long as it is fig2dev and it is a bitmap, you can use the -S (0,2 or 4) to smooth the lines produced in the bitmaps, but you are right it will not affect the pdf, as lyx makes the fig file into an eps. To sum it up, if you have clean figures without latex math, export the figures in xfig to eps, or use fig directly in LyX. This will give you a clean vector based file. With Maths try the method described in: http://graphics.stanford.edu/lab/howto/xfig_latex.html If that does not work you might try exporting it to eps(vector) and then with convert(or other program) export it to ppm/png, with a high resolution (300dpi+). Ingar
