diff options
author | Context Git Mirror Bot <phg42.2a@gmail.com> | 2016-01-12 17:15:07 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2016-01-12 17:15:07 +0100 |
commit | 8d8d528d2ad52599f11250cfc567fea4f37f2a8b (patch) | |
tree | 94286bc131ef7d994f9432febaf03fe23d10eef8 /tex/context/base/mkiv/symb-run.mkiv | |
parent | f5aed2e51223c36c84c5f25a6cad238b2af59087 (diff) | |
download | context-8d8d528d2ad52599f11250cfc567fea4f37f2a8b.tar.gz |
2016-01-12 16:26:00
Diffstat (limited to 'tex/context/base/mkiv/symb-run.mkiv')
-rw-r--r-- | tex/context/base/mkiv/symb-run.mkiv | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/tex/context/base/mkiv/symb-run.mkiv b/tex/context/base/mkiv/symb-run.mkiv new file mode 100644 index 000000000..3d92c4416 --- /dev/null +++ b/tex/context/base/mkiv/symb-run.mkiv @@ -0,0 +1,53 @@ +%D \module +%D [ file=symb-run, +%D version=2010.12.08, % 1998.07.20, +%D title=\CONTEXT\ Symbol Libraries, +%D subtitle=Runtime Macros, +%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. + +\startluacode + function commands.showsymbolset(collection,symbols) + if type(symbols) == "string" then + symbols = utilities.parsers.settings_to_array(symbols) + end + context.start() + context.forcesymbolset { collection } + context.starttabulate { "|lT|l|l|" } + for i=1,#symbols do + local symbol = symbols[i] + context.NC() + context(symbol) + context.NC() + context.symbol(symbol) + context.NC() + context.color ( + { "red" }, + context.nested.ruledhbox( + context.nested.color ( + { "black" }, + context.nested.symbol(symbol) + ) + ) + ) + context.NR() + end + context.stoptabulate() + context.stop() + end +\stopluacode + +\unprotect + +\unexpanded\gdef\showsymbolset + {\dosingleargument\symb_show_set} + +\gdef\symb_show_set[#1]% + {\ctxcommand{showsymbolset("#1","\symbolset{#1}")}} + +\protect \endinput |