From: Hans Hagen via ntg-context <ntg-context@ntg.nl>
To: mf via ntg-context <ntg-context@ntg.nl>
Cc: Hans Hagen <j.hagen@xs4all.nl>
Subject: Re: SVG not rendering correctly with LMTX and conversion=mp
Date: Mon, 18 Oct 2021 18:30:31 +0200 [thread overview]
Message-ID: <01620710-a4cb-c8f7-f033-edfb48b9a8a4@xs4all.nl> (raw)
In-Reply-To: <a72bf826-7e42-ddd1-36b9-840d98b52872@fastwebnet.it>
On 10/18/2021 6:06 PM, mf via ntg-context wrote:
> Il 18/10/21 17:15, Jason Ross via ntg-context ha scritto:
>> The following MWE fails to render the text in the attached SVG properly:
>>
>>
>> \starttext
>> \externalfigure[test.svg][conversion=mp]
>> \stoptext
>>
>>
>> The axis labels, tick labels, and title are all incorrect. This file was
>> generated with Matplotlib.
>>
>
> If you open test.svg with Inkscape, ungroup and then save, you get a SVG
> that is typeset right with LMTX.
>
> Looking at the differences between the two SVGs, I can see that Inkscape
> changes all the transform="translate(...)scale(...)" attributes into
> transform="matrix(...)".
>
> Now focus on the "y = sin(x)" text.
> In the attachment I modified the transform attributes of that text, from
> "translate(...)scale(...)" to "matrix(...)", taking the values from the
> version obtained from Inkscape.
>
> Use that SVG with your MWE and you'll see "y = sin(x)" appearing in the
> right place in the PDF.
>
> I would say the "translate(...)scale(...)" specification is not
> supported in LMTX (yet).
it is supported; i'll send you a snippet to test (as it was not really a
minimal example)
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2021-10-18 16:30 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-18 15:15 Jason Ross via ntg-context
2021-10-18 15:38 ` Luis Montgomery via ntg-context
2021-10-18 15:49 ` Jason Ross via ntg-context
2021-10-18 16:16 ` Luis Montgomery via ntg-context
2021-10-18 16:06 ` mf via ntg-context
2021-10-18 16:30 ` Hans Hagen via ntg-context [this message]
2021-10-18 16:33 ` mf via ntg-context
2021-10-18 21:20 ` mf via ntg-context
2021-10-18 16:40 ` Hans Hagen via ntg-context
2021-10-18 20:38 ` Hans Hagen via ntg-context
2021-10-18 20:58 ` Luis Montgomery via ntg-context
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=01620710-a4cb-c8f7-f033-edfb48b9a8a4@xs4all.nl \
--to=ntg-context@ntg.nl \
--cc=j.hagen@xs4all.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).