summaryrefslogtreecommitdiff
path: root/tex/context/base/status-mkiv.tex
blob: f15abc4a9a539a2294ab81e224494647154915fc (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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
\setupbodyfont
  [dejavu,9pt]

\setuppapersize
  [A4,landscape]

\setuplayout
  [width=middle,
   height=middle,
   backspace=1cm,
   topspace=1cm,
   footer=0pt,
   header=1.25cm]

\setuphead
  [title]
  [style=\bfa,
   page=yes]

\setuppagenumbering
  [location=]

\setupheadertexts
  [\currentdate][MkIV Status / Page \pagenumber]

% \showmakeup
% \showallmakeup

\starttext

\starttitle[title=Todo]

\startitemize[packed]
    \startitem currently the new namespace prefixes are not consistent but this
               will be done when we're satisfied with one scheme \stopitem
    \startitem there will be additional columns in the table, like for namespace
               so we need another round of checking then \stopitem
    \startitem the imp modules are not in the list and need checking too \stopitem
    \startitem the s, x, m modules will be checked, redone and reorganized \stopitem
    \startitem the lua code will be cleaned up upgraded as some is quite old
               and experimental \stopitem
    \startitem we need a proper dependency tree and better defined loading order \stopitem
    \startitem all dotag.. will be moved to the tags_.. namespace \stopitem
    \startitem we need to check what messages are gone (i.e.\ clean up mult-mes) \stopitem
    \startitem some commands can go from mult-def (and the xml file) \stopitem
    \startitem check for setuphandler vs simplesetuphandler \stopitem
    \startitem all showcomposition etc can go (we can redo that in lua if needed) \stopitem
    \startitem for the moment we will go for \type {xxxx_} namespaces that (mostly) match
               the filename but later we can replace these by longer names (via a script) so
               module writers should {\bf not} use the core commands with \type{_} in the
               name \stopitem
    \startitem the message system will be unified \stopitem
    \startitem maybe rename dowhatevertexcommand to fromluawhatevertexcommand \stopitem
    \startitem consider moving setups directly to lua end (e.g. in characterspacing, breakpoint, bitmaps etc.) \stopitem
    \startitem more local temporary \type {\temp...} will become \type {\p_...} \stopitem
    \startitem check all ctxlua calls for ctxcommand \stopitem
    \startitem rename all those \type {\current<whatever>}s in strc.
\stopitemize

\stoptitle

\definehighlight[notabenered]   [color=darkred,   style=bold]
\definehighlight[notabeneblue]  [color=darkblue,  style=bold]
\definehighlight[notabeneyellow][color=darkyellow,style=bold]

\startluacode

    local coremodules = dofile("status-mkiv.lua")

    local valid = table.tohash {
        "toks", "attr", "page", "buff", "font", "colo", "phys", "supp", "typo", "strc",
        "syst", "tabl", "spac", "scrn", "lang", "lxml", "mlib", "java", "pack", "math",
        "symb", "grph", "anch", "luat", "mult", "back", "node", "meta", "norm", "catc",
        "cldf", "file", "char", "core", "layo", "trac", "cont", "regi", "enco", "hand",
        "unic", "sort", "blob", "type", "scrp", "prop", "chem", "bibl", "task",
        "module",
    }

    if coremodules then

        local function tabelize(loaded,what)

            if loaded then

                local noftodo    = 0
                local nofdelayed = 0
                local nofloaded  = #loaded
                local categories = { }

                for k, v in next, valid do
                    categories[k] = { }
                end

                for i=1,nofloaded do
                    local l = loaded[i]
                    l.order = i
                    local category = string.match(l.filename,"([^%-]+)%-") or "module"
                    local c = categories[category]
                    c[#c+1] = l
                end

                for k, loaded in table.sortedhash(categories) do

                    local nofloaded = #loaded

                    if nofloaded > 0 then

                        table.sort(loaded,function(a,b) return a.filename < b.filename end) -- in place

                        context.starttitle { title = k }

                        context.starttabulate { "|Tr|Tlw(12em)|Tl|Tlw(6em)|l|l|l|p|" }
                        context.NC() context.bold("order")
                        context.NC() context.bold("file")
                        context.NC() context.bold("mark")
                        context.NC() context.bold("status")
                        context.NC() context.bold("reference")
                        context.NC() context.bold("manual")
                        context.NC() context.bold("wiki")
                        context.NC() context.bold("comment")
                        context.NC() context.NR()
                        context.HL()
                        for i=1,nofloaded do
                            local module = loaded[i]
                            local status = module.status
                            local marktype = module.marktype
                            context.NC() context(module.order)
                            context.NC() context(module.filename)
                            context.NC()
                            if marktype == "mkvi" then
                                context.notabeneblue(marktype)
                            else
                                context(marktype)
                            end
                            context.NC()
                            if status == "todo" then
                                context.notabenered(status)
                                noftodo = noftodo + 1
                            elseif status == "delayed" then
                                context.notabeneyellow(status)
                                nofdelayed = nofdelayed + 1
                            else
                                context(status)
                            end
                            context.NC() context(module.reference)
                            context.NC() context(module.manual)
                            context.NC() context(module.wiki)
                            context.NC() context(module.comment)
                            context.NC() context.NR()
                        end
                        context.stoptabulate()

                        context.stoptitle()

                    end

                end

                context.starttitle { title = string.format("summary of %s modules",what) }

                    local nofdone = nofloaded - noftodo - nofdelayed

                    context.starttabulate { "|B|r|" }
                    context.HL()
                    context.NC() context("done")    context.NC() context(nofdone)    context.NC() context.NR()
                    context.NC() context("todo")    context.NC() context(noftodo)    context.NC() context.NR()
                    context.NC() context("delayed") context.NC() context(nofdelayed) context.NC() context.NR()
                    context.HL()
                    context.NC() context("loaded")  context.NC() context(nofloaded)  context.NC() context.NR()
                    context.HL()
                    context.stoptabulate()

                context.stoptitle()

            end

        end

        tabelize(coremodules.core, "core")
        tabelize(coremodules.extra,"extra")

    end


 -- context.starttitle { title = "Valid prefixes" }
 --
 -- for namespace, data in table.sortedhash(namespaces) do
 --     if valid[namespace] then
 --         context.type(namespace)
 --     end
 --     context.par()
 -- end
 --
 -- context.stoptitle()

    context.starttitle { title = "messy namespaces" }

    local namespaces = dofile("status-namespaces.lua")

    for namespace, data in table.sortedhash(namespaces) do
        if valid[namespace] then
        else
            context(namespace)
        end
        context.par()
    end

    context.stoptitle()

    context.starttitle { title = "messy registers" }

    local registers  = dofile("status-registers.lua")

    for register, data in table.sortedhash(registers) do
        context(register)
        context.par()
        for name in table.sortedhash(data) do
            context.quad()
            context.type(name)
            context.par()
        end
        context.par()
    end

    context.stoptitle()

\stopluacode

\stoptext