summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/modules/mkiv/s-system-tokens.mkxl
blob: b83a4f47b6cf73d79af8e8bf3baaaa51b9e7a62b (plain)
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
%D \module
%D   [      file=s-system-tokens.mkxl,
%D        version=2020.06.02,
%D          title=\CONTEXT\ Style File,
%D       subtitle=System Tokens Checking,
%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.

\startmodule[system-tokens]

\registerctxluafile{s-system-tokens}{}

\permanent\protected\def\showsystemtokens{\ctxlua{moduledata.system.tokens.showlist()}} % can be public implementor

\stopmodule

\continueifinputfile{s-system-tokens.mkxl}

\usemodule[article-basic]

\setuppapersize[A4,landscape]

\setuplayout[tight]

\setupbodyfont[8pt]

\starttext

    \showsystemtokens

    Some tokens cannot be created yet because they are more complex but eventually the creator will
    deal with them. The indices are sometimes the same as internal but in most cases nicely start
    at zero. When they start at another value, then there is an internal token or state that is not
    user accessible. You always need to use symbolic constants as the numbers can change.

    The first column is a classifier (which is experimental and categories might change when we feel
    the need).

    \startcolumns[n=5]
    \starttabulate[|T||]
    \NC 0 \NC unused    \NC \NR
    \NC 1 \NC regular   \NC \NR
    \NC 2 \NC character \NC \NR
    \NC 3 \NC register  \NC \NR
    \NC 4 \NC internal  \NC \NR
    \NC 5 \NC reference \NC \NR
    \NC 6 \NC data      \NC \NR
    \NC 7 \NC token     \NC \NR
    \NC 8 \NC node      \NC \NR
    \stoptabulate
    \stopcolumns

    \page

    Here is a typeset table of \type {\startframed} using \type {\luatokentable\startframed}:

    \luatokentable\startframed

    which calls \type {\pack_framed_start_framed} where \type {\luatokentable\pack_framed_start_framed} gives:


    \unprotect
    \luatokentable\pack_framed_start_framed
    \protect

    So you can guess what generates this:

    \unprotect
    \luatokentable\pack_framed_start_framed_nop
    \protect

    And this:

    \unprotect
    \luatokentable\pack_framed_start_framed_yes
    \protect

\stoptext