Re: Graphics quality in PDF vs. PS, etc.
Jean-Pierre Chretien wrote: X-Originating-Email: [EMAIL PROTECTED] From: "Curtis Osterhoudt" <[EMAIL PROTECTED]> To: lyx-users@lists.lyx.org Subject: Graphics quality in PDF vs. PS, etc. Date: Sun, 25 Jun 2006 22:31:00 + Hi, all, I'm currently producing documents using LyX, in which graphics are often XFig figures. I like the fact that LaTeX fonts can be embedded in such figures, and look great when the final document is produced*. However, if such a figure is relatively complicated (for example, a large color plot of experimental data in which there's lots of small detail), the final .pdf (using pdflatex) from LyX usually has quite a bit of detail lost in the figure (small details seem "averaged out" and therefore blurry), whereas a .dvi or postscript document usually seems to retain most of the detail of the original graphic. Is this because of a convoluted conversion path, where at some (maybe more than one) step, some graphics detail is lost? Is there a way to possibly fix this? Did you try to create the pdf directly fron xfig ? Is there a difference with the fig->eps->pdf path with your graphics ? Lyx 1.4 can do this flawlessly. Make sure you use lyx 1.4, and: 1. Insert your xfig figures into lyx dirextly, using the external inset. (Don't export any eps or whatever from xfig!) When the external inset is used, lyx will do appropriate conversions whenever you export to (latex, pdf, ps,...) and lyx 1.4 gets this right. Lyx 1.3 can't use pdflatex with external insets of the xfig type. 2. Create your pdf with file->export->latex(pdflatex) This kind of export will create a pdf directly from a .tex file, without the time-consuming conversions to .dvi and .ps first. Lyx will invoke transfig (which you must have) in order to convert the .fig directly to a .pdf image, without extra conversions to/from .eps Fine detail may of course end up very small in your pdf document, but if you zoom in enough in your pdf viewer, all detail will be there. Helge Hafting
Re: Graphics quality in PDF vs. PS, etc.
From: "Paul A. Rubin" <[EMAIL PROTECTED]> To: lyx-users@lists.lyx.org Subject: Re: Graphics quality in PDF vs. PS, etc. Date: Mon, 26 Jun 2006 12:00:20 -0400 Uwe Stöhr wrote: As I understood you, you insert the graphics as EPS in LyX and produce then the PDF via pdflatex. I also use pdflatex for the PDF-output but insert all graphics as PDF. This has the advantage that the compilation process is much faster because JPG, PNG, and PDF-graphics can directly be embedded into a PDF so that no conversion step is needed. This increases the compilation time and avoids your problem. A very good EPS -> PDF converter is Ghostscript (and of course Acrobat). And if Curtis is using Mathematica to generate the graphs, he can export them directly to PDF from Mathematica. /Paul Paul, A good point. Unfortunately, the PDF export from Mathematica is problematical, at least with this particular plot (I've never run into troubles before, but I've never worked with such large graphics files, either); a .pdf IS generated, of the correct name and filesize, but is absolutely blank when viewed in Acrobat or Ghostview. If I remove all text from the generated file before exporting it, a PART of the file renders, but its aspect ratio is off. (These two points are problems for me and Wolfram to figure out, so just incidental to this list) Finally, if I'm not mistaken, exporting the graphic directly as PDF means that all the advantage of being able to use LaTeX fonts when LyX does its rendering is lost; the fonts and their size will be fixed in the .pdf file, and may not match the default fonts in LyX without some careful planning. If I'm wrong on this point, please let me know! Thanks to all for their help and replies. This list and its expert readers have always been a great help to me. Curtis O.
Re: Graphics quality in PDF vs. PS, etc.
Uwe Stöhr wrote: As I understood you, you insert the graphics as EPS in LyX and produce then the PDF via pdflatex. I also use pdflatex for the PDF-output but insert all graphics as PDF. This has the advantage that the compilation process is much faster because JPG, PNG, and PDF-graphics can directly be embedded into a PDF so that no conversion step is needed. This increases the compilation time and avoids your problem. A very good EPS -> PDF converter is Ghostscript (and of course Acrobat). And if Curtis is using Mathematica to generate the graphs, he can export them directly to PDF from Mathematica. /Paul
Re: Graphics quality in PDF vs. PS, etc.
>>X-Originating-Email: [EMAIL PROTECTED] >>From: "Curtis Osterhoudt" <[EMAIL PROTECTED]> >>To: lyx-users@lists.lyx.org >>Subject: Graphics quality in PDF vs. PS, etc. >>Date: Sun, 25 Jun 2006 22:31:00 + >> >>Hi, all, >> >>I'm currently producing documents using LyX, in which graphics are often >>XFig figures. I like the fact that LaTeX fonts can be embedded in such >>figures, and look great when the final document is produced*. >> However, if such a figure is relatively complicated (for example, a large >>color plot of experimental data in which there's lots of small detail), the >>final .pdf (using pdflatex) from LyX usually has quite a bit of detail lost >>in the figure (small details seem "averaged out" and therefore blurry), >>whereas a .dvi or postscript document usually seems to retain most of the >>detail of the original graphic. Is this because of a convoluted conversion >>path, where at some (maybe more than one) step, some graphics detail is >>lost? Is there a way to possibly fix this? Did you try to create the pdf directly fron xfig ? Is there a difference with the fig->eps->pdf path with your graphics ? Regards -- Jean-Pierre
Re: Graphics quality in PDF vs. PS, etc.
Curtis Osterhoudt wrote: > On the other hand, the original problem remains: Why would > 1. starting w/ an .eps image; > 2. converting the .eps to .pdf using "convert"; > 3. inserting the .pdf into LyX; then > 4. exporting the whole document w/ pdflatex > show (some) degradation, but > 1. starting w/ .eps (actually XFig), as sharp as any .eps; > 2. inserting the XFig figure into LyX, using Insert->External > Material->XFig; > 3. exporting document w/ pdflatex > show (lots of unacceptable) image degradation? It should not. > I'd post a minimal example, but the graphics files I'm working w/ are > on > the order of 5MB. I may be able to make up something simpler in a few > days. That would be great. In theory your method is the best one and should not loose any details of the image, because the Xfig external template has a specialization for pdflatex that produces pdf instead of eps directly from the xfig file. That is one conversion step less than converting the eps file to pdf, is completely automatic and faster. If you can't reduce the image file and if it is not confidential you can also send it to me privately, and I'll have a look at the problem. Georg
Re: Graphics quality in PDF vs. PS, etc.
Original Message Follows From: Uwe Stöhr <[EMAIL PROTECTED]> To: Curtis Osterhoudt <[EMAIL PROTECTED]> CC: lyx-users@lists.lyx.org Subject: Re: Graphics quality in PDF vs. PS, etc. Date: Mon, 26 Jun 2006 02:31:30 +0200 Curtis Osterhoudt wrote: I'm currently producing documents using LyX, in which graphics are often XFig figures. I like the fact that LaTeX fonts can be embedded in such figures, and look great when the final document is produced*. However, if such a figure is relatively complicated (for example, a large color plot of experimental data in which there's lots of small detail), the final .pdf (using pdflatex) from LyX usually has quite a bit of detail lost in the figure (small details seem "averaged out" and therefore blurry), whereas a .dvi or postscript document usually seems to retain most of the detail of the original graphic. Is this because of a convoluted conversion path, where at some (maybe more than one) step, some graphics detail is lost? Is there a way to possibly fix this? As I understood you, you insert the graphics as EPS in LyX and produce then the PDF via pdflatex. I also use pdflatex for the PDF-output but insert all graphics as PDF. This has the advantage that the compilation process is much faster because JPG, PNG, and PDF-graphics can directly be embedded into a PDF so that no conversion step is needed. This increases the compilation time and avoids your problem. A very good EPS -> PDF converter is Ghostscript (and of course Acrobat). regards Uwe Well... In a way. In fact, I'm using the Insert -> External Material -> XFig way, which does indeed embed an EPS, along with whatever fancy LaTeXy stuff XFig has shoved in there (I think). I tried converting the EPS to PDF using "convert" (on a linux system, which I think uses ImageMagick to do the conversion. This results in a slightly lower quality image than the original EPS, but no [further] image degradation when exported using Pdflatex. So from now on, I might use your method of creating PDF files, and just including them as graphics. On the other hand, the original problem remains: Why would 1. starting w/ an .eps image; 2. converting the .eps to .pdf using "convert"; 3. inserting the .pdf into LyX; then 4. exporting the whole document w/ pdflatex show (some) degradation, but 1. starting w/ .eps (actually XFig), as sharp as any .eps; 2. inserting the XFig figure into LyX, using Insert->External Material->XFig; 3. exporting document w/ pdflatex show (lots of unacceptable) image degradation? I'd post a minimal example, but the graphics files I'm working w/ are on the order of 5MB. I may be able to make up something simpler in a few days. Best wishes, and thanks, Curtis O.
Re: Graphics quality in PDF vs. PS, etc.
Curtis Osterhoudt wrote: I'm currently producing documents using LyX, in which graphics are often XFig figures. I like the fact that LaTeX fonts can be embedded in such figures, and look great when the final document is produced*. However, if such a figure is relatively complicated (for example, a large color plot of experimental data in which there's lots of small detail), the final .pdf (using pdflatex) from LyX usually has quite a bit of detail lost in the figure (small details seem "averaged out" and therefore blurry), whereas a .dvi or postscript document usually seems to retain most of the detail of the original graphic. Is this because of a convoluted conversion path, where at some (maybe more than one) step, some graphics detail is lost? Is there a way to possibly fix this? As I understood you, you insert the graphics as EPS in LyX and produce then the PDF via pdflatex. I also use pdflatex for the PDF-output but insert all graphics as PDF. This has the advantage that the compilation process is much faster because JPG, PNG, and PDF-graphics can directly be embedded into a PDF so that no conversion step is needed. This increases the compilation time and avoids your problem. A very good EPS -> PDF converter is Ghostscript (and of course Acrobat). regards Uwe
Graphics quality in PDF vs. PS, etc.
Hi, all, I'm currently producing documents using LyX, in which graphics are often XFig figures. I like the fact that LaTeX fonts can be embedded in such figures, and look great when the final document is produced*. However, if such a figure is relatively complicated (for example, a large color plot of experimental data in which there's lots of small detail), the final .pdf (using pdflatex) from LyX usually has quite a bit of detail lost in the figure (small details seem "averaged out" and therefore blurry), whereas a .dvi or postscript document usually seems to retain most of the detail of the original graphic. Is this because of a convoluted conversion path, where at some (maybe more than one) step, some graphics detail is lost? Is there a way to possibly fix this? Thanks, Curtis O. * The original .eps figures are often produced using Mathematica. I then run these through pstoedit and make final adjustments (often none) in XFig. But because (I think) these figures aren't *originally* produced in XFig, the "start XFig with LaTeX fonts and 'special' flag" setting makes no difference when looking at the figures in XFig. NEW documents have the "special" flag and "LaTeX" fonts enabled; pre-existing documents do not. Therefore I run the final figures through another Mathematica script which simply turns all the text to LaTeX fonts (just sets one of the flags in the text portions of the XFig file to "0" ). If anyone has a better (regex?) way to do this, I'd love to hear about it! Down with categorical imperative! [EMAIL PROTECTED] or [EMAIL PROTECTED]