diff options
author | Karl Berry <karl@freefriends.org> | 2021-03-06 21:58:15 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-03-06 21:58:15 +0000 |
commit | 974640d66e61e81cb197ad96fdff7b08343e4c5a (patch) | |
tree | 2e1f75f32f312b7f24ba82b4590ae230bcd6f399 /Master/texmf-dist/metapost/context/base/mpxl/mp-form.mpxl | |
parent | b4fa72e61230aca75f7f6fbf988821f71edfb6b2 (diff) |
context
git-svn-id: svn://tug.org/texlive/trunk@58167 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/metapost/context/base/mpxl/mp-form.mpxl')
-rw-r--r-- | Master/texmf-dist/metapost/context/base/mpxl/mp-form.mpxl | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/Master/texmf-dist/metapost/context/base/mpxl/mp-form.mpxl b/Master/texmf-dist/metapost/context/base/mpxl/mp-form.mpxl new file mode 100644 index 00000000000..9bc02616d22 --- /dev/null +++ b/Master/texmf-dist/metapost/context/base/mpxl/mp-form.mpxl @@ -0,0 +1,28 @@ +%D \module +%D [ file=mp-form.mpiv, +%D version=2011.10.14, +%D title=\CONTEXT\ \METAPOST\ graphics, +%D subtitle=form support, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See licen-en.pdf for +%C details. + +% The graph package will be replaced by our own variant using +% MetaPost 2 features and textext. + +if known metafun_loaded_form : endinput ; fi ; + +newinternal boolean metafun_loaded_form ; metafun_loaded_form := true ; immutable metafun_loaded_form ; + +% The following function accept a number or string that can be +% converted to a number by \LUA. The first argument is a format +% where @ can be used instead of %. The number is typeset in math +% mode and @3e is converted into @.3e. + +vardef mfun_format_number(expr fmt, i) = + "\ctxlua{metapost.formatnumber('" & fmt & "'," & if string i : i else : decimal i fi & ")}" +enddef ; |