1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
%D \module
%D [ file=s-fnt-30,
%D version=2006.05.10, % abou tthen, quite old already
%D title=\CONTEXT\ Style File,
%D subtitle=Showing Character Data,
%D author=Hans Hagen,
%D date=\currentdate,
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%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 document.show_character_data(n)
local n = characters.number(n)
local d = characters.data[n]
if d then
local function entry(label,name)
texsprint(tex.ctxcatcodes,format("\\NC %s\\NC %s\\NC\\NR",label,characters.valid(d[name])))
end
texsprint(tex.ctxcatcodes,"\\starttabulate[|Tl|Tl|]")
entry("unicode index" , "unicodeslot")
entry("context name" , "contextname")
entry("adobe name" , "adobename")
entry("category" , "category")
entry("description" , "description")
entry("uppercase code", "uccode")
entry("lowercase code", "lccode")
entry("specials" , "specials")
texsprint(tex.ctxcatcodes,"\\stoptabulate ")
end
end
\stopluacode
\def\ShowCharacterData#1%
{\ctxlua{document.show_character_data(#1)}}
% \ShowCharacterData{123}
% \ShowCharacterData{0x7B}
% \dostepwiserecurse{`A}{`Z}{1}{\ShowCharacterData{#1}}
|