1
2
3
4
5
6
7
8
9
10
11
12
13
14\startmodule [ system tokens ]
15
16\registerctxluafile { s system tokens } { }
17
18\permanent \protected \def \showsystemtokens { \ctxlua{ moduledata . system . tokens . showlist ( ) } }
19
20\stopmodule
21
22\continueifinputfile { s system tokens . mkxl }
23
24\usemodule [ article basic ]
25
26\setuppapersize [ A 4 , landscape ]
27
28\setuplayout [ tight ]
29
30\setupbodyfont [ 8 pt ]
31
32\starttext
33
34 \showsystemtokens
35
36 Some tokens cannot be created yet because they are more complex but eventually the creator will
37 deal with them . The indices are sometimes the same as internal but in most cases nicely start
38 at zero . When they start at another value , then there is an internal token or state that is not
39 user accessible . You always need to use symbolic constants as the numbers can change .
40
41 The first column is a classifier ( which is experimental and categories might change when we feel
42 the need ) .
43
44 \startcolumns [ n = 5 ]
45 \starttabulate [ T ]
46 \NC 0 \NC unused \NC \NR
47 \NC 1 \NC regular \NC \NR
48 \NC 2 \NC character \NC \NR
49 \NC 3 \NC register \NC \NR
50 \NC 4 \NC internal \NC \NR
51 \NC 5 \NC reference \NC \NR
52 \NC 6 \NC data \NC \NR
53 \NC 7 \NC token \NC \NR
54 \NC 8 \NC node \NC \NR
55 \stoptabulate
56 \stopcolumns
57
58 \page
59
60 Here is a typeset table of \type { \startframed } using \type { \luatokentable \startframed } :
61
62 \luatokentable \startframed
63
64 which calls \type { \pack_framed_start_framed } where \type { \luatokentable \pack_framed_start_framed } gives :
65
66
67 \unprotect
68 \luatokentable \pack_framed_start_framed
69 \protect
70
71 So you can guess what generates this :
72
73 \unprotect
74 \luatokentable \pack_framed_start_framed_nop
75 \protect
76
77 And this :
78
79 \unprotect
80 \luatokentable \pack_framed_start_framed_yes
81 \protect
82
83\stoptext
84
85 |