Re: [NTG-context] SVG not rendering correctly with LMTX and conversion=mp
Il 18/10/21 18:30, Hans Hagen via ntg-context ha scritto: 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) Coming soon... (see attachment) The problem was the order in which transformations are applied when multiple transformations are specified in the transform attribute, like in "translate(...)scale(...)...". testsvg.tex and test.svg are the MWE and the SVG file provided by Jason Ross in the first post of this thread. Massi testsvg.pdf Description: Adobe PDF document \starttext \externalfigure[test.svg][conversion=mp] \stoptext ___ 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 ___
[NTG-context] upload
Hi, I uploaded a new lmtx. This one is a little experimental because I removed so redundant / intermediate code still present from teh transition from mkiv to lmtx (mostly backend related). I might have missed something (not all is in the test suite) but nothing that can't be fixed easy, most has to do with the timing of definitions. But I assume users save their stable trees anyway ... (rpi bins should be in sync too.) 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 ___
Re: [NTG-context] SVG not rendering correctly with LMTX and conversion=mp
Fixing your svg. View attachments. El lun, 18 oct 2021 a las 10:15, Jason Ross via ntg-context (< ntg-context@ntg.nl>) escribió: > 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 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 > > ___ > svg10.pdf Description: Adobe PDF document ___ 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 ___
Re: [NTG-context] SVG not rendering correctly with LMTX and conversion=mp
On 10/18/2021 5:15 PM, Jason Ross via ntg-context wrote: 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. we actually can avoid that by using label remapping (i fixed a scanning buglet in the first example:) \startTEXpage \startMPcode lmt_remaptext [ label = "here 1", where = "l", text = "\bfa let's try this one out" ] ; lmt_remaptext [ label = "here 2", where = "r", text = "let's try this one out too" ] ; lmt_remaptext [ label = "here 3", where = "l", text = "$e = mc^2$" ] ; lmt_remaptext [ label = "here 5", where = "m", text = "this a bit longer label" ] ; lmt_remaptext [ label = "here 4", where = "m", text = "!", dx = -1pt, dy = -30pt ] ; draw lmt_svg [ filename = "labels-003.svg", ] ; \stopMPcode \stopTEXpage one can also have the labels externally \startluacode table.save ( "labels-001.lua", { { label = "here 1", where = "l", text = "let's try this one out" }, { label = "here 2", where = "r", text = "let's try this one out too" }, { label = "here 3", where = "l", text = "$e = mc^2$" }, { label = "here 5", where = "m", text = "this a bit longer label" }, { label = "here 4", where = "m", text = "!" }, } ) \stopluacode \startMPpage draw lmt_svg [ filename = "labels-003.svg", labelfile = "labels-001.lua", ] ; \stopMPpage the idea is then that in an svg editor one uses symbolic names and when including those get property typeset (should work in in next upload; is independent of reported issue) 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 ___
Re: [NTG-context] SVG not rendering correctly with LMTX and conversion=mp
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). does the spec say anywhere what teh order is? this looks better but how about 10 scales and 15 rotations and 3 transforms in any order? 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 ___
Re: [NTG-context] SVG not rendering correctly with LMTX and conversion=mp
Here it's wrong. See attachment. Massimiliano Il 18/10/21 18:30, Hans Hagen via ntg-context ha scritto: 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 ___ ytest.pdf Description: Adobe PDF document ___ 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 ___
Re: [NTG-context] SVG not rendering correctly with LMTX and conversion=mp
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 ___
Re: [NTG-context] SVG not rendering correctly with LMTX and conversion=mp
In my tests, this conversion works internally with linux. On windows it fails and stops at l.63 \ registerctxluafile {data-bin} {} % before data-tex ? El lun, 18 oct 2021 a las 10:49, Jason Ross () escribió: > > > On 10/18/21 8:38 AM, Luis Montgomery wrote: > > Check that your Inkscape is working properly. > > > > That proble NOT appear on my machine... > > > > Best, > > > > L. Montgomery > > (Sorry Luis, I forgot to cc mailing list) > Per https://wiki.contextgarden.net/Command/externalfigure, > in LMTX the conversion is done natively when "conversion=mp" is set. > Inkscape is not used for the conversion. > ___ 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 ___
Re: [NTG-context] SVG not rendering correctly with LMTX and conversion=mp
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 ___
Re: [NTG-context] SVG not rendering correctly with LMTX and conversion=mp
On 10/18/21 8:38 AM, Luis Montgomery wrote: > Check that your Inkscape is working properly. > > That proble NOT appear on my machine... > > Best, > > L. Montgomery (Sorry Luis, I forgot to cc mailing list) Per https://wiki.contextgarden.net/Command/externalfigure, in LMTX the conversion is done natively when "conversion=mp" is set. Inkscape is not used for the conversion. ___ 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 ___
Re: [NTG-context] MkIV missing?
Am 04.10.21 um 15:33 schrieb Taco Hoekwater via ntg-context: We are busy with this off-list. If it is urgent: luatex --luaonly ~/lmtx/tex/texmf-osx-64/bin/mtxrun.lua --generate fixed it for me (you’ll need to adjust the path, of course) Best wishes, Taco But not for me. :( After I set up my PC again, Linux Mint 20.1 Cinnamon, I also reinstalled ConTeXt and since then I have been experiencing the error. Are there any further steps? Besst wishes Jörg On 4 Oct 2021, at 15:28, Marcus Vinicius Mesquita via ntg-context wrote: Same problem here, on a linux64, context current version: 2021.09.26 17:00 Greetings Marcus Vinicius On Mon, Oct 4, 2021 at 8:55 AM Henning Hraban Ramm via ntg-context wrote: Am 04.10.2021 um 13:06 schrieb Hans Hagen : On 10/4/2021 12:39 PM, Henning Hraban Ramm via ntg-context wrote: Hi, since a while, I can’t run MkIV any more, even after several runs of install.sh (and mtxrun --generate, of course). It’s the same on my Mac and my Linux laptop (of course the bin dir is different on the latter): $ context --version mtx-context | ConTeXt Process Management 1.04 mtx-context | mtx-context | main context file: /Users/hraban/lmtx/tex/texmf-context/tex/context/base/mkiv/context.mkiv mtx-context | current version: 2021.09.26 17:00 mtx-context | main context file: /Users/hraban/lmtx/tex/texmf-context/tex/context/base/mkxl/context.mkxl mtx-context | current version: 2021.09.26 17:00 $ context --version --luatex mtx-context | redirect luametatex -> luatex: luatex --luaonly "/Users/hraban/lmtx/tex/texmf-osx-64/bin/mtxrun.lua" --script mtx-context --version --luatex --redirected mtxrun | unknown script 'mtx-context.lua' or 'mtx-mtx-context.lua' $ which context /Users/hraban/lmtx/tex/texmf-osx-64/bin/context $ which luatex /Users/hraban/lmtx/tex/texmf-osx-64/bin/luatex $ luatex --version This is LuaTeX, Version 1.13.0 (TeX Live 2021) ... $ mtxrun --version mtxrun | ConTeXt TDS Runner Tool 1.32 mtxrun | source path I thought that was related to the server/provider move, but I guess it isn’t. It’s a bit annoying that install.sh leaves ~/lmtx/bin in the PATH, so that a call to mtxrun can’t find any configuration. works here ... maybe a --generate issue? I re-ran the install script with a shell ("sh install.sh" instead just ". install.sh"), but that doesn’t change the "unknown script" issue. "mtxrun --generate" seems to work without problems; or do you see something suspicious in the attached log? Hraban ___ 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 ___ -- Todas as coisas fatigam o corpo, salvo a música, que não fatiga nem o corpo nem seus membros, por ser descanso da alma, primavera do coração, distração do aflito, entretenimento do solitário, e viático do viajante. Kunnâsh al-Hâ'ik (Cancioneiro de al-Hâ'ik) ___ 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 ___ — Taco Hoekwater E: t...@bittext.nl genderfluid (all pronouns) ___ 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 ___ ___ 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 ___
Re: [NTG-context] SVG not rendering correctly with LMTX and conversion=mp
Check that your Inkscape is working properly. That proble NOT appear on my machine... Best, L. Montgomery El lun., 18 de octubre de 2021 10:15, Jason Ross via ntg-context < ntg-context@ntg.nl> escribió: > 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 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 > > ___ > ___ 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 ___
[NTG-context] SVG not rendering correctly with LMTX and conversion=mp
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 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 ___