meta-mac.mkiv /size: 2062 b    last modification: 2020-07-01 14:35
1
%D \module
2
%D [ file=meta-scn,
3
%D version=2019.07.19,
4
%D title=\METAPOST\ Graphics,
5
%D subtitle=LMTX support,
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
\ifcase
\contextlmtxmode
\endinput
\fi
15 16
\unprotect
17 18
\unexpanded
\def
\defineMPparameterset
[#
1
]
{
\clf_lmt_parameters_define
{
#
1
}}
19
\unexpanded
\def
\presetMPparameters
[#
1
]
{
\clf_lmt_parameters_preset
{
#
1
}}
20
\unexpanded
\def
\resetMPparameters
[#
1
]
{
\clf_lmt_parameters_reset
{
#
1
}}
21 22
% \unexpanded\def\useMPgraphic
23
% {\doifnextoptionalelse\meta_use_MP_graphic_yes\meta_use_MP_graphic_nop}
24 25
% \def\meta_use_MP_graphic_nop
26
% {\dodoublegroupempty\meta_use_graphic}
27 28
% \def\meta_use_MP_graphic_yes
29
% {\dodoubleempty\meta_use_graphic_new}
30 31
% \def\meta_use_graphic_new[#1][#2]%
32
% {\begingroup
33
% % If really needed weh can use grouplevel but normally these graphics are
34
% % not nested.
35
% \clf_lmt_parameters_preset{#1}[#2]%
36
% \meta_use_graphic{#1}{}%
37
% \clf_lmt_parameters_reset{#1}%
38
% \endgroup}
39 40
\unexpanded
\def
\useMPmacro
41
{
\dotripleempty
\meta_use_macro
}
42 43
\def
\meta_use_macro
[#
1
][#
2
][#
3
]
%
44
{
\ifthirdargument
45
\meta_begin_graphic_group
{
#
1
}
%
46
\meta_enable_include
47
\clf_lmt_parameters_preset
{
#
2
}
[#
3
]
%
48
\meta_process_graphic
{
lmt
_
#
2
;
}
%
49
\clf_lmt_parameters_reset
{
#
2
}
%
50
\meta_end_graphic_group
51
\else
\ifsecondargument
52
\doifelseassignment
{
#
2
}
53
{
\let
\currentMPinstance
\defaultMPinstance
54
\meta_enable_include
55
\clf_lmt_parameters_preset
{
#
1
}
[#
2
]
%
56
\meta_process_graphic
{
lmt
_
#
1
;
}
%
57
\clf_lmt_parameters_reset
{
#
1
}}
%
58
{
\meta_begin_graphic_group
{
#
1
}
%
59
\meta_enable_include
60
\meta_process_graphic
{
lmt
_
#
1
;
}
%
61
\meta_end_graphic_group
}
%
62
\else
63
\let
\currentMPinstance
\defaultMPinstance
64
\meta_enable_include
65
\meta_process_graphic
{
lmt
_
#
1
;
}
%
66
\fi\fi
}
67 68
\protect
69