[NTG-context] Problem including svg files with Inkscape 1.0~rc1-4
mf
massifr at fastwebnet.it
Thu Apr 30 18:06:50 CEST 2020
Il 30/04/20 17:21, Hans Hagen ha scritto:
> On 4/30/2020 3:15 PM, mf wrote:
>> Il 30/04/20 14:09, Romain Diss ha scritto:
>>> Hi,
>>>
>>> The last release candidat of Inkscape (1.0~rc1-4 on my Debian sid)
>>> doesn't provide the `--export-pdf=` option anymore. So context can not
>>> convert svg files into the corresponding `m_k_i_v_*` pdf.
>>>
>>> It seems that the `--export-filename=` option does the job.
>>>
>>> Thank in advance.
>>>
>>
>> The command line syntax has changed in version 1. See this:
>>
>> http://wiki.inkscape.org/wiki/index.php/Release_notes/1.0#Command_Line
>>
>> So it's --export-filename in Inkscape 1.00, and --export-pdf in
>> previous versions.
>>
>> I tried to specify both options with Inkscape 0.92 hoping the wrong
>> one would be ignored, without success; you get only a warning, not an
>> error, but the conversion fails anyway.
>>
>> To make ConTeXt work with both versions, it should run "inkscape
>> --version" before doing the actual conversion, to decide the right
>> option.
>>
>> If the conversion you need is done by
>>
>> tex/texmf-context/scripts/context/ruby/graphics/inkscape.rb
>>
>> you should edit that file and replace "--export-pdf" with
>> "--export-filename".
>>
>> There are two other files where that option is used:
>>
>> tex/texmf-context/tex/generic/context/luatex/luatex-fonts-merged.lua
>> tex/texmf-context/tex/context/base/mkiv/font-ocl.lua
>>
>> it's font-related code; if you need it, do the same replacement of
>> "--export-pdf" in those two files and then remake the format with
>>
>> context --make
>>
>> and the export to pdf will work with Inkscape 1.00.
>> But it won't work with Inkscape 0.92.
> As I don't wan to waste code for testing the version, when do we change
> this? Now? I downloaded version 1 so it is available for all platforms.
>
1.0 is a release candidate. Romain is using the unstable version of
Debian (sid), so he's using Inkscape 1.00rc.
Anyway Inkscape 0.92 will be around for some time, so a better solution
would be defaulting to the export option of the current version of
Inkscape unless the user sets an environment variable (INKSCAPE_VERSION?).
So a test of an environment variable instead of spawning a process to
run "inkscape --version".
Massi
More information about the ntg-context
mailing list