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).
Massi
___________________________________________________________________________________
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
___________________________________________________________________________________