summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/meta-ini.lua
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/context/base/meta-ini.lua')
-rw-r--r--Master/texmf-dist/tex/context/base/meta-ini.lua29
1 files changed, 29 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/context/base/meta-ini.lua b/Master/texmf-dist/tex/context/base/meta-ini.lua
new file mode 100644
index 00000000000..5150c38358f
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/meta-ini.lua
@@ -0,0 +1,29 @@
+if not modules then modules = { } end modules ['meta-ini'] = {
+ version = 1.001,
+ comment = "companion to meta-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local format = string.format
+
+metapost = metapost or { }
+
+-- for the moment downward compatible
+
+local report_metapost = logs.reporter ("metapost")
+local status_metapost = logs.messenger("metapost")
+
+local patterns = { "meta-imp-%s.mkiv", "meta-imp-%s.tex", "meta-%s.mkiv", "meta-%s.tex" } -- we are compatible
+
+function metapost.uselibrary(name)
+ commands.uselibrary(name,patterns,function(name,foundname)
+ context.startreadingfile()
+ status_metapost("loaded: library '%s'",name)
+ context.input(foundname)
+ context.stopreadingfile()
+ end, function(name)
+ report_metapost("unknown: library '%s'",name)
+ end)
+end