mult-prm.mkiv /size: 5589 b    last modification: 2020-07-01 14:35
1
%D \module
2
%D [ file=mult-prm,
3
%D version=2011.09.18, % actually older
4
%D title=\CONTEXT\ Multilingual Macros,
5
%D subtitle=Primitives,
6
%D author=Hans Hagen,
7
%D date=\currentdate,
8
%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
9
%C
10
%C This module is part of the \CONTEXT\ macro||package and is therefore
11
%C copyrighted by \PRAGMA. See mreadme.pdf for details.
12 13
%D This file is only a helper for generating files that can be used in an
14
%D editor for syntax highlighting.
15 16
% local all = table.load("mult-prm.lua")
17
% local tex = table.tohash(all.tex)
18
% for k, v in next, all do
19
% if k ~= "tex" then
20
% local h = table.tohash(v)
21
% for k, v in next, h do
22
% tex[k] = nil
23
% end
24
% all[k] = table.sortedkeys(h)
25
% end
26
% end
27
% all.tex = table.sortedkeys(tex)
28
% print((string.gsub(table.serialize(all,true),' "','\n "')))
29 30
\startluacode
31 32
context
.
starttext
(
)
33 34
local
missing
=
{
35
tex
=
{
36
}
,
37
etex
=
{
38
}
,
39
luatex
=
{
40
}
,
41
pdftex
=
{
-- maybe not complete
42
"
ifpdfabsdim
"
,
"
ifpdfabsnum
"
,
"
ifpdfprimitive
"
,
"
pdfadjustspacing
"
,
43
"
pdfannot
"
,
"
pdfcatalog
"
,
"
pdfcolorstack
"
,
"
pdfcolorstackinit
"
,
44
"
pdfcompresslevel
"
,
"
pdfcopyfont
"
,
"
pdfcreationdate
"
,
45
"
pdfdecimaldigits
"
,
"
pdfdest
"
,
"
pdfdestmargin
"
,
"
pdfdraftmode
"
,
46
"
pdfeachlinedepth
"
,
"
pdfeachlineheight
"
,
"
pdfendlink
"
,
47
"
pdfendthread
"
,
"
pdffirstlineheight
"
,
"
pdffontattr
"
,
"
pdffontexpand
"
,
48
"
pdffontname
"
,
"
pdffontobjnum
"
,
"
pdffontsize
"
,
"
pdfgamma
"
,
49
"
pdfgentounicode
"
,
"
pdfglyphtounicode
"
,
"
pdfhorigin
"
,
50
"
pdfignoreddimen
"
,
"
pdfignoreunknownimages
"
,
"
pdfimageaddfilename
"
,
51
"
pdfimageapplygamma
"
,
"
pdfimagegamma
"
,
"
pdfimagehicolor
"
,
52
"
pdfimageresolution
"
,
"
pdfincludechars
"
,
"
pdfinclusioncopyfonts
"
,
53
"
pdfinclusionerrorlevel
"
,
"
pdfinfo
"
,
"
pdfinfoomitdate
"
,
54
"
pdfinsertht
"
,
"
pdflastannot
"
,
"
pdflastlinedepth
"
,
"
pdflastlink
"
,
55
"
pdflastobj
"
,
"
pdflastxform
"
,
"
pdflastximage
"
,
"
pdflastximagepages
"
,
56
"
pdflastxpos
"
,
"
pdflastypos
"
,
"
pdflinkmargin
"
,
"
pdfliteral
"
,
57
"
pdfmapfile
"
,
"
pdfmapline
"
,
"
pdfmajorversion
"
,
"
pdfminorversion
"
,
"
pdfnames
"
,
58
"
pdfnoligatures
"
,
"
pdfnormaldeviate
"
,
"
pdfobj
"
,
"
pdfrecompress
"
,
59
"
pdfobjcompresslevel
"
,
"
pdfoutline
"
,
"
pdfoutput
"
,
"
pdfpageattr
"
,
60
"
pdfpagebox
"
,
"
pdfpageheight
"
,
"
pdfpageref
"
,
"
pdfpageresources
"
,
61
"
pdfpagesattr
"
,
"
pdfpagewidth
"
,
"
pdfpkfixeddpi
"
,
"
pdfpkmode
"
,
62
"
pdfpkresolution
"
,
"
pdfprimitive
"
,
"
pdfprotrudechars
"
,
"
pdfpxdimen
"
,
63
"
pdfrandomseed
"
,
"
pdfrefobj
"
,
"
pdfrefxform
"
,
"
pdfrefximage
"
,
64
"
pdfreplacefont
"
,
"
pdfrestore
"
,
"
pdfretval
"
,
"
pdfsave
"
,
"
pdfsavepos
"
,
65
"
pdfsetmatrix
"
,
"
pdfsetrandomseed
"
,
"
pdfstartlink
"
,
"
pdfstartthread
"
,
66
"
pdfsuppressoptionalinfo
"
,
"
pdfsuppressptexinfo
"
,
"
pdftexbanner
"
,
67
"
pdftexrevision
"
,
"
pdftexversion
"
,
"
pdfthread
"
,
"
pdfthreadmargin
"
,
68
"
pdftracingfonts
"
,
"
pdftrailer
"
,
"
pdftrailerid
"
,
"
pdfuniformdeviate
"
,
69
"
pdfuniqueresname
"
,
"
pdfvorigin
"
,
"
pdfxform
"
,
"
pdfxformattr
"
,
70
"
pdfxformmargin
"
,
"
pdfxformname
"
,
"
pdfxformresources
"
,
"
pdfximage
"
,
71
"
pdfomitcidset
"
,
"
pdfomitcharset
"
,
72
}
,
73
aleph
=
{
-- we don't bother
74
"
Alephminorversion
"
,
"
Alephrevision
"
,
"
Alephversion
"
,
75
}
,
76
omega
=
{
-- we don't bother
77
"
Omegaminorversion
"
,
"
Omegarevision
"
,
"
Omegaversion
"
,
78
}
,
79
xetex
=
{
-- we don't bother
80
"
XeTeXversion
"
,
81
}
,
82
-- plain = {
83
-- "TeX",
84
-- "bgroup", "egroup", "endgraf", "space", "empty", "null",
85
-- "newcount", "newdimen", "newskip", "newmuskip", "newbox", "newtoks", "newhelp", "newread", "newwrite", "newfam", "newlanguage", "newinsert", "newif",
86
-- "maxdimen", "magstephalf", "magstep",
87
-- "frenchspacing", "nonfrenchspacing", "normalbaselines", "obeylines", "obeyspaces", "raggedright", "ttraggedright",
88
-- "thinspace", "negthinspace", "enspace", "enskip", "quad", "qquad",
89
-- "smallskip", "medskip", "bigskip", "removelastskip", "topglue", "vglue", "hglue",
90
-- "break", "nobreak", "allowbreak", "filbreak", "goodbreak", "smallbreak", "medbreak", "bigbreak",
91
-- "line", "leftline", "rightline", "centerline", "rlap", "llap", "underbar", "strutbox", "strut",
92
-- "cases", "matrix", "pmatrix", "bordermatrix", "eqalign", "displaylines", "eqalignno", "leqalignno",
93
-- "pageno", "folio", "tracingall", "showhyphens", "fmtname", "fmtversion",
94
-- "hphantom", "vphantom", "phantom", "smash",
95
-- },
96
}
97 98
local
primitives
=
{
99
tex
=
table
.
sorted
(
table
.
merged
(
missing
.
tex
,
tex
.
extraprimitives
(
"
core
"
,
"
tex
"
)
)
)
,
100
etex
=
table
.
sorted
(
table
.
merged
(
missing
.
etex
,
tex
.
extraprimitives
(
"
etex
"
)
)
)
,
101
pdftex
=
table
.
sorted
(
table
.
merged
(
missing
.
pdftex
,
{
}
)
)
,
102
luatex
=
table
.
sorted
(
table
.
merged
(
missing
.
luatex
,
tex
.
extraprimitives
(
"
luatex
"
)
)
)
,
103
aleph
=
table
.
sorted
(
table
.
merged
(
missing
.
aleph
,
{
}
)
)
,
104
omega
=
table
.
sorted
(
table
.
merged
(
missing
.
omega
,
{
}
)
)
,
105
xetex
=
table
.
sorted
(
table
.
merged
(
missing
.
xetex
,
{
}
)
)
,
106
}
107 108
-- table.remove(primitives.tex,1) -- get rid of \-
109 110
io
.
savedata
(
"
mult-prm.lua
"
,
table
.
serialize
(
primitives
,
true
,
{
reduce
=
true
,
inline
=
false
}
)
)
111 112
context
.
stoptext
(
)
113 114
\stopluacode
115