From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/37838 Path: news.gmane.org!not-for-mail From: =?ISO-8859-1?Q?Zeus_G=F3mez_Marmolejo?= Newsgroups: gmane.comp.tex.context Subject: Re: SVG support Date: Sat, 08 Dec 2007 21:51:04 +0100 Message-ID: <475B03B8.9090802@aluzina.org> References: <47556084.9090102@aluzina.org> <47557F73.7040301@wxs.nl> <47574617.6030907@aluzina.org> <4757C541.5000900@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1904601911==" X-Trace: ger.gmane.org 1197147381 13108 80.91.229.12 (8 Dec 2007 20:56:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 8 Dec 2007 20:56:21 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sat Dec 08 21:56:26 2007 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1J16io-0005s4-1Z for gctc-ntg-context-518@m.gmane.org; Sat, 08 Dec 2007 21:56:26 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id E29491FC90; Sat, 8 Dec 2007 21:56:04 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 08265-02-8; Sat, 8 Dec 2007 21:55:57 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id D60BE1FC45; Sat, 8 Dec 2007 21:55:55 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 3C81B1FC74 for ; Sat, 8 Dec 2007 21:55:40 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 09325-04 for ; Sat, 8 Dec 2007 21:55:30 +0100 (CET) Original-Received: from cafe.aluzina.org (20.pool85-58-65.dynamic.orange.es [85.58.65.20]) by ronja.ntg.nl (Postfix) with ESMTP id E12E81FC20 for ; Sat, 8 Dec 2007 21:51:02 +0100 (CET) Original-Received: from negraco.aluzina.org (negraco.aluzina.org [10.244.133.67]) by cafe.aluzina.org (Postfix) with ESMTP id 312A720222 for ; Sat, 8 Dec 2007 21:51:23 +0100 (CET) User-Agent: Thunderbird 2.0.0.6 (X11/20070728) In-Reply-To: <4757C541.5000900@wxs.nl> X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:37838 Archived-At: --===============1904601911== Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit I have version:
zeus@localhost ~ $ inkscape --version
Inkscape 0.45.1 (Jul 26 2007)
zeus@localhost ~ $

You should consider doing it that way if it works. The PDF final size for the conversion is the same but the quality is much better. Now all my final year project documentation is all vector


Zeus.


Hans Hagen escribió:
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
___________________________________________________________________________________
    


  

--===============1904601911== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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 ___________________________________________________________________________________ --===============1904601911==--