diff options
author | Taco Hoekwater <taco@elvenkind.com> | 2011-06-01 08:54:21 +0000 |
---|---|---|
committer | Taco Hoekwater <taco@elvenkind.com> | 2011-06-01 08:54:21 +0000 |
commit | d7ccb42582f85acf30568913610ccf4d602023fb (patch) | |
tree | 7292e3545a420676878e7451b68892d360c62cb6 /Master/texmf-dist/tex/context/base/s-reg-01.mkiv | |
parent | 2d62a6fe9b80def59c392268022f1f9a2d6e358f (diff) |
commit context 2011.05.18
git-svn-id: svn://tug.org/texlive/trunk@22719 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/s-reg-01.mkiv')
-rw-r--r-- | Master/texmf-dist/tex/context/base/s-reg-01.mkiv | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/context/base/s-reg-01.mkiv b/Master/texmf-dist/tex/context/base/s-reg-01.mkiv new file mode 100644 index 00000000000..d3e456881c8 --- /dev/null +++ b/Master/texmf-dist/tex/context/base/s-reg-01.mkiv @@ -0,0 +1,60 @@ +%D \module +%D [ file=s-reg-01, +%D version=2005.04.25, +%D title=\CONTEXT\ Style File, +%D subtitle=Extra Regime Support, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright=PRAGMA] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +%D \macros +%D {showregime} +%D +%D This code is moved from the kernel to here. (We could make it +%D auto-loadable). + +\startluacode +--[[ldx-- +<p>The following code is rather <l n='context'/> specific.</p> +--ldx]]-- + +function regimes.show(regime) + regime = regimes.synonyms[regime] or regime + local r = regimes.data[regime] + if r then + local chardata = characters.data + context.starttabulate { "|rT|T|rT|lT|lT|lT|" } + for k, v in ipairs(r) do + local chr = chardata[v] + if chr then + context.NC() context(k) + context.NC() context.getvalue(chr.contextname]) + context.NC() context("%U+05X",v) + context.NC() context(chr.contextname) + context.NC() context(chr.category) + context.NC() context(chr.description) + context.NC() context.NR() + else + -- can't happen + end + end + context.stoptabulate() + else + context("unknown regime %s",regime) + end +end +\stopluacode + +\unprotect + +\def\showregime + {\dosingleempty\doshowregime} + +\def\doshowregime[#1]% + {\ctxlua{regimes.show("#1")}} + +\protect \endinput |