Hi all, first I wish all of you a Happy New Year.
I investigated the cause of the issue with displaying SVG (including our own icons in Users Guide) on-screen. IMO the root cause is the existence of two ways to use the configured converters: 1. the conversion process to load external material to present it on-screen (build_script in GraphicsConverter.cpp) and 2. the conversion process to prepare external material for use by external programs like LaTeX (Converters::convert) Both are using the utilities detected by lib/configure.py. But the meaning of the „$$i“ and „$$o“ placeholders is different. (1) is passing the complete absolute path of input and output file. (2) is operating in the temporary directory and uses relative path names only. On Mac the inkscape binary is a shell script itself and it’s not working with relative path names for input and output files. Therefore I added the prefix „$$p“ in front of the names to get absolute path names. Unfortunately this breaks the conversion (1). One possible solution for the current issue is it to change (1) to replace „$$p“ with an empty string. Is this a good idea or is some more fundamental change to unify the converters to prefer? Any other ideas? Best regards, Stephan > Am 24.12.2018 um 11:02 schrieb Stephan Witt <st.w...@gmx.net>: > > Am 23.12.2018 um 23:03 schrieb Stephan Witt <st.w...@gmx.net>: >> >> Am 23.12.2018 um 19:28 schrieb Robert Betz <robert.b...@newcastle.edu.au>: >>> >>> Anders, >>> >>> Stephen Witt mentioned that he was using RSVG-convert. So I installed, >>> using macports librsvg. I did a reconfigure on Lyx, and now the svgz >>> snippets show up. >>> >>> Don’t know why it is required to have this package, as Lyx should supply >>> everything it needs to make all these conversions work. >> >> It’s a little bit more convoluted than you think. >> >> I’ve tried to disable rsvg-convert by making it a non-executable and the >> shell didn’t find it - but LyX detected it and couldn’t run it. So, it was >> not right to say, I’m having the same problem as you. My problem was to have >> a non-working rsvg-convert. Then I renamed rsvg-convert and the preview of >> SVG graphics snippets worked out-of-the-box again. Next I’ve installed >> inkscape 0.91 and immediately had your problem after reconfiguring LyX. LyX >> was able to find end execute inkscape but the converter script used contains >> a strange command line and the conversion failed because of it. >> >> The python script generated on the fly by LyX has two superfluous „$$p“ in >> front of the real path names of in and out files. >> >> # if os.system(r'inkscape --without-gui --file=$$p' + '"' + infile + '"' + ' >> --export-png=$$p' + '"' + outfile + '"' + '') != 0: >> >> This is a consequence of the auto detected converter configuration line in >> ~/Library/Application\ Support/LyX-2.3/lyxrc.defaults >> >> \converter svg png "inkscape --without-gui --file=$$p$$i >> --export-png=$$p$$o" "", >> >> I’m not sure how this should work - obviously it doesn’t work. > > To be more explicit: it doesn’t work on Mac with inkscape installed. One > possible work around for you would be to change the converter definitions for > SVG to PNG and SVGZ to PNG. > > Remove the $$p from the converter parameters (see attached screen shot). > > Stephan > > <Bildschirmfoto 2018-12-24 um 11.00.19.png>