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/tex/context/base/mkxl/type-ini.lmt | |
parent | b4fa72e61230aca75f7f6fbf988821f71edfb6b2 (diff) |
context
git-svn-id: svn://tug.org/texlive/trunk@58167 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkxl/type-ini.lmt')
-rw-r--r-- | Master/texmf-dist/tex/context/base/mkxl/type-ini.lmt | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkxl/type-ini.lmt b/Master/texmf-dist/tex/context/base/mkxl/type-ini.lmt new file mode 100644 index 00000000000..23d5096e2ff --- /dev/null +++ b/Master/texmf-dist/tex/context/base/mkxl/type-ini.lmt @@ -0,0 +1,45 @@ +if not modules then modules = { } end modules ['type-ini'] = { + version = 1.001, + comment = "companion to type-ini.mkiv", + author = "Hans Hagen, PRAGMA-ADE, Hasselt NL", + copyright = "PRAGMA ADE / ConTeXt Development Team", + license = "see context related readme files" +} + +local lpegmatch, P, Cs = lpeg.match, lpeg.P, lpeg.Cs + +local context = context +local implement = interfaces.implement +local uselibrary = resolvers.uselibrary +local p_strip = Cs((P("type-") * (P("imp-")^0))^0/"" * P(1)^0) +local report = logs.reporter("fonts","typescripts") + +local function action(name,foundname) + context.loadfoundtypescriptfile(name,foundname) +end + +local patterns = { + "type-imp-%s.mkxl", + "type-imp-%s.mkiv", + "type-imp-%s.tex" +} + +local function failure(name) + if name ~= "loc" then + report("unknown library %a",name) + end +end + +implement { + name = "loadtypescriptfile", + arguments = "string", + actions = function(name) -- a more specific name + uselibrary { + name = lpegmatch(p_strip,name) or name, + patterns = patterns, + action = action, + failure = failure, + onlyonce = false, -- will become true + } + end +} |