On 3/9/2021 7:29 AM, Thangalin wrote:
Here's a fairly minimal example showing an issue, using ConTeXt LMTX.
Save the following as "main.tex":
% SOF
\startbuffer[document]
<body><img src="circle.svg"/></body>
\stopbuffer
\startbuffer[csvg]
<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
<g><circle cx="50" cy="50" r="20"/></g>
</svg>
\stopbuffer
\startxmlsetups xml:xhtml
\xmlsetsetup{\xmldocument}{body|img}{xml:*}
\stopxmlsetups
\startxmlsetups xml:body
\xmlflush{#1}
\stopxmlsetups
\startxmlsetups xml:img
\placefigure{}{\externalfigure[\xmlatt{#1}{src}][conversion=mp]}
\placefigure{}{\externalfigure[circle.svg][conversion=mp]}
\placefigure{}{\includesvgbuffer[csvg][conversion=mp]}
\stopxmlsetups
\startxmlsetups xml:img
\starttexcode
\placefigure{}{\externalfigure[\xmlatt{#1}{src}][conversion=mp]}
\placefigure{}{\externalfigure [circle.svg][conversion=mp]}
\placefigure{}{\includesvgbuffer[csvg] [conversion=mp]}
\stoptexcode
\stopxmlsetups
I probably need to add that wrapper in a few spots but in general if you
can use that in case of issues. It has to do with catcodes, chicken and
eggs.
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
___________________________________________________________________________________