Am 04.01.2019 um 15:42 schrieb Enrico Forestieri <for...@lyx.org>:
> 
> On Fri, Jan 04, 2019 at 01:38:27PM +0100, Stephan Witt wrote:
>> Am 04.01.2019 um 10:27 schrieb Enrico Forestieri <for...@lyx.org>:
>>> 
>>> On Mon, Dec 24, 2018 at 11:02:10AM +0100, Stephan Witt wrote:
>>>> Am 23.12.2018 um 23:03 schrieb Stephan Witt <st.w...@gmx.net>:
>>> [...]
>>>>> 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).
>>> 
>>> Note that the $$p are explicitly added by configure.py only for Mac (search
>>> for inkscape_fileprefix in configure.py).
>> 
>> Yes, I have seen this. Jürgen did it this way because he had a problem with
>> the non-special case on Linux. Probably the same we have now on Mac: the
>> on-screen rendering of SVG is broken in case of having inkscape installed.
>> 
>>> So, maybe it suffices not to
>>> special case the Mac here?
>> 
>> 
>> You mean to pass directory name for $$p and use it on all platforms for 
>> inkscape?
>> And don’t change the other converters so they all use relative path names
>> for both conversions?
> 
> I mean changing only configure.py by removing inkscape_fileprefix so that
> the converters on Mac are defined exactly as on all other platforms, i.e.,
> without $$p.

I see. But this breaks the export with inkscape to e.g. PDF.  There the $$i
and $$o are not absolute path names but relative to the temporary directory.

The inkscape binary on Mac is a shell script inside the Inkscape.app bundle.
It has the drawback that it internally does a cd (change directory) and later
tries to access the files given from command line. This must fail with relative
path name arguments. One may call it a bug of the inkscape script but it’s as it
is. The author of the script did it to solve another problem with the Inkscape
application.

In principle this may happen with every external converter.

IMO the different meaning of $$i and $$o in LyX converters is a bug too.
And this bug we can fix.

Stephan

Reply via email to