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\startmodule[figuresnames]
29
30\startluacode
31
32local context = context
33local ctx_NC = context.NC
34local ctx_NR = context.NR
35local ctx_red = context.red
36local ctx_starttabulate = context.starttabulate
37local ctx_stoptabulate = context.stoptabulate
38local ctx_hyphenatedname = context.hyphenatedfilename
39
40trackers.enable("graphics.lognames")
41
42context.start()
43
44 context.switchtobodyfont { "tt,small" }
45
46 local template = { "|Bl|p|" }
47
48 for _, data in table.sortedhash(figures.found) do
49 ctx_starttabulate(template)
50 local badname = data.badname
51 local found = data.found
52 ctx_NC()
53 context("asked name")
54 ctx_NC()
55 if badname then
56 ctx_red()
57 end
58 context(data.askedname)
59 ctx_NC() ctx_NR()
60 if found then
61 ctx_NC()
62 context("format")
63 ctx_NC()
64 context(data.format)
65 ctx_NC() ctx_NR()
66 ctx_NC()
67 context("found file")
68 ctx_NC()
69 ctx_hyphenatedname(data.foundname)
70
71 ctx_NC() ctx_NR()
72 ctx_NC()
73 context("used file")
74 ctx_NC()
75 ctx_hyphenatedname(data.fullname)
76
77 ctx_NC() ctx_NR()
78 if badname then
79 ctx_NC()
80 context("comment")
81 ctx_NC()
82 context("bad name")
83 ctx_NC() ctx_NR()
84 end
85 else
86 ctx_NC()
87 context("comment")
88 ctx_NC()
89 context(data.comment or "not found")
90 ctx_NC() ctx_NR()
91 end
92 ctx_stoptabulate()
93 end
94
95context.stop()
96
97\stopluacode
98
99\stopmodule
100 |