1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17\registerctxluafile{ssystemsyntax}{}
18
19\definehead
20 [Syntax]
21 [subsubsubsection]
22 [style=\tta\bf,
23 numberwidth=2fs,
24 after=\blank\startpacked,
25 aftersection=\stoppacked]
26
27\definenarrower[Arguments][left=4fs]
28
29\definedescription
30 [Primitive]
31 [headstyle=\ttbf,
32 width=fit,
33 alternative=top,
34 align={broad,flushleft,verytolerant},
35 inbetween=\startnarrower[2*left],
36 after=\stopnarrower]
37
38\definestartstop [SyntaxToken] [style=\ttsl]
39\definestartstop [SyntaxTokens] [style=\ttsl]
40\definestartstop [SyntaxInteger] [style=\ttsl]
41\definestartstop [SyntaxDimension] [style=\ttsl]
42\definestartstop [SyntaxGlue] [style=\ttsl]
43\definestartstop [SyntaxMuglue] [style=\ttsl]
44\definestartstop [SyntaxFloat] [style=\ttsl]
45\definestartstop [SyntaxQuantity] [style=\ttsl]
46\definestartstop [SyntaxPreamble] [style=\ttsl]
47\definestartstop [SyntaxCharacter] [style=\ttsl]
48\definestartstop [SyntaxChar] [style=\ttsl]
49\definestartstop [SyntaxFont] [style=\ttsl]
50\definestartstop [SyntaxMathstyle] [style=\ttsl]
51\definestartstop [SyntaxTokenlist] [style=\ttsl]
52\definestartstop [SyntaxCs] [style=\tt,left=\texescape]
53\definestartstop [SyntaxBox] [style=\ttsl]
54\definestartstop [SyntaxRule] [style=\ttsl]
55\definestartstop [SyntaxToks] [style=\ttsl]
56\definestartstop [SyntaxConditional] [style=\tt]
57
58\protected\def\SyntaxGlyph#1{{\ttbf\glyph raise .25ex yscale 1440 #1}}
59
60\protected\def\SyntaxLeftBracket {\SyntaxGlyph\leftbracketasciicode\thinspace}
61\protected\def\SyntaxLeftBrace {\SyntaxGlyph\leftbraceasciicode\thinspace}
62\protected\def\SyntaxLeftParenthesis {\SyntaxGlyph\leftparentasciicode\thinspace}
63\protected\def\SyntaxRightBracket {\thinspace\SyntaxGlyph\rightbracketasciicode}
64\protected\def\SyntaxRightBrace {\thinspace\SyntaxGlyph\rightbraceasciicode}
65\protected\def\SyntaxRightParenthesis {\thinspace\SyntaxGlyph\rightparentasciicode}
66\protected\def\SyntaxBar {\thinspace\SyntaxGlyph\barasciicode\thinspace}
67
68\startbuffer[engine:syntax:preambleparameters]
69\starttabulate[c]
70\NC \type{#n} \NC parameter \NC index \type{1} upto \type{E} \NC \NR
71\TB
72\NC \type{#0} \NC throw away parameter \NC increment index \NC \NR
73\NC \type{#} \NC ignore parameter \NC keep index \NC \NR
74\TB
75\NC \type{#*} \NC gobble white space \NC \NC \NR
76\NC \type{#} \NC keep (honor) the braces \NC \NC \NR
77\NC \type{#.} \NC ignore pars and spaces \NC \NC \NR
78\NC \type{#,} \NC push back space when no match \NC \NC \NR
79\NC \type{#} \NC remove leading and trailing spaces and pars \NC \NC \NR
80\NC \type{#=} \NC braces are mandate \NC \NC \NR
81\NC \type{#} \NC keep leading spaces \NC \NC \NR
82\NC \type{#} \NC braces are mandate and kept (obey) \NC \NC \NR
83\TB
84\NC \type{#@} \NC par delimiter \NC only for internal usage \NC \NR
85\TB
86\NC \type{#:} \NC pick up scanning here \NC \NC \NR
87\NC \type{#;} \NC quit scanning \NC \NC \NR
88\TB
89\NC \type{#L} \NC left delimiter token \NC followed by token \NC \NR
90\NC \type{#R} \NC right delimiter token \NC followed by token \NC \NR
91\TB
92\NC \type{#G} \NC gobble token \NC followed by token \NC \NR
93\NC \type{#M} \NC gobble token and spaces \NC followed by token \NC \NR
94\TB
95\NC \type{#S} \NC nest square brackets \NC only inner pairs \NC \NR
96\NC \type{#X} \NC nest angle brackets \NC only inner pairs \NC \NR
97\NC \type{#P} \NC nest parentheses \NC only inner pairs \NC \NR
98\stoptabulate
99\stopbuffer
100
101\startbuffer[engine:syntax:bodyparameters]
102\starttabulate[l]
103\NC \type{#n} \NC parameter \NC index \type{1} upto \type{E} in macro body \NC \NR
104\TB
105\NC \type{#I} \NC current iterator \NC \type {\currentloopiterator} \NC \NR
106\NC \type{#P} \NC parent iterator \NC \type {\previousloopiterator 1} \NC \NR
107\NC \type{#G} \NC grandparent iterator \NC \type {\previousloopiterator 2} \NC \NR
108\TB
109\NC \type{#H} \NC hash escape \NC \type {#} \NC \NR
110\NC \type{#S} \NC space escape \NC \ruledhbox to \interwordspace{\novrule height .8\strutht} \NC \NR
111\NC \type{#T} \NC tab escape \NC \type {\t} \NC \NR
112\NC \type{#L} \NC newline escape \NC \type {\n} \NC \NR
113\NC \type{#R} \NC return escape \NC \type {\r} \NC \NR
114\NC \type{#X} \NC backslash escape \NC \tex {} \NC \NR
115\TB
116\NC \type{#N} \NC nbsp \NC \type {U00A0} (under consideration) \NC \NR
117
118
119
120
121
122
123\stoptabulate
124\stopbuffer
125
126\startbuffer[engine:syntax:glyphoptions]
127 \ctxlua{moduledata.engine.codes("glyphoptioncodes")}
128\stopbuffer
129
130\startbuffer[engine:syntax:mathoptions]
131 \ctxlua{moduledata.engine.codes("mathoptioncodes")}
132\stopbuffer
133
134\startbuffer[engine:syntax:mathcontrol]
135 \ctxlua{moduledata.engine.codes("mathcontrolcodes")}
136\stopbuffer
137
138\startbuffer[engine:syntax:partriggercodes]
139 \ctxlua{moduledata.engine.codes("partriggercodes")}
140\stopbuffer
141
142\startbuffer[engine:syntax:parcontextcodes]
143 \ctxlua{moduledata.engine.codes("parcontextcodes")}
144\stopbuffer
145
146\startbuffer[engine:syntax:frozenparcodes]
147 \ctxlua{moduledata.engine.codes("frozenparcodes")}
148\stopbuffer
149
150\startbuffer[engine:syntax:frozenparcodes]
151 \ctxlua{moduledata.engine.codes("frozenparcodes")}
152\stopbuffer
153
154\startbuffer[engine:syntax:normalizelinecodes]
155 \ctxlua{moduledata.engine.codes("normalizelinecodes")}
156\stopbuffer
157
158\startbuffer[engine:syntax:normalizeparcodes]
159 \ctxlua{moduledata.engine.codes("normalizeparcodes")}
160\stopbuffer
161
162\startbuffer[engine:syntax:listgeometrycodes]
163 \ctxlua{moduledata.engine.codes("listgeometrycodes")}
164\stopbuffer
165
166\startbuffer[engine:syntax:protrusionboundarycodes]
167 \ctxlua{moduledata.engine.codes("protrusionboundarycodes")}
168\stopbuffer
169
170\startbuffer[engine:syntax:shapingpenaltiescodes]
171 \ctxlua{moduledata.engine.codes("shapingpenaltiescodes")}
172\stopbuffer
173
174\startbuffer[engine:syntax:automigrationcodes]
175 \ctxlua{moduledata.engine.codes("automigrationcodes")}
176\stopbuffer
177
178\startbuffer[engine:syntax:autoparagraphcodes]
179 \ctxlua{moduledata.engine.codes("autoparagraphcodes")}
180\stopbuffer
181
182\startbuffer[engine:syntax:textcontrolcodes]
183 \ctxlua{moduledata.engine.codes(tex.gettextcontrolvalues())}
184\stopbuffer
185
186\startbuffer[engine:syntax:discoptioncodes]
187 \ctxlua{moduledata.engine.codes("discoptioncodes")}
188\stopbuffer
189
190\startbuffer[engine:syntax:mathgluecodes]
191 \ctxlua{moduledata.engine.codes(tex.getmathgluevalues())}
192\stopbuffer
193
194\continueifinputfile{ssystemsyntax.mkxl}
195
196\usemodule[abbreviationslogos]
197\usemodule[systemtokens]
198
199\setupbodyfont
200 [dejavu,10pt]
201
202\setuplayout
203 [tight]
204
205\starttext
206
207\starttitle[title=Primitives]
208
209This is a preliminary overview of the \LUAMETATEX\ primitives. The presentation
210is mostly for myself and kind of informal. The primitives are describes in more
211detail in the (yet incomplete) \quote {primitives} manual.
212
213\vkern\lineheight
214
215\startpagecolumns[page=no]
216 \startluacode
217 moduledata.engine.allspecifications()
218 \stopluacode
219\stoppagecolumns
220
221\stoptitle
222
223\starttitle[title=Registers]
224
225Currently we have these upper bounds for the register but they can be lowered
226because we dont need that many.
227
228\starttabulate[]
229\NC count \NC integer \NC \cldcontext{tex.magicconstants.max_integer_register_index} \NC \NR
230\NC dimen \NC dimension \NC \cldcontext{tex.magicconstants.max_dimension_register_index} \NC \NR
231\NC skip \NC glue \NC \cldcontext{tex.magicconstants.max_glue_register_index} \NC \NR
232\NC muskip \NC glue \NC \cldcontext{tex.magicconstants.max_muglue_register_index} \NC \NR
233\NC attribute \NC integer \NC \cldcontext{tex.magicconstants.max_attribute_register_index} \NC \NR
234\NC toks \NC tokenlist \NC \cldcontext{tex.magicconstants.max_toks_register_index} \NC \NR
235\NC box \NC box \NC \cldcontext{tex.magicconstants.max_box_register_index} \NC \NR
236\NC float \NC posit \NC \cldcontext{tex.magicconstants.max_float_register_index} \NC \NR
237\stoptabulate
238
239\stoptitle
240
241\starttitle[title=Preamble and escapes]
242
243These parameter specifiers can end up in preambles:
244
245\getbuffer[engine:syntax:preambleparameters]
246
247These parameter escapes can end up in bodies and text:
248
249\getbuffer[engine:syntax:bodyparameters]
250
251\stoptitle
252
253\starttitle[title=Comparing values]
254
255The following tokens can be used in a comparison:
256
257\startluacode
258 context.starttabulate { "|c||" }
259 for k, v in table.sortedhash(moduledata.engine.compares) do
260 context.NC() context.formatted.type("%C",k) context.NC() context(v) context.NC() context.NR()
261 end
262 context.stoptabulate()
263\stopluacode
264
265\stoptitle
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289\stoptext
290 |