diff options
author | Hans Hagen <pragma@wxs.nl> | 2021-03-31 18:16:45 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2021-03-31 18:16:45 +0200 |
commit | a41fe00a674c46d923de837778e9ee44565dc341 (patch) | |
tree | 4391753932b5c1e2b1c26bcf568fe7f2f6332ebc /tex/context/modules | |
parent | 21898810cf14ff6fedfb47a00704173bf668e49b (diff) | |
download | context-a41fe00a674c46d923de837778e9ee44565dc341.tar.gz |
2021-03-31 18:03:00
Diffstat (limited to 'tex/context/modules')
-rw-r--r-- | tex/context/modules/mkiv/s-languages-goodies.lmt | 32 | ||||
-rw-r--r-- | tex/context/modules/mkiv/s-languages-goodies.mkxl | 40 |
2 files changed, 72 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 diff --git a/tex/context/modules/mkiv/s-languages-goodies.mkxl b/tex/context/modules/mkiv/s-languages-goodies.mkxl new file mode 100644 index 000000000..b98df2c26 --- /dev/null +++ b/tex/context/modules/mkiv/s-languages-goodies.mkxl @@ -0,0 +1,40 @@ +%D \module +%D [ file=s-languages-goodies, +%D version=2021.25.03, +%D title=\CONTEXT\ Style File, +%D subtitle=Language Goodies, +%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 mreadme.pdf for +%C details. + +\startmodule[languages-goodies] + +\registerctxluafile{s-languages-goodies}{autosuffix} + +\installmodulecommandluasingle \showlanguagegoodies {moduledata.languages.goodies.show} + +\stopmodule + +\continueifinputfile{s-languages-goodies.mkxl} + +\usemodule[art-01] + +% \setupbodyfont[libertine] + +\setuplanguage[de][goodies={lang-de.llg}] + +\mainlanguage[de] + +\setupalign[stretch,verytolerant,flushleft,nothyphenated] \dontcomplain + +% \startlanguageoptions[de] +% Zapf|innovation +% \stoplanguageoptions + +\starttext + \showlanguagegoodies[file={lang-de.llg}] +\stoptext |