summaryrefslogtreecommitdiff
path: root/tex/context/modules/mkiv/s-languages-goodies.lmt
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/modules/mkiv/s-languages-goodies.lmt')
-rw-r--r--tex/context/modules/mkiv/s-languages-goodies.lmt32
1 files changed, 32 insertions, 0 deletions
diff --git a/tex/context/modules/mkiv/s-languages-goodies.lmt b/tex/context/modules/mkiv/s-languages-goodies.lmt
new file mode 100644
index 000000000..cb17680d1
--- /dev/null
+++ b/tex/context/modules/mkiv/s-languages-goodies.lmt
@@ -0,0 +1,32 @@
+if not modules then modules = { } end modules ['s-languages-goodies'] = {
+ version = 1.001,
+ comment = "companion to s-languages-goodies.mkxl",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+moduledata.languages = moduledata.languages or { }
+moduledata.languages.goodies = moduledata.languages.goodies or { }
+
+function moduledata.languages.goodies.show(specification)
+ specification = interfaces.checkedspecification(specification)
+ local filename = specification.file
+ if filename and filename ~= "" then
+ local list = table.load(resolvers.findfile(filename))
+ if list then
+ list = list.options
+ if list then
+ for i=1,#list do
+ local l = list[i]
+ local w = l.words
+ if w then
+ context.startsubject { title = table.concat(table.sortedkeys(l.patterns)," ") }
+ context(languages.strippedgoodiewords(w))
+ context.stopsubject()
+ end
+ end
+ end
+ end
+ end
+end