ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: SVG support
Date: Thu, 06 Dec 2007 10:47:45 +0100	[thread overview]
Message-ID: <4757C541.5000900@wxs.nl> (raw)
In-Reply-To: <47574617.6030907@aluzina.org>

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
___________________________________________________________________________________


  reply	other threads:[~2007-12-06  9:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-04 14:13 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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4757C541.5000900@wxs.nl \
    --to=pragma@wxs.nl \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).