ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Jean-Pierre Delange <adeimantos@free.fr>
To: ntg-context@ntg.nl
Subject: [NTG-context] Re: how to include an an svg file?
Date: Tue, 12 Mar 2024 15:44:51 +0100	[thread overview]
Message-ID: <fd7d753c-542b-4202-aabe-bcf3ba9de4e9@free.fr> (raw)
In-Reply-To: <49b401ba-4d67-4371-866f-751072507924@fiee.net>


[-- Attachment #1.1: Type: text/plain, Size: 1751 bytes --]

Yes, the code given by Seyal gives only the circle vith eyes and mouth 
without colors (on my computer). But, It seems that one have to deal 
with a more complex lines of code. If I'm not mistaken, MetaPost alone 
natively supports only the 3 colours red, green and blue. To support 
CMYK colour gradients, MetaPost needs to work with Metafun (see here : 
https://wiki.contextgarden.net/Color_in_MetaPost).

Perhaps an image in *.png format is required. But I can't give any 
advice, as I'm not an experienced MetaPost/Metafun user.

see this code below and the result as attached file :

\starttext

\input tufte


\externalfigure[smile.svg][conversion=mp]

\stoptext


Best//JP


Le 12/03/2024 à 15:01, Henning Hraban Ramm a écrit :
> Am 12.03.24 um 14:53 schrieb seyal zavira:
>>      > when i want to put some SVGs in my document the svg does not
>>     render properly here is the code:
>>      >
>>      > \starttext
>>      > \startMPcode
>>      > draw lmt_svg [
>>      > filename = "smile.svg"]
>>      > \stopMPcode
>>      > \stoptext
>
> I can confirm the problem also with the regular image call
>
> \externalfigure[smile.svg][conversion=mp]
>
> Hraban
> ___________________________________________________________________________________ 
>
> If your question is of interest to others as well, please add an entry 
> to the Wiki!
>
> maillist : ntg-context@ntg.nl / 
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net 
> (mirror)
> archive  : https://github.com/contextgarden/context
> wiki     : https://wiki.contextgarden.net
> ___________________________________________________________________________________ 
>

[-- Attachment #1.2: Type: text/html, Size: 4237 bytes --]

[-- Attachment #2: ctx-test-metapost-svg.pdf --]
[-- Type: application/pdf, Size: 11105 bytes --]

[-- Attachment #3: Type: text/plain, Size: 511 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2024-03-12 14:46 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-12 13:36 [NTG-context] " seyal.zavira
2024-03-12 13:43 ` [NTG-context] " Jean-Pierre Delange
2024-03-12 13:53   ` seyal zavira
2024-03-12 14:01     ` Henning Hraban Ramm
2024-03-12 14:44       ` Jean-Pierre Delange [this message]
2024-03-12 18:21     ` Hans Hagen
2024-03-12 22:59       ` seyal zavira
2024-03-13  8:16         ` Henning Hraban Ramm
2024-03-13 12:14           ` Jean-Pierre Delange
2024-03-13 12:37             ` Henning Hraban Ramm
2024-03-13 12:44               ` Jean-Pierre Delange
2024-03-15 19:39           ` Hans Hagen via ntg-context
2024-03-16  2:46             ` seyal zavira
2024-03-16 12:21             ` Jean-Pierre Delange

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=fd7d753c-542b-4202-aabe-bcf3ba9de4e9@free.fr \
    --to=adeimantos@free.fr \
    --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).