ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* svg -> png conversion
@ 2010-02-08 13:40 Peter Münster
  2010-02-08 22:19 ` Hans Hagen
  2010-02-09 13:49 ` Hans Hagen
  0 siblings, 2 replies; 3+ messages in thread
From: Peter Münster @ 2010-02-08 13:40 UTC (permalink / raw)
  To: ConTeXt list

Hello,

How can I convert svg to png on the fly?

I've created a file "test.rlx":

<?xml version='1.0 standalone='yes'?>
<rl:manipulators>
    <rl:manipulator name='png' suffix='svg'>
        <rl:old><rl:value name='path'/>/<rl:value name='file'
        method='nosuffix'/>.png</rl:old>
        <rl:new><rl:value name='path'/>/<rl:value name='prefix'/><rl:value
        name='file' method='nosuffix'/>.png</rl:new>
        <rl:step>
            inkscape -d 600 -e
            <rl:value name='new'/>
            <rl:value name='old'/>
        </rl:step>
    </rl:manipulator>
</rl:manipulators>

and a file "test.tex":

\setupexternalfigures[conversion=png]
\starttext
\externalfigure[./myfile.svg]
\stoptext

But when running context on the file, it tries to convert the svg to pdf.

What do I need to do?

TIA for any hint!
Cheers, Peter

-- 
Contact information: http://pmrb.free.fr/contact/


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


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

* Re: svg -> png conversion
  2010-02-08 13:40 svg -> png conversion Peter Münster
@ 2010-02-08 22:19 ` Hans Hagen
  2010-02-09 13:49 ` Hans Hagen
  1 sibling, 0 replies; 3+ messages in thread
From: Hans Hagen @ 2010-02-08 22:19 UTC (permalink / raw)
  To: ConTeXt list

On 8-2-2010 14:40, Peter Münster wrote:
> Hello,

> \setupexternalfigures[conversion=png]
> \starttext
> \externalfigure[./myfile.svg]
> \stoptext

i need to think a bit about it

we do have a automatic svg -> pdf converter so what we need is some way 
to force a specific kind of conversion (i need to add a bit os code on 
top of existing code then)

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


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

* Re: svg -> png conversion
  2010-02-08 13:40 svg -> png conversion Peter Münster
  2010-02-08 22:19 ` Hans Hagen
@ 2010-02-09 13:49 ` Hans Hagen
  1 sibling, 0 replies; 3+ messages in thread
From: Hans Hagen @ 2010-02-09 13:49 UTC (permalink / raw)
  To: ConTeXt list

On 8-2-2010 14:40, Peter Münster wrote:
> Hello,
>
> How can I convert svg to png on the fly?
>
> I've created a file "test.rlx":
>
> <?xml version='1.0 standalone='yes'?>
> <rl:manipulators>
>      <rl:manipulator name='png' suffix='svg'>
>          <rl:old><rl:value name='path'/>/<rl:value name='file'
>          method='nosuffix'/>.png</rl:old>
>          <rl:new><rl:value name='path'/>/<rl:value name='prefix'/><rl:value
>          name='file' method='nosuffix'/>.png</rl:new>
>          <rl:step>
>              inkscape -d 600 -e
>              <rl:value name='new'/>
>              <rl:value name='old'/>
>          </rl:step>
>      </rl:manipulator>
> </rl:manipulators>
>
> and a file "test.tex":
>
> \setupexternalfigures[conversion=png]
> \starttext
> \externalfigure[./myfile.svg]
> \stoptext
>
> But when running context on the file, it tries to convert the svg to pdf.
>
> What do I need to do?

new experimental ... you can specify a conversion but only those defined 
will take place

\starttext

% \enabletrackers[figures.conversion,figures.locating]

\hbox {
     \externalfigure[demo.svg][conversion=png,width=4cm]
     \externalfigure[demo.svg][width=4cm]
}

\stoptext

of course we can collect conversions as only a few are implemented

i'll upload a new beta

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


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

end of thread, other threads:[~2010-02-09 13:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-08 13:40 svg -> png conversion Peter Münster
2010-02-08 22:19 ` Hans Hagen
2010-02-09 13:49 ` 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).