summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/mkxl/symb-ini.lmt
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkxl/symb-ini.lmt')
-rw-r--r--Master/texmf-dist/tex/context/base/mkxl/symb-ini.lmt59
1 files changed, 59 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkxl/symb-ini.lmt b/Master/texmf-dist/tex/context/base/mkxl/symb-ini.lmt
new file mode 100644
index 00000000000..9837afcf325
--- /dev/null
+++ b/Master/texmf-dist/tex/context/base/mkxl/symb-ini.lmt
@@ -0,0 +1,59 @@
+if not modules then modules = { } end modules ['symb-ini'] = {
+ version = 1.001,
+ comment = "companion to symb-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local context = context
+local variables = interfaces.variables
+
+fonts = fonts or { } -- brrrr
+
+local symbols = fonts.symbols or { }
+fonts.symbols = symbols
+
+local listitem = utilities.parsers.listitem
+local uselibrary = resolvers.uselibrary
+
+local report_symbols = logs.reporter ("fonts","symbols")
+local status_symbols = logs.messenger("fonts","symbols")
+
+local patterns = {
+ "symb-imp-%s.mkxl",
+ "symb-imp-%s.mkiv",
+ "symb-imp-%s.tex",
+ -- obsolete:
+ "symb-%s.mkiv",
+ "symb-%s.tex"
+}
+
+local function action(name,foundname)
+ commands.loadlibrary(name,foundname,false)
+ status_symbols("library %a loaded",name)
+end
+
+local function failure(name)
+ report_symbols("library %a is unknown",name)
+end
+
+function symbols.uselibrary(name)
+ if name ~= variables.reset then
+ for name in listitem(name) do
+ uselibrary {
+ name = name,
+ patterns = patterns,
+ action = action,
+ failure = failure,
+ onlyonce = true,
+ }
+ end
+ end
+end
+
+interfaces.implement {
+ name = "usesymbols",
+ actions = symbols.uselibrary,
+ arguments = "string",
+}