ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* SVG support
@ 2007-12-04 14:13 Zeus Gómez Marmolejo
  2007-12-04 16:25 ` Hans Hagen
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Zeus Gómez Marmolejo @ 2007-12-04 14:13 UTC (permalink / raw)
  To: ntg-context

Hi all,

I'm working with Inkscape and I would like to embed some figures 
directly in vector format. How do I do that??

I'm trying this:

\externalfigure[system][type=svg][scale=1000]

But a "dummy" image appears. Is there any svg support in context?!


Regards,
Zeus.
___________________________________________________________________________________
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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: SVG support
  2007-12-04 14:13 SVG support Zeus Gómez Marmolejo
@ 2007-12-04 16:25 ` Hans Hagen
  2007-12-06  0:45   ` Zeus Gómez Marmolejo
  2007-12-04 22:12 ` zs
  2007-12-04 23:33 ` Mojca Miklavec
  2 siblings, 1 reply; 11+ messages in thread
From: Hans Hagen @ 2007-12-04 16:25 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Zeus Gómez Marmolejo wrote:
> Hi all,
> 
> I'm working with Inkscape and I would like to embed some figures 
> directly in vector format. How do I do that??
> 
> I'm trying this:
> 
> \externalfigure[system][type=svg][scale=1000]
> 
> But a "dummy" image appears. Is there any svg support in context?!

\usemodule[res-08] \setups[rl:manipulate]

\setupexternalfigures[conversion=pdf]

\starttext

\externalfigure[system.svg]

\stoptext

if you're lucky, it works, otherwise you need to look into how rlxtools 
works

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | 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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: SVG support
  2007-12-04 14:13 SVG support Zeus Gómez Marmolejo
  2007-12-04 16:25 ` Hans Hagen
@ 2007-12-04 22:12 ` zs
  2007-12-04 23:33 ` Mojca Miklavec
  2 siblings, 0 replies; 11+ messages in thread
From: zs @ 2007-12-04 22:12 UTC (permalink / raw)
  To: ntg-context


If you can live without gradients and blur efects, direct PDF export works pretty well (inkscape-0.45.1).

ZS


On Tue, 04 Dec 2007 15:13:24 +0100
Zeus Gómez Marmolejo <zeus@aluzina.org> wrote:

> Hi all,
> 
> I'm working with Inkscape and I would like to embed some figures 
> directly in vector format. How do I do that??
> 
> I'm trying this:
> 
> \externalfigure[system][type=svg][scale=1000]
> 
> But a "dummy" image appears. Is there any svg support in context?!
> 
> 
> Regards,
> Zeus.
> ___________________________________________________________________________________
> 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://tex.aanhet.net
> archive  : https://foundry.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________
___________________________________________________________________________________
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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: SVG support
  2007-12-04 14:13 SVG support Zeus Gómez Marmolejo
  2007-12-04 16:25 ` Hans Hagen
  2007-12-04 22:12 ` zs
@ 2007-12-04 23:33 ` Mojca Miklavec
  2 siblings, 0 replies; 11+ messages in thread
From: Mojca Miklavec @ 2007-12-04 23:33 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Dec 4, 2007 3:13 PM, Zeus Gómez Marmolejo wrote:
> Hi all,
>
> I'm working with Inkscape and I would like to embed some figures
> directly in vector format. How do I do that??
>
> I'm trying this:
>
> \externalfigure[system][type=svg][scale=1000]
>
> But a "dummy" image appears. Is there any svg support in context?!

ConTeXt calls ImageMagick to convert SVG to PDF first (there's no
native support for SVG in pdfTeX).

If you only have a few images, export (or convert) them to PDF -
that's the easiest way. If you have plenty of them, take a look at
Hans's suggestion.

Mojca
___________________________________________________________________________________
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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: SVG support
  2007-12-04 16:25 ` Hans Hagen
@ 2007-12-06  0:45   ` Zeus Gómez Marmolejo
  2007-12-06  9:47     ` Hans Hagen
  0 siblings, 1 reply; 11+ messages in thread
From: Zeus Gómez Marmolejo @ 2007-12-06  0:45 UTC (permalink / raw)
  To: ntg-context

[-- Attachment #1: Type: text/html, Size: 3487 bytes --]

[-- Attachment #2: Type: text/plain, Size: 487 bytes --]

___________________________________________________________________________________
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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: SVG support
  2007-12-06  0:45   ` Zeus Gómez Marmolejo
@ 2007-12-06  9:47     ` Hans Hagen
  2007-12-08 20:51       ` Zeus Gómez Marmolejo
  0 siblings, 1 reply; 11+ messages in thread
From: Hans Hagen @ 2007-12-06  9:47 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Zeus Gómez Marmolejo wrote:
> I've done some tests with "rlxtools" and I've found that the conversion from SVG 
> to PDF is done really bad now. It passes through PS (with the inkscape command 
> line) and then the ghostscript is executed to produce the PDF. But I've found a 
> better way to do it.

before i look into this ... what version of inkscape? when i wrote the 
code ps was the only way that could be trusted (successive version of 
inkscape were broken etc)

> I've modified the file "graphics/inkscape" (it's a ruby source code). At line 69 
> was:
>   resultpipe = "--without-gui --print=\">#{tmpfilename}\" 2>#{logfile}"
> 
> and now:
> resultpipe = "--without-gui --export-pdf=\"#{outfilename}\" 2>#{logfile}"
> 
> After this, all these lines can be commented out:
> 
> #       ghostscript = GhostScript.new(@logger)
> 
> #        ghostscript.setvariable('inputfile',tmpfilename)
> #        ghostscript.setvariable('outputfile',outfilename)
> 
> #        report("converting #{tmpfilename} to #{outfilename}")
> 
> #       ghostscript.convert
> 
> #        begin
> #            File.delete(tmpfilename)
> #        rescue
> #        end
> 
> The difference is that inkscape can export directly to pdf and the conversion is 
> done much better, with transparencies and all the stuff.
> 
> Also, I noticed that at first it didn't work for me because at line 44 
> (logfile=System.null), I don't know why but this strings is "/dev/null/" in my 
> system and when executing the command a message was echoed:
> "sh: /dev/null/ is a directory" and nothing was produced. Now I've modified the 
> caller to pass explictly "/dev/null" as logfile (in pstopdf.rb source, line 401) 
> and now all is working perfectly.
> 
> I hope you can solve these little bugs.
> 
> Regards,
> Zeus.
> 
> 
> Hans Hagen escribió:
>> Zeus G?mez Marmolejo wrote:
>>   
>>> Hi all,
>>>
>>> I'm working with Inkscape and I would like to embed some figures
>>> directly in vector format. How do I do that??
>>>
>>> I'm trying this:
>>>
>>> \externalfigure[system][type=svg][scale=1000]
>>>
>>> But a "dummy" image appears. Is there any svg support in context?!
>>>     
>>
>> \usemodule[res-08] \setups[rl:manipulate]
>>
>> \setupexternalfigures[conversion=pdf]
>>
>> \starttext
>>
>> \externalfigure[system.svg]
>>
>> \stoptext
>>
>> if you're lucky, it works, otherwise you need to look into how rlxtools
>> works
>>
>> -----------------------------------------------------------------
>>                                            Hans Hagen | PRAGMA ADE
>>                Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>>       tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
>>                                               | 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://tex.aanhet.net
> archive  : https://foundry.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________


-- 

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | 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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: SVG support
  2007-12-06  9:47     ` Hans Hagen
@ 2007-12-08 20:51       ` Zeus Gómez Marmolejo
  2007-12-20 10:43         ` Hans Hagen
  2007-12-20 11:04         ` Hans Hagen
  0 siblings, 2 replies; 11+ messages in thread
From: Zeus Gómez Marmolejo @ 2007-12-08 20:51 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/html, Size: 4971 bytes --]

[-- Attachment #2: Type: text/plain, Size: 487 bytes --]

___________________________________________________________________________________
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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: SVG support
  2007-12-08 20:51       ` Zeus Gómez Marmolejo
@ 2007-12-20 10:43         ` Hans Hagen
  2007-12-20 11:04         ` Hans Hagen
  1 sibling, 0 replies; 11+ messages in thread
From: Hans Hagen @ 2007-12-20 10:43 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Zeus Gómez Marmolejo wrote:

>>> resultpipe = "--without-gui --export-pdf=\"#{outfilename}\" 2>#{logfile}"

this psoduces huge pdf files .. no compression



-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | 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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: SVG support
  2007-12-08 20:51       ` Zeus Gómez Marmolejo
  2007-12-20 10:43         ` Hans Hagen
@ 2007-12-20 11:04         ` Hans Hagen
  1 sibling, 0 replies; 11+ messages in thread
From: Hans Hagen @ 2007-12-20 11:04 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Zeus Gómez Marmolejo wrote:

>>> resultpipe = "--without-gui --export-pdf=\"#{outfilename}\" 2>#{logfile}"

the windows version performs rather random with pdf output, probably 
some internal messing around with quoting, it renders it useless

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | 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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: SVG support
@ 2007-12-04 18:56 Zeus Gómez Marmolejo
  0 siblings, 0 replies; 11+ messages in thread
From: Zeus Gómez Marmolejo @ 2007-12-04 18:56 UTC (permalink / raw)
  To: ntg-context

[-- Attachment #1: Type: text/html, Size: 1469 bytes --]

[-- Attachment #2: Type: text/plain, Size: 487 bytes --]

___________________________________________________________________________________
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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: SVG support
  2005-04-12 17:00   ` SVG support (was: Tutorial) Henning Hraban Ramm
@ 2005-04-12 17:37     ` Hans Hagen
  0 siblings, 0 replies; 11+ messages in thread
From: Hans Hagen @ 2005-04-12 17:37 UTC (permalink / raw)


Henning Hraban Ramm wrote:
> Am 12.04.2005 um 00:07 schrieb Hans Hagen:
> 
>> Because i want to post a new context zip with svg support
> 
> 
> Big news in a half sentence!
> What does SVG support mean in ConTeXt / this context?
> Translation of SVG to MetaPost? Which SVG level/standard?

i've implemented a mechanism to process graphics 'kind of runtime' so that one 
can use for instance svg; think of proper caching of converted images, document 
dependent transformations, etc. For the svg conversion I use inkscape; of course 
it's all subjected to testing -)

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------

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

end of thread, other threads:[~2007-12-20 11:04 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-04 14:13 SVG support Zeus Gómez Marmolejo
2007-12-04 16:25 ` Hans Hagen
2007-12-06  0:45   ` Zeus Gómez Marmolejo
2007-12-06  9:47     ` Hans Hagen
2007-12-08 20:51       ` Zeus Gómez Marmolejo
2007-12-20 10:43         ` Hans Hagen
2007-12-20 11:04         ` Hans Hagen
2007-12-04 22:12 ` zs
2007-12-04 23:33 ` Mojca Miklavec
  -- strict thread matches above, loose matches on Subject: below --
2007-12-04 18:56 Zeus Gómez Marmolejo
2005-04-11 20:41 Re: Tutorial Loeghmon Tadayon Nejad
2005-04-11 22:07 ` Hans Hagen
2005-04-12 17:00   ` SVG support (was: Tutorial) Henning Hraban Ramm
2005-04-12 17:37     ` SVG support 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).