ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Problem including svg files with Inkscape 1.0~rc1-4
       [not found] <20200430120906.GA48095.ref@nereid.neptune>
@ 2020-04-30 12:09 ` Romain Diss
  2020-04-30 13:15   ` mf
  0 siblings, 1 reply; 8+ messages in thread
From: Romain Diss @ 2020-04-30 12:09 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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.

-- 
Romain Diss
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Problem including svg files with Inkscape 1.0~rc1-4
  2020-04-30 12:09 ` Problem including svg files with Inkscape 1.0~rc1-4 Romain Diss
@ 2020-04-30 13:15   ` mf
  2020-04-30 15:21     ` Hans Hagen
                       ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: mf @ 2020-04-30 13:15 UTC (permalink / raw)
  To: ntg-context

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.

Massi
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Problem including svg files with Inkscape 1.0~rc1-4
  2020-04-30 13:15   ` mf
@ 2020-04-30 15:21     ` Hans Hagen
  2020-04-30 15:21     ` Hans Hagen
  2020-04-30 15:35     ` Romain Diss
  2 siblings, 0 replies; 8+ messages in thread
From: Hans Hagen @ 2020-04-30 15:21 UTC (permalink / raw)
  To: mailing list for ConTeXt users, mf

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.

there's one more file: grph-con.lua ... (the merged file is not relevant 
as it is for generic but no one uses that one for fonts (like emoji) 
that use svg and the merged file is generated from other files anyway)

Here I also need to adapt the font-ocl replacement file (font-ocm) which 
reminds me that i need to add some already long pending code to the 
luatex binary one of these days.

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Problem including svg files with Inkscape 1.0~rc1-4
  2020-04-30 13:15   ` mf
  2020-04-30 15:21     ` Hans Hagen
@ 2020-04-30 15:21     ` Hans Hagen
  2020-04-30 16:06       ` mf
  2020-04-30 15:35     ` Romain Diss
  2 siblings, 1 reply; 8+ messages in thread
From: Hans Hagen @ 2020-04-30 15:21 UTC (permalink / raw)
  To: mailing list for ConTeXt users, mf

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.

there's one more file: grph-con.lua ... (the merged file is not relevant 
as it is for generic but no one uses that one for fonts (like emoji) 
that use svg and the merged file is generated from other files anyway)

Here I also need to adapt the font-ocl replacement file (font-ocm) which 
reminds me that i need to add some already long pending code to the 
luatex binary one of these days.

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Problem including svg files with Inkscape 1.0~rc1-4
  2020-04-30 13:15   ` mf
  2020-04-30 15:21     ` Hans Hagen
  2020-04-30 15:21     ` Hans Hagen
@ 2020-04-30 15:35     ` Romain Diss
  2020-04-30 17:54       ` Hans Hagen
  2 siblings, 1 reply; 8+ messages in thread
From: Romain Diss @ 2020-04-30 15:35 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi,

> 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.
> 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.
> 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".
Thanks for this workaround but I suppose I'll need to edit that file
again after each context update…

However, the change in `inkscape.rb` has no effect, even after updating
the format with `context --make`… Any idea ?

Best.

-- 
Romain Diss
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Problem including svg files with Inkscape 1.0~rc1-4
  2020-04-30 15:21     ` Hans Hagen
@ 2020-04-30 16:06       ` mf
  2020-04-30 17:56         ` Hans Hagen
  0 siblings, 1 reply; 8+ messages in thread
From: mf @ 2020-04-30 16:06 UTC (permalink / raw)
  To: Hans Hagen, mailing list for ConTeXt users

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
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Problem including svg files with Inkscape 1.0~rc1-4
  2020-04-30 15:35     ` Romain Diss
@ 2020-04-30 17:54       ` Hans Hagen
  0 siblings, 0 replies; 8+ messages in thread
From: Hans Hagen @ 2020-04-30 17:54 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 4/30/2020 5:35 PM, Romain Diss wrote:
> Hi,
> 
>> 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.
>> 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.
>> 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".
> Thanks for this workaround but I suppose I'll need to edit that file
> again after each context update…
> 
> However, the change in `inkscape.rb` has no effect, even after updating
> the format with `context --make`… Any idea ?
Hi,

just wondering ... do you need that script when you use mkiv?

Hans


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Problem including svg files with Inkscape 1.0~rc1-4
  2020-04-30 16:06       ` mf
@ 2020-04-30 17:56         ` Hans Hagen
  0 siblings, 0 replies; 8+ messages in thread
From: Hans Hagen @ 2020-04-30 17:56 UTC (permalink / raw)
  To: mf, mailing list for ConTeXt users

On 4/30/2020 6:06 PM, mf wrote:
> 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".

hm, we can have for a while

\enabledirectives[graphics.inkscape.oldversion]

and use new as default (and of course you will wikify that, okay?)

Hans


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-04-30 17:56 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20200430120906.GA48095.ref@nereid.neptune>
2020-04-30 12:09 ` Problem including svg files with Inkscape 1.0~rc1-4 Romain Diss
2020-04-30 13:15   ` mf
2020-04-30 15:21     ` Hans Hagen
2020-04-30 15:21     ` Hans Hagen
2020-04-30 16:06       ` mf
2020-04-30 17:56         ` Hans Hagen
2020-04-30 15:35     ` Romain Diss
2020-04-30 17:54       ` Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).