ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* SVG 2 MetaPost/MetaFun
@ 2010-04-04 16:01 Matija Šuklje
  2010-04-04 17:23 ` Peter Wüsten
  0 siblings, 1 reply; 11+ messages in thread
From: Matija Šuklje @ 2010-04-04 16:01 UTC (permalink / raw)
  To: ntg-context

Is there a SVG to MetaPost/MetaFun converter available?

I want to get this quite simple logo to converted from SVG into a ConTeXt-
native vector graphic.


Cheers,
Matija
P.S. Too bad SVG is not ConTeXt-native (yet?)
-- 
gsm: +386 41 849 552
www: http://matija.suklje.name
xmpp: matija.suklje@gabbler.org
___________________________________________________________________________________
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] 11+ messages in thread

* Re: SVG 2 MetaPost/MetaFun
  2010-04-04 16:01 SVG 2 MetaPost/MetaFun Matija Šuklje
@ 2010-04-04 17:23 ` Peter Wüsten
  2010-04-04 17:29   ` Matija Šuklje
  0 siblings, 1 reply; 11+ messages in thread
From: Peter Wüsten @ 2010-04-04 17:23 UTC (permalink / raw)
  To: mailing list for ConTeXt users

I just tried using an SVG image directly in MkIV, and it worked like a 
breeze. Apparently ConTeXt converts the image to PDF on the fly as I 
found a PDF-file with a similar name (m_k_v_i_<your SVG filename>.pdf) 
in the same directory as the SVG-file.

If you would still love to convert your SVG-images you might want to use 
Inkscape:
inkscape --export-pdf=<PDF filename> <SVG filename>

Peter Wüsten

Matija Suklje schrieb:
> Is there a SVG to MetaPost/MetaFun converter available?
>
> I want to get this quite simple logo to converted from SVG into a ConTeXt-
> native vector graphic.
>
>
> Cheers,
> Matija
> P.S. Too bad SVG is not ConTeXt-native (yet?)
>   

___________________________________________________________________________________
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] 11+ messages in thread

* Re: SVG 2 MetaPost/MetaFun
  2010-04-04 17:23 ` Peter Wüsten
@ 2010-04-04 17:29   ` Matija Šuklje
  2010-04-04 20:36     ` Mojca Miklavec
  2010-04-05 20:30     ` Hans Hagen
  0 siblings, 2 replies; 11+ messages in thread
From: Matija Šuklje @ 2010-04-04 17:29 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: Text/Plain, Size: 936 bytes --]

Dne nedelja 4. aprila 2010 ob 19:23:18 je Peter Wüsten napisal(a):
> I just tried using an SVG image directly in MkIV, and it worked like a
> breeze. Apparently ConTeXt converts the image to PDF on the fly as I
> found a PDF-file with a similar name (m_k_v_i_<your SVG filename>.pdf)
> in the same directory as the SVG-file.
> 
> If you would still love to convert your SVG-images you might want to use
> Inkscape:
> inkscape --export-pdf=<PDF filename> <SVG filename>

Thanks for the tips :)

But actually I'm thinking more in the line of including that logo into my 
styling directly. So the only solutions would be a) if ConTeXt could use 
in-line SVG or b) I'll have to port the SVG logo into MetaPost.

Is there a non-overhelming howto somewhere ...It's a relatively simple 
logo (see attachment) :\


Cheers,
Matija
-- 
gsm: +386 41 849 552
www: http://matija.suklje.name
xmpp: matija.suklje@gabbler.org

[-- Attachment #2: plussy_plain.svg --]
[-- Type: image/svg+xml, Size: 8347 bytes --]

[-- Attachment #3: Type: text/plain, Size: 486 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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: SVG 2 MetaPost/MetaFun
  2010-04-04 17:29   ` Matija Šuklje
@ 2010-04-04 20:36     ` Mojca Miklavec
  2010-04-04 21:12       ` Matija Šuklje
  2010-04-05 20:30     ` Hans Hagen
  1 sibling, 1 reply; 11+ messages in thread
From: Mojca Miklavec @ 2010-04-04 20:36 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Sun, Apr 4, 2010 at 19:29, Matija Šuklje wrote:
> Dne nedelja 4. aprila 2010 ob 19:23:18 je Peter Wüsten napisal(a):
>> I just tried using an SVG image directly in MkIV, and it worked like a
>> breeze. Apparently ConTeXt converts the image to PDF on the fly as I
>> found a PDF-file with a similar name (m_k_v_i_<your SVG filename>.pdf)
>> in the same directory as the SVG-file.
>>
>> If you would still love to convert your SVG-images you might want to use
>> Inkscape:
>> inkscape --export-pdf=<PDF filename> <SVG filename>
>
> Thanks for the tips :)
>
> But actually I'm thinking more in the line of including that logo into my
> styling directly. So the only solutions would be a) if ConTeXt could use
> in-line SVG or b) I'll have to port the SVG logo into MetaPost.
>
> Is there a non-overhelming howto somewhere ...It's a relatively simple
> logo (see attachment) :\

I don't know of any "waterproof" way to convert from SVG to metapost
(all you can do is to convert it to PDF and use that PDF logo), but
here's an approximation of your logo in metapost (the legs are wider -
you'll need to fix the details by yourself):

\starttext
\startMPcode
unit := 5cm;
dx := 1.2;
color maincolor; maincolor = (0,0.9,0); % fixme
path p;

p := unitsquare scaled unit;
	fill p                      withcolor maincolor;
	fill p shifted ( dx*unit,0) withcolor maincolor;
	fill p shifted (-dx*unit,0) withcolor maincolor;
	fill p shifted (0, dx*unit) withcolor maincolor;
p := p xscaled ((3-dx)/4) shifted (0,-dx*unit);
	fill p withcolor maincolor;
	fill p xyscaled (-1,1) shifted (unit,0) withcolor maincolor;
\stopMPcode
\stoptext

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

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

* Re: SVG 2 MetaPost/MetaFun
  2010-04-04 20:36     ` Mojca Miklavec
@ 2010-04-04 21:12       ` Matija Šuklje
  2010-04-04 21:16         ` Wolfgang Schuster
  2010-04-04 21:23         ` Mojca Miklavec
  0 siblings, 2 replies; 11+ messages in thread
From: Matija Šuklje @ 2010-04-04 21:12 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Dne nedelja 4. aprila 2010 ob 22:36:07 je Mojca Miklavec napisal(a):
> I don't know of any "waterproof" way to convert from SVG to metapost
> (all you can do is to convert it to PDF and use that PDF logo), but
> here's an approximation of your logo in metapost (the legs are wider -
> you'll need to fix the details by yourself):

Wow, thanks! :D

I'll dig through the manuals to figure out what that codeblock actually does 
and try to fix it.

BTW, is there a special command I'm missing to turn on the colours in 
ConTeXt?


Cheers,
Matija
-- 
gsm: +386 41 849 552
www: http://matija.suklje.name
xmpp: matija.suklje@gabbler.org
___________________________________________________________________________________
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] 11+ messages in thread

* Re: SVG 2 MetaPost/MetaFun
  2010-04-04 21:12       ` Matija Šuklje
@ 2010-04-04 21:16         ` Wolfgang Schuster
  2010-04-04 21:19           ` Matija Šuklje
  2010-04-04 21:23         ` Mojca Miklavec
  1 sibling, 1 reply; 11+ messages in thread
From: Wolfgang Schuster @ 2010-04-04 21:16 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Am 04.04.10 23:12, schrieb Matija Šuklje:
> BTW, is there a special command I'm missing to turn on the colours in
> ConTeXt?
>    
\setupcolors[state=start]

Wolfgang

___________________________________________________________________________________
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] 11+ messages in thread

* Re: SVG 2 MetaPost/MetaFun
  2010-04-04 21:16         ` Wolfgang Schuster
@ 2010-04-04 21:19           ` Matija Šuklje
  0 siblings, 0 replies; 11+ messages in thread
From: Matija Šuklje @ 2010-04-04 21:19 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Dne nedelja 4. aprila 2010 ob 23:16:26 je Wolfgang Schuster napisal(a):
> Am 04.04.10 23:12, schrieb Matija Šuklje:
> > BTW, is there a special command I'm missing to turn on the colours in
> > ConTeXt?
> 
> \setupcolors[state=start]

/me is ashamed ...I found it the minute you sent the e-mail.


Cheers,
Matija
-- 
gsm: +386 41 849 552
www: http://matija.suklje.name
xmpp: matija.suklje@gabbler.org
___________________________________________________________________________________
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] 11+ messages in thread

* Re: SVG 2 MetaPost/MetaFun
  2010-04-04 21:12       ` Matija Šuklje
  2010-04-04 21:16         ` Wolfgang Schuster
@ 2010-04-04 21:23         ` Mojca Miklavec
  2010-04-04 21:40           ` Matija Šuklje
  1 sibling, 1 reply; 11+ messages in thread
From: Mojca Miklavec @ 2010-04-04 21:23 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Sun, Apr 4, 2010 at 23:12, Matija Šuklje wrote:
>
> I'll dig through the manuals to figure out what that codeblock actually does
> and try to fix it.

Start with
    http://www.tug.org/docs/metapost/mpman.pdf
and maybe the metafun manual.

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

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

* Re: SVG 2 MetaPost/MetaFun
  2010-04-04 21:23         ` Mojca Miklavec
@ 2010-04-04 21:40           ` Matija Šuklje
  2010-04-05  6:24             ` Taco Hoekwater
  0 siblings, 1 reply; 11+ messages in thread
From: Matija Šuklje @ 2010-04-04 21:40 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Dne nedelja 4. aprila 2010 ob 23:23:10 je Mojca Miklavec napisal(a):
> Start with
>     http://www.tug.org/docs/metapost/mpman.pdf
> and maybe the metafun manual.

Thanks yet again :]


Cheers,
Matija
-- 
gsm: +386 41 849 552
www: http://matija.suklje.name
xmpp: matija.suklje@gabbler.org
___________________________________________________________________________________
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] 11+ messages in thread

* Re: SVG 2 MetaPost/MetaFun
  2010-04-04 21:40           ` Matija Šuklje
@ 2010-04-05  6:24             ` Taco Hoekwater
  0 siblings, 0 replies; 11+ messages in thread
From: Taco Hoekwater @ 2010-04-05  6:24 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Matija Šuklje wrote:
> Dne nedelja 4. aprila 2010 ob 23:23:10 je Mojca Miklavec napisal(a):
>> Start with
>>     http://www.tug.org/docs/metapost/mpman.pdf
>> and maybe the metafun manual.
> 
> Thanks yet again :]

The metafun manual is easier to read than the 'real' mpman.pdf
which assume some of knowledge metafont.

But there is also a beginner's tutorial on  metapost:

http://www.tug.org/texlive//devsrc/Master/texmf-dist/doc/metapost/base/mpintro.pdf

Best wishes,
Taco
___________________________________________________________________________________
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] 11+ messages in thread

* Re: SVG 2 MetaPost/MetaFun
  2010-04-04 17:29   ` Matija Šuklje
  2010-04-04 20:36     ` Mojca Miklavec
@ 2010-04-05 20:30     ` Hans Hagen
  1 sibling, 0 replies; 11+ messages in thread
From: Hans Hagen @ 2010-04-05 20:30 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 4-4-2010 7:29, Matija Šuklje wrote:
> Dne nedelja 4. aprila 2010 ob 19:23:18 je Peter Wüsten napisal(a):
>> I just tried using an SVG image directly in MkIV, and it worked like a
>> breeze. Apparently ConTeXt converts the image to PDF on the fly as I
>> found a PDF-file with a similar name (m_k_v_i_<your SVG filename>.pdf)
>> in the same directory as the SVG-file.
>>
>> If you would still love to convert your SVG-images you might want to use
>> Inkscape:
>> inkscape --export-pdf=<PDF filename>  <SVG filename>
>
> Thanks for the tips :)
>
> But actually I'm thinking more in the line of including that logo into my
> styling directly. So the only solutions would be a) if ConTeXt could use
> in-line SVG or b) I'll have to port the SVG logo into MetaPost.
>
> Is there a non-overhelming howto somewhere ...It's a relatively simple
> logo (see attachment) :\

svg -> pdf (using inkscape) -> mp (using pstoedit)


-----------------------------------------------------------------
                                           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] 11+ messages in thread

end of thread, other threads:[~2010-04-05 20:30 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-04 16:01 SVG 2 MetaPost/MetaFun Matija Šuklje
2010-04-04 17:23 ` Peter Wüsten
2010-04-04 17:29   ` Matija Šuklje
2010-04-04 20:36     ` Mojca Miklavec
2010-04-04 21:12       ` Matija Šuklje
2010-04-04 21:16         ` Wolfgang Schuster
2010-04-04 21:19           ` Matija Šuklje
2010-04-04 21:23         ` Mojca Miklavec
2010-04-04 21:40           ` Matija Šuklje
2010-04-05  6:24             ` Taco Hoekwater
2010-04-05 20:30     ` 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).