mp-form.mpiv /size: 1017 b    last modification: 2020-07-01 14:35
1
%D \module
2
%D [ file=mp-form.mpiv,
3
%D version=2011.10.14,
4
%D title=\CONTEXT\ \METAPOST\ graphics,
5
%D subtitle=form 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 licen-en.pdf for
12
%C details.
13 14
% The graph package will be replaced by our own variant using
15
% MetaPost 2 features and textext.
16 17
if
known
context_form
:
endinput
;
fi
;
18 19
boolean
context_form
;
context_form
:
=
true
;
20 21
string
Fmfont_
;
Fmfont_
:
=
"
crap
"
;
22 23
% The following function accept a number or string that can be
24
% converted to a number by \LUA. The first argument is a format
25
% where @ can be used instead of %. The number is typeset in math
26
% mode and @3e is converted into @.3e.
27 28
vardef
mfun_format_number
(
expr
fmt
,
i
)
=
29
"
\ctxlua{metapost.formatnumber('
"
&
fmt
&
"
',
"
&
if
string
i
:
i
else
:
decimal
i
fi
&
"
)}
"
30
enddef
;
31