On Dec 3, 2013, at 1:22 PM, Scott Kostyshak <skost...@lyx.org> wrote:
> On Tue, Dec 3, 2013 at 4:41 AM, Murat Yildizoglu > <murat.yildizo...@u-bordeaux4.fr> wrote: >> Scott, are you sure that Lyx uses EPS for showing the graphics on the >> screen? I have had the impression that it was rather using a bitmap format >> like PNG. > > Not all formats are converted to .eps. If you insert a .png it will > not be converted to a .eps. I agree that in the end to display on a > screen a bitmap is more useful but I think that Qt takes care of that. > If you go to Insert > Graphics and choose a .pdf, at least on Ubuntu, > it is converted to a .eps. You can see this by starting LyX with lyx > -dbg graphics and looking at the output. > > Below is some useful information from the output. Note all the way at > the bottom "from_format: pdf6 > to_format: eps" > <snip> > > Scott Scott, I ran LyX with the -dbg graphics command and got the following output. Not sure what to make of it but there seems to be a lot of complaining. FWIW I ran it again with spaces removed from path names and got the same result. Jerry Last login: Tue Dec 3 14:16:34 on ttys004 Hello, Jerry. Your profile is at ~/.profile. MBPro:bin jerrybauck$ cd /Applications/Words/LyXOuterFolder/LyX.app/Contents/MacOS MBPro:MacOS jerrybauck$ ./lyx -dbg graphics Setting debug level to graphics Debugging `graphics' (Graphics conversion and loading) support/FileName.cpp (950): filetools(getFormatFromContents) Couldn't find a known format! support/FileName.cpp (945): Recognised Fileformat: agr support/FileName.cpp (950): filetools(getFormatFromContents) Couldn't find a known format! support/FileName.cpp (950): filetools(getFormatFromContents) Couldn't find a known format! support/FileName.cpp (950): filetools(getFormatFromContents) Couldn't find a known format! support/FileName.cpp (950): filetools(getFormatFromContents) Couldn't find a known format! support/FileName.cpp (950): filetools(getFormatFromContents) Couldn't find a known format! support/FileName.cpp (950): filetools(getFormatFromContents) Couldn't find a known format! support/FileName.cpp (950): filetools(getFormatFromContents) Couldn't find a known format! support/FileName.cpp (832): filetools(getFormatFromContents) File type not recognised before EOF! support/FileName.cpp (950): filetools(getFormatFromContents) Couldn't find a known format! support/FileName.cpp (832): filetools(getFormatFromContents) File type not recognised before EOF! support/FileName.cpp (950): filetools(getFormatFromContents) Couldn't find a known format! support/FileName.cpp (950): filetools(getFormatFromContents) Couldn't find a known format! support/FileName.cpp (950): filetools(getFormatFromContents) Couldn't find a known format! support/FileName.cpp (950): filetools(getFormatFromContents) Couldn't find a known format! support/FileName.cpp (950): filetools(getFormatFromContents) Couldn't find a known format! support/FileName.cpp (950): filetools(getFormatFromContents) Couldn't find a known format! support/FileName.cpp (950): filetools(getFormatFromContents) Couldn't find a known format! support/FileName.cpp (950): filetools(getFormatFromContents) Couldn't find a known format! support/FileName.cpp (832): filetools(getFormatFromContents) File type not recognised before EOF! support/FileName.cpp (950): filetools(getFormatFromContents) Couldn't find a known format! support/FileName.cpp (945): Recognised Fileformat: eps support/FileName.cpp (945): Recognised Fileformat: eps support/FileName.cpp (945): Recognised Fileformat: eps support/FileName.cpp (945): Recognised Fileformat: pdf support/FileName.cpp (945): Recognised Fileformat: pdf support/FileName.cpp (950): filetools(getFormatFromContents) Couldn't find a known format! Format.cpp (147): will guess format from file extension: svg -> svg support/FileName.cpp (945): Recognised Fileformat: eps support/FileName.cpp (945): Recognised Fileformat: pdf support/FileName.cpp (945): Recognised Fileformat: pdf support/FileName.cpp (950): filetools(getFormatFromContents) Couldn't find a known format! support/FileName.cpp (950): filetools(getFormatFromContents) Couldn't find a known format! support/FileName.cpp (950): filetools(getFormatFromContents) Couldn't find a known format! support/FileName.cpp (950): filetools(getFormatFromContents) Couldn't find a known format! support/FileName.cpp (832): filetools(getFormatFromContents) File type not recognised before EOF! support/FileName.cpp (950): filetools(getFormatFromContents) Couldn't find a known format! support/FileName.cpp (950): filetools(getFormatFromContents) Couldn't find a known format! support/FileName.cpp (950): filetools(getFormatFromContents) Couldn't find a known format! support/FileName.cpp (950): filetools(getFormatFromContents) Couldn't find a known format! support/FileName.cpp (950): filetools(getFormatFromContents) Couldn't find a known format! support/FileName.cpp (950): filetools(getFormatFromContents) Couldn't find a known format! support/FileName.cpp (950): filetools(getFormatFromContents) Couldn't find a known format! support/FileName.cpp (950): filetools(getFormatFromContents) Couldn't find a known format! support/FileName.cpp (832): filetools(getFormatFromContents) File type not recognised before EOF! support/FileName.cpp (950): filetools(getFormatFromContents) Couldn't find a known format! support/FileName.cpp (832): filetools(getFormatFromContents) File type not recognised before EOF! support/FileName.cpp (950): filetools(getFormatFromContents) Couldn't find a known format! support/FileName.cpp (950): filetools(getFormatFromContents) Couldn't find a known format! support/FileName.cpp (950): filetools(getFormatFromContents) Couldn't find a known format! support/FileName.cpp (950): filetools(getFormatFromContents) Couldn't find a known format! support/FileName.cpp (950): filetools(getFormatFromContents) Couldn't find a known format! support/FileName.cpp (950): filetools(getFormatFromContents) Couldn't find a known format! support/FileName.cpp (832): filetools(getFormatFromContents) File type not recognised before EOF! support/FileName.cpp (950): filetools(getFormatFromContents) Couldn't find a known format! support/FileName.cpp (950): filetools(getFormatFromContents) Couldn't find a known format! insets/InsetGraphics.cpp (145): Token: 'filename' insets/InsetGraphics.cpp (145): Token: '\end_inset' support/FileName.cpp (950): filetools(getFormatFromContents) Couldn't find a known format! support/FileName.cpp (945): Recognised Fileformat: pdf graphics/GraphicsCacheItem.cpp (378): [CacheItem::Impl::convertToDisplayFormat] Attempting to convert image file: /Applications/Words/LyXOuterFolder/MyLearningDocuments/Dump Me/Figure A/Temp for sine random process Davenport.pdf with displayed filename: /Applications/Words/LyXOuterFolder/MyLearningDocuments/Dump Me/Figure A/Temp for sine random process Davenport.pdf support/FileName.cpp (945): Recognised Fileformat: pdf graphics/GraphicsCacheItem.cpp (385): The file contains pdf format data. frontends/qt4/GuiApplication.cpp (183): The image loader can load the following directly: frontends/qt4/GuiApplication.cpp (190): bmp, frontends/qt4/GuiApplication.cpp (190): gif, frontends/qt4/GuiApplication.cpp (190): ico, frontends/qt4/GuiApplication.cpp (190): jpeg, frontends/qt4/GuiApplication.cpp (190): jpg, frontends/qt4/GuiApplication.cpp (190): mng, frontends/qt4/GuiApplication.cpp (190): pbm, frontends/qt4/GuiApplication.cpp (190): pgm, frontends/qt4/GuiApplication.cpp (190): png, frontends/qt4/GuiApplication.cpp (190): ppm, frontends/qt4/GuiApplication.cpp (190): svg, frontends/qt4/GuiApplication.cpp (190): svgz, frontends/qt4/GuiApplication.cpp (190): tga, frontends/qt4/GuiApplication.cpp (190): tif, frontends/qt4/GuiApplication.cpp (190): tiff, frontends/qt4/GuiApplication.cpp (190): xbm, frontends/qt4/GuiApplication.cpp (190): xpm, graphics/GraphicsCache.cpp (91): LyX recognises the following image formats: graphics/GraphicsCache.cpp (98): bmp graphics/GraphicsCache.cpp (97): , graphics/GraphicsCache.cpp (98): gif graphics/GraphicsCache.cpp (97): , graphics/GraphicsCache.cpp (98): jpg graphics/GraphicsCache.cpp (97): , graphics/GraphicsCache.cpp (98): jpg graphics/GraphicsCache.cpp (97): , graphics/GraphicsCache.cpp (98): pbm graphics/GraphicsCache.cpp (97): , graphics/GraphicsCache.cpp (98): pgm graphics/GraphicsCache.cpp (97): , graphics/GraphicsCache.cpp (98): png graphics/GraphicsCache.cpp (97): , graphics/GraphicsCache.cpp (98): ppm graphics/GraphicsCache.cpp (97): , graphics/GraphicsCache.cpp (98): svg graphics/GraphicsCache.cpp (97): , graphics/GraphicsCache.cpp (98): tiff graphics/GraphicsCache.cpp (97): , graphics/GraphicsCache.cpp (98): xbm graphics/GraphicsCache.cpp (97): , graphics/GraphicsCache.cpp (98): xpm graphics/GraphicsCache.cpp (100): graphics/GraphicsCacheItem.cpp (340): Unable to convert from pdf to bmp graphics/GraphicsCacheItem.cpp (340): Unable to convert from pdf to gif graphics/GraphicsCacheItem.cpp (340): Unable to convert from pdf to jpg graphics/GraphicsCacheItem.cpp (340): Unable to convert from pdf to jpg graphics/GraphicsCacheItem.cpp (340): Unable to convert from pdf to pbm graphics/GraphicsCacheItem.cpp (340): Unable to convert from pdf to pgm graphics/GraphicsLoader.cpp (116): LoaderQueue: waking up support/FileName.cpp (945): Recognised Fileformat: pdf graphics/GraphicsCacheItem.cpp (378): [CacheItem::Impl::convertToDisplayFormat] Attempting to convert image file: /Applications/Words/LyXOuterFolder/MyLearningDocuments/Dump Me/Figure A/Temp for sine random process Davenport.pdf with displayed filename: /Applications/Words/LyXOuterFolder/MyLearningDocuments/Dump Me/Figure A/Temp for sine random process Davenport.pdf support/FileName.cpp (945): Recognised Fileformat: pdf graphics/GraphicsCacheItem.cpp (385): The file contains pdf format data. graphics/GraphicsCacheItem.cpp (340): Unable to convert from pdf to bmp graphics/GraphicsCacheItem.cpp (340): Unable to convert from pdf to gif graphics/GraphicsCacheItem.cpp (340): Unable to convert from pdf to jpg graphics/GraphicsCacheItem.cpp (340): Unable to convert from pdf to jpg graphics/GraphicsCacheItem.cpp (340): Unable to convert from pdf to pbm graphics/GraphicsCacheItem.cpp (340): Unable to convert from pdf to pgm support/FileName.cpp (945): Recognised Fileformat: pdf graphics/GraphicsCacheItem.cpp (378): [CacheItem::Impl::convertToDisplayFormat] Attempting to convert image file: /Applications/Words/LyXOuterFolder/MyLearningDocuments/Dump Me/Figure A/Temp for sine random process Davenport.pdf with displayed filename: /Applications/Words/LyXOuterFolder/MyLearningDocuments/Dump Me/Figure A/Temp for sine random process Davenport.pdf support/FileName.cpp (945): Recognised Fileformat: pdf graphics/GraphicsCacheItem.cpp (385): The file contains pdf format data. graphics/GraphicsCacheItem.cpp (340): Unable to convert from pdf to bmp graphics/GraphicsCacheItem.cpp (340): Unable to convert from pdf to gif graphics/GraphicsCacheItem.cpp (340): Unable to convert from pdf to jpg graphics/GraphicsCacheItem.cpp (340): Unable to convert from pdf to jpg graphics/GraphicsCacheItem.cpp (340): Unable to convert from pdf to pbm graphics/GraphicsCacheItem.cpp (340): Unable to convert from pdf to pgm support/FileName.cpp (945): Recognised Fileformat: pdf graphics/GraphicsCacheItem.cpp (378): [CacheItem::Impl::convertToDisplayFormat] Attempting to convert image file: /Applications/Words/LyXOuterFolder/MyLearningDocuments/Dump Me/Figure A/Temp for sine random process Davenport.pdf with displayed filename: /Applications/Words/LyXOuterFolder/MyLearningDocuments/Dump Me/Figure A/Temp for sine random process Davenport.pdf support/FileName.cpp (945): Recognised Fileformat: pdf graphics/GraphicsCacheItem.cpp (385): The file contains pdf format data. graphics/GraphicsCacheItem.cpp (340): Unable to convert from pdf to bmp graphics/GraphicsCacheItem.cpp (340): Unable to convert from pdf to gif graphics/GraphicsCacheItem.cpp (340): Unable to convert from pdf to jpg graphics/GraphicsCacheItem.cpp (340): Unable to convert from pdf to jpg graphics/GraphicsCacheItem.cpp (340): Unable to convert from pdf to pbm graphics/GraphicsCacheItem.cpp (340): Unable to convert from pdf to pgm graphics/GraphicsLoader.cpp (90): LoaderQueue: 1 items in the queue graphics/GraphicsCacheItem.cpp (408): Converting it to format. support/FileName.cpp (945): Recognised Fileformat: pdf graphics/GraphicsCacheItem.cpp (378): [CacheItem::Impl::convertToDisplayFormat] Attempting to convert image file: /Applications/Words/LyXOuterFolder/MyLearningDocuments/Dump Me/Figure A/Temp for sine random process Davenport.pdf with displayed filename: /Applications/Words/LyXOuterFolder/MyLearningDocuments/Dump Me/Figure A/Temp for sine random process Davenport.pdf support/FileName.cpp (945): Recognised Fileformat: pdf graphics/GraphicsCacheItem.cpp (385): The file contains pdf format data. graphics/GraphicsCacheItem.cpp (340): Unable to convert from pdf to bmp graphics/GraphicsCacheItem.cpp (340): Unable to convert from pdf to gif graphics/GraphicsCacheItem.cpp (340): Unable to convert from pdf to jpg graphics/GraphicsCacheItem.cpp (340): Unable to convert from pdf to jpg graphics/GraphicsCacheItem.cpp (340): Unable to convert from pdf to pbm graphics/GraphicsCacheItem.cpp (340): Unable to convert from pdf to pgm graphics/GraphicsConverter.cpp (127): Converter c-tor: from_file: /Applications/Words/LyXOuterFolder/MyLearningDocuments/Dump Me/Figure A/Temp for sine random process Davenport.pdf to_file_base: /var/folders/5r/0qcw1v_r8xjdqm00r6by9zy00000gn/T/lyx_tmpdir.L18090/CacheItem.u18090 from_format: pdf to_format: png graphics/GraphicsConverter.cpp (264): build_script ... graphics/GraphicsConverter.cpp (376): ready! graphics/GraphicsConverter.cpp (142): Conversion script: -------------------------------------- #!/usr/bin/env python # -*- coding: utf-8 -*- import os, shutil, sys def unlinkNoThrow(file): ''' remove a file, do not throw if an error occurs ''' try: os.unlink(file) except: pass infile = "/Applications/Words/LyXOuterFolder/MyLearningDocuments/Dump Me/Figure A/Temp for sine random process Davenport.pdf" outfile = "/var/folders/5r/0qcw1v_r8xjdqm00r6by9zy00000gn/T/lyx_tmpdir.L18090/gconvert0.W18090.pdf" shutil.copy(infile, outfile) os.chdir("/var/folders/5r/0qcw1v_r8xjdqm00r6by9zy00000gn/T/lyx_tmpdir.L18090/") infile = "/var/folders/5r/0qcw1v_r8xjdqm00r6by9zy00000gn/T/lyx_tmpdir.L18090/gconvert0.W18090.pdf" infile_base = "/var/folders/5r/0qcw1v_r8xjdqm00r6by9zy00000gn/T/lyx_tmpdir.L18090/gconvert0.W18090" outfile = "/var/folders/5r/0qcw1v_r8xjdqm00r6by9zy00000gn/T/lyx_tmpdir.L18090/gconvert0.W18090.eps" outdir = os.path.dirname(outfile) if os.system(r'pdftops -eps -f 1 -l 1 ' + '"' + infile + '"' + ' ' + '"' + outfile + '"' + '') != 0: unlinkNoThrow(outfile) sys.exit(1) if not os.path.isfile(outfile): if os.path.isfile(outfile + '.0'): os.rename(outfile + '.0', outfile) import glob for file in glob.glob(outfile + '.?'): unlinkNoThrow(file) else: sys.exit(1) unlinkNoThrow(infile) infile = "/var/folders/5r/0qcw1v_r8xjdqm00r6by9zy00000gn/T/lyx_tmpdir.L18090/gconvert0.W18090.eps" infile_base = "/var/folders/5r/0qcw1v_r8xjdqm00r6by9zy00000gn/T/lyx_tmpdir.L18090/gconvert0.W18090" outfile = "/var/folders/5r/0qcw1v_r8xjdqm00r6by9zy00000gn/T/lyx_tmpdir.L18090/gconvert0.W18090.png" outdir = os.path.dirname(outfile) if os.system(r'convert ' + '"' + infile + '"' + ' ' + '"' + outfile + '"' + '') != 0: unlinkNoThrow(outfile) sys.exit(1) if not os.path.isfile(outfile): if os.path.isfile(outfile + '.0'): os.rename(outfile + '.0', outfile) import glob for file in glob.glob(outfile + '.?'): unlinkNoThrow(file) else: sys.exit(1) unlinkNoThrow(infile) fromfile = outfile tofile = "/var/folders/5r/0qcw1v_r8xjdqm00r6by9zy00000gn/T/lyx_tmpdir.L18090/CacheItem.u18090.png" try: os.rename(fromfile, tofile) except: try: shutil.copy(fromfile, tofile) except: sys.exit(1) unlinkNoThrow(fromfile) -------------------------------------- support/ForkedCalls.cpp (495): ForkedCallQueue: waking up graphics/GraphicsLoader.cpp (127): LoaderQueue: I'm going to sleep Error: /syntaxerror in (bin obj seq, type=128, elements=1, size=6917, non-zero unused field) Operand stack: Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1910 1 3 %oparray_pop 1909 1 3 %oparray_pop --nostringval-- 1893 1 3 %oparray_pop 1787 1 3 %oparray_pop --nostringval-- %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- Dictionary stack: --dict:1171/1684(ro)(G)-- --dict:0/20(G)-- --dict:83/200(L)-- --dict:67/75(L)-- Current allocation mode is local Current file position is 74159 GPL Ghostscript 9.06: Unrecoverable error, exit code 1 Error: /syntaxerror in (bin obj seq, type=128, elements=1, size=6917, non-zero unused field) Operand stack: Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1910 1 3 %oparray_pop 1909 1 3 %oparray_pop --nostringval-- 1893 1 3 %oparray_pop 1787 1 3 %oparray_pop --nostringval-- %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- Dictionary stack: --dict:1171/1684(ro)(G)-- --dict:0/20(G)-- --dict:83/200(L)-- --dict:67/75(L)-- Current allocation mode is local Current file position is 74159 GPL Ghostscript 9.06: Unrecoverable error, exit code 1 convert: Postscript delegate failed `/var/folders/5r/0qcw1v_r8xjdqm00r6by9zy00000gn/T/lyx_tmpdir.L18090/gconvert0.W18090.eps': No such file or directory @ error/ps.c/ReadPSImage/833. convert: no images defined `/var/folders/5r/0qcw1v_r8xjdqm00r6by9zy00000gn/T/lyx_tmpdir.L18090/gconvert0.W18090.png' @ error/convert.c/ConvertImageCommand/3044. support/ForkedCalls.cpp (504): ForkedCallQueue: I'm going to sleep graphics/GraphicsCacheItem.cpp (263): Image conversion failed. graphics/GraphicsCacheItem.cpp (273): Unable to find converted file! MBPro:MacOS jerrybauck$