m-svg.mkxl /size: 1010 b    last modification: 2024-01-16 10:22
1%D \module
2%D   [       file=m-svg,
3%D        version=2022.02.18,
4%D          title=\CONTEXT\ Extra Modules,
5%D       subtitle=SVG Helper Macros,
6%D         author=Hans Hagen,
7%D           date=\currentdate,
8%D      copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
9%C
10%C This module is part of the \CONTEXT\ macro||package and is
11%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
12%C details.
13
14\protected\def\showSVGcode#1#2%
15  {\ctxlua{metapost.showsvgpage{
16        filename = "#1",
17        index    = tonumber(#2),
18        method   = "code"
19    }}}
20
21\protected\def\showSVGcodeG#1#2%
22  {\ctxlua{metapost.showsvgpage{
23        filename = "#1",
24        index    = tonumber(#2),
25        method   = "code",
26        x        = 0,
27        y        = 1000,
28        width    = 1000,
29        height   = 1000,
30        noclip   = true
31    }}}
32
33\protected\def\typeSVGcode#1#2%
34  {\ctxlua{metapost.typesvgpage{
35        filename = "#1",
36        index    = tonumber(#2)
37    }}}
38
39% \continueifinputfile{m-svg.mkxl}
40