[NTG-context] Set up external figure for particular image type
Thangalin
thangalin at gmail.com
Mon Jul 18 19:10:22 CEST 2022
Thank you, Wolfgang.
That looks promising.
SVG files are converted using MetaPost. I thought the following would work:
svg=>{\externalfigure[#1][svg][conversion=mp]}
Is there anything else that needs to happen to ensure SVG files are piped
through MetaPost?
Thanks again!
> \setupexternalfigures [location={local,global,default}]
>
> \defineexternalfigure [jpg] [width=4cm]
> \defineexternalfigure [png] [width=8cm]
>
> \starttexdefinition includegraphics #1
>
> \splitfilename{#1}
>
> \processaction
> [\splitofftype]
> [ jpg=>{\externalfigure[#1][jpg]},
> png=>{\externalfigure[#1][png]},
> default=>{\externalfigure[#1]},
> unknown=>{\externalfigure[#1]}]
>
> \stoptexdefinition
>
> \starttext
>
> \includegraphics{hacker.jpg}
>
> \includegraphics{mill.png}
>
> \includegraphics{cow.pdf}
>
> \stoptext
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20220718/cb522e60/attachment.htm>
More information about the ntg-context
mailing list