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
|
%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.
% local all = table.load("mult-prm.lua")
% local tex = table.tohash(all.tex)
% for k, v in next, all do
% if k ~= "tex" then
% local h = table.tohash(v)
% for k, v in next, h do
% tex[k] = nil
% end
% all[k] = table.sortedkeys(h)
% end
% end
% all.tex = table.sortedkeys(tex)
% print((string.gsub(table.serialize(all,true),' "','\n "')))
\startluacode
context.starttext()
local missing = {
tex = {
},
etex = {
},
luatex = {
},
pdftex = { -- maybe not complete
"ifpdfabsdim", "ifpdfabsnum", "ifpdfprimitive", "pdfadjustspacing",
"pdfannot", "pdfcatalog", "pdfcolorstack", "pdfcolorstackinit",
"pdfcompresslevel", "pdfcopyfont", "pdfcreationdate",
"pdfdecimaldigits", "pdfdest", "pdfdestmargin", "pdfdraftmode",
"pdfeachlinedepth", "pdfeachlineheight", "pdfendlink",
"pdfendthread", "pdffirstlineheight", "pdffontattr", "pdffontexpand",
"pdffontname", "pdffontobjnum", "pdffontsize", "pdfgamma",
"pdfgentounicode", "pdfglyphtounicode", "pdfhorigin",
"pdfignoreddimen", "pdfignoreunknownimages", "pdfimageaddfilename",
"pdfimageapplygamma", "pdfimagegamma", "pdfimagehicolor",
"pdfimageresolution", "pdfincludechars", "pdfinclusioncopyfonts",
"pdfinclusionerrorlevel", "pdfinfo", "pdfinfoomitdate",
"pdfinsertht", "pdflastannot", "pdflastlinedepth", "pdflastlink",
"pdflastobj", "pdflastxform", "pdflastximage", "pdflastximagepages",
"pdflastxpos", "pdflastypos", "pdflinkmargin", "pdfliteral",
"pdfmapfile", "pdfmapline", "pdfmajorversion", "pdfminorversion", "pdfnames",
"pdfnoligatures", "pdfnormaldeviate", "pdfobj",
"pdfobjcompresslevel", "pdfoutline", "pdfoutput", "pdfpageattr",
"pdfpagebox", "pdfpageheight", "pdfpageref", "pdfpageresources",
"pdfpagesattr", "pdfpagewidth", "pdfpkfixeddpi", "pdfpkmode",
"pdfpkresolution", "pdfprimitive", "pdfprotrudechars", "pdfpxdimen",
"pdfrandomseed", "pdfrefobj", "pdfrefxform", "pdfrefximage",
"pdfreplacefont", "pdfrestore", "pdfretval", "pdfsave", "pdfsavepos",
"pdfsetmatrix", "pdfsetrandomseed", "pdfstartlink", "pdfstartthread",
"pdfsuppressoptionalinfo", "pdfsuppressptexinfo", "pdftexbanner",
"pdftexrevision", "pdftexversion", "pdfthread", "pdfthreadmargin",
"pdftracingfonts", "pdftrailer", "pdftrailerid", "pdfuniformdeviate",
"pdfuniqueresname", "pdfvorigin", "pdfxform", "pdfxformattr",
"pdfxformmargin", "pdfxformname", "pdfxformresources", "pdfximage",
},
aleph = { -- we don't bother
"Alephminorversion", "Alephrevision", "Alephversion",
},
omega = { -- we don't bother
"Omegaminorversion", "Omegarevision", "Omegaversion",
},
xetex = { -- we don't bother
"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 , tex.extraprimitives("core","tex") ) ),
etex = table.sorted( table.merged( missing.etex , tex.extraprimitives("etex") ) ),
pdftex = table.sorted( table.merged( missing.pdftex, { } ) ),
luatex = table.sorted( table.merged( missing.luatex, tex.extraprimitives("luatex") ) ),
aleph = table.sorted( table.merged( missing.aleph , { } ) ),
omega = table.sorted( table.merged( missing.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
|