summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/s-languages-system.lua
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-04-18 22:52:45 +0000
committerKarl Berry <karl@freefriends.org>2015-04-18 22:52:45 +0000
commit16aa5a7c87f18a2483d0d61795899f886781b51c (patch)
tree1d72f00b2a4185425393598402fe055c61d1de58 /Master/texmf-dist/tex/context/base/s-languages-system.lua
parente68dc4d5506d46bf72823234f902bc76d1f70352 (diff)
context, from www.pragma-ade.com/context/beta/cont-tmf.zip (18apr15)
git-svn-id: svn://tug.org/texlive/trunk@36923 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/s-languages-system.lua')
-rw-r--r--Master/texmf-dist/tex/context/base/s-languages-system.lua63
1 files changed, 45 insertions, 18 deletions
diff --git a/Master/texmf-dist/tex/context/base/s-languages-system.lua b/Master/texmf-dist/tex/context/base/s-languages-system.lua
index 5afc4d4036f..3b422db9f2e 100644
--- a/Master/texmf-dist/tex/context/base/s-languages-system.lua
+++ b/Master/texmf-dist/tex/context/base/s-languages-system.lua
@@ -10,26 +10,53 @@ moduledata.languages = moduledata.languages or { }
moduledata.languages.system = moduledata.languages.system or { }
local NC, NR, HL = context.NC, context.NR, context.HL
+local sortedhash = table.sortedhash
+local registered = languages.registered
+local context = context
+local ctx_NC = context.NC
+local ctx_NR = context.NR
+local ctx_bold = context.bold
+
+function moduledata.languages.system.loadinstalled()
+ context.start()
+ for k, v in table.sortedhash(registered) do
+ context.language{ k }
+ end
+ context.stop()
+end
function moduledata.languages.system.showinstalled()
- local numbers = languages.numbers
- local registered = languages.registered
- context.starttabulate { "|r|l|l|l|l|" }
- NC() context("id")
- NC() context("tag")
- NC() context("synonyms")
- NC() context("parent")
- NC() context("loaded")
- NC() NR() HL()
- for i=1,#numbers do
- local tag = numbers[i]
- local data = registered[tag]
- NC() context(data.number)
- NC() context(tag)
- NC() context("% t",table.sortedkeys(data.synonyms))
- NC() context(data.parent)
- NC() context("%+t",table.sortedkeys(data.used))
- NC() NR()
+ --
+ context.starttabulate { "|l|r|l|l|p(7em)|r|p|" }
+ context.FL()
+ ctx_NC() ctx_bold("tag")
+ ctx_NC() ctx_bold("n")
+ ctx_NC() ctx_bold("parent")
+ ctx_NC() ctx_bold("file")
+ ctx_NC() ctx_bold("synonyms")
+ ctx_NC() ctx_bold("patterns")
+ ctx_NC() ctx_bold("characters")
+ ctx_NC() ctx_NR()
+ context.FL()
+ for k, v in sortedhash(registered) do
+ local parent = v.parent
+ local resources = v.resources
+ local patterns = resources and resources.patterns
+ ctx_NC() context(k)
+ ctx_NC() context(v.number)
+ ctx_NC() context(v.parent)
+ ctx_NC() context(v.patterns)
+ ctx_NC() for k, v in sortedhash(v.synonyms) do context("%s\\par",k) end
+ if patterns then
+ ctx_NC() context(patterns.n)
+ ctx_NC() context("% t",utf.split(patterns.characters))
+ else
+ ctx_NC()
+ ctx_NC()
+ end
+ ctx_NC() ctx_NR()
end
+ context.LL()
context.stoptabulate()
+ --
end