summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/mult-prm.mkiv
blob: e385341c2c60b7169f92caf8beb0b52fd8b845d8 (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
%D \module
%D   [       file=mult-prm,
%D        version=2011.09.18, % actually older
%D          title=\CONTEXT\ Multilingual Macros,
%D       subtitle=Primitives,
%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 therefore
%C copyrighted by \PRAGMA. See mreadme.pdf for details.

%D This file is only a helper for generating files that can be used in an
%D editor for syntax highlighting.

\startluacode

    context.starttext()

    function table.sorted(t)
        table.sort(t)
        return t
    end

    local missing = {
        tex = {
            "def", "catcode", "futurelet", "chardef",
            "voffset", "hoffset",
            "numexpr", "dimexpr",
            "write", "dump", "skipdef,"
        },
        etex = {
            "savingvdiscards",
        },
        pdftex = {
        },
        luatex = {
        },
        aleph = {
            "AlephVersion", "Alephminorversion", "Alephrevision", "Alephversion",
        },
        omega = {
            "Omegaminorversion", "Omegarevision", "Omegaversion",
            "omathcode", "odelcode", "omathchardef", "omathchar", "omathaccent", "odelimiter", "oradical",
        },
        xetex = {
            "XeTeXversion",
        },
        plain = {
            "TeX",
            "bgroup", "egroup", "endgraf", "space", "empty", "null",
            "newcount", "newdimen", "newskip", "newmuskip", "newbox", "newtoks", "newhelp", "newread", "newwrite", "newfam", "newlanguage", "newinsert", "newif",
            "maxdimen", "magstephalf", "magstep",
            "frenchspacing", "nonfrenchspacing", "normalbaselines", "obeylines", "obeyspaces", "raggedright", "ttraggedright",
            "thinspace", "negthinspace", "enspace", "enskip", "quad", "qquad",
            "smallskip", "medskip", "bigskip", "removelastskip", "topglue", "vglue", "hglue",
            "break", "nobreak", "allowbreak", "filbreak", "goodbreak", "smallbreak", "medbreak", "bigbreak",
            "line", "leftline", "rightline", "centerline", "rlap", "llap", "underbar", "strutbox", "strut",
            "cases", "matrix", "pmatrix", "bordermatrix", "eqalign", "displaylines", "eqalignno", "leqalignno",
            "pageno", "folio", "tracingall", "showhyphens", "fmtname", "fmtversion",
            "hphantom", "vphantom", "phantom", "smash",
        },
    }

    local primitives = {
        tex    = table.sorted( table.merged( missing.tex   , table.fromhash(tex.primitives()) ) ),
        etex   = table.sorted( table.merged( missing.etex  , tex.extraprimitives('etex')      ) ),
        pdftex = table.sorted( table.merged( missing.pdftex, tex.extraprimitives('pdftex')    ) ),
        luatex = table.sorted( table.merged( missing.luatex, tex.extraprimitives('luatex')    ) ),
        aleph  = table.sorted( table.merged( missing.aleph , tex.extraprimitives('aleph')     ) ),
        omega  = table.sorted( table.merged( missing.omega , tex.extraprimitives('omega')     ) ),
        xetex  = table.sorted( table.merged( missing.xetex , { }                              ) ),
    }

 -- table.remove(primitives.tex,1) -- get rid of \-

    io.savedata("mult-prm.lua",table.serialize(primitives,true,{ reduce = true, inline = false }))

    context.stoptext()

\stopluacode