[NTG-context] Saving Metafun Graphic for use outside ConTeXt

Hans Hagen j.hagen at xs4all.nl
Thu Apr 5 14:39:03 CEST 2018


On 4/5/2018 1:10 PM, Keith McKay wrote:
> Dear Readers,
> 
> I have been playing about with METAFUN over the last few days trying to 
> get a feel for it. I was wondering if it is possible to save the 
> graphics produced in a context document for use outside. On looking at 
> the Metapost manual I see you can using the following commands save a 
> graphic as an svg file.

forget about producing svg this way ... (1) it would not work with 
fonts, and (2) mplib in luatex has svg and png output disabled.

% file: mpsvg.tex

\startMPpage

     draw textext("Does it work?") ;

     draw boundingbox currentpicture enlarged 2mm withcolor "darkred" ;

\stopMPpage

% process

context mpsvg

mutool convert -o mpsvg.svg mpsvg.pdf

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
-----------------------------------------------------------------


More information about the ntg-context mailing list