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\immutable\integerdef\escapecatcode 0
107\immutable\integerdef\begingroupcatcode 1
108\immutable\integerdef\endgroupcatcode 2
109\immutable\integerdef\mathshiftcatcode 3
110\immutable\integerdef\alignmentcatcode 4
111\immutable\integerdef\endoflinecatcode 5
112\immutable\integerdef\parametercatcode 6
113\immutable\integerdef\superscriptcatcode 7
114\immutable\integerdef\subscriptcatcode 8
115\immutable\integerdef\ignorecatcode 9
116\immutable\integerdef\spacecatcode 10
117\immutable\integerdef\lettercatcode 11
118\immutable\integerdef\othercatcode 12
119\immutable\integerdef\activecatcode 13
120\immutable\integerdef\commentcatcode 14
121\immutable\integerdef\invalidcatcode 15
122
123
124\immutable\integerdef\tabasciicode 9
125\immutable\integerdef\newlineasciicode 10
126\immutable\integerdef\formfeedasciicode 12
127\immutable\integerdef\endoflineasciicode 13
128\immutable\integerdef\endoffileasciicode 26
129\immutable\integerdef\spaceasciicode 32
130\immutable\integerdef\exclamationmarkasciicode 33
131\immutable\integerdef\doublequoteasciicode 34
132\immutable\integerdef\hashasciicode 35
133\immutable\integerdef\dollarasciicode 36
134\immutable\integerdef\commentasciicode 37
135\immutable\integerdef\ampersandasciicode 38
136\immutable\integerdef\singlequoteasciicode 39
137\immutable\integerdef\primeasciicode 39
138\immutable\integerdef\leftparentasciicode 40
139\immutable\integerdef\rightparentasciicode 41
140\immutable\integerdef\commaasciicode 44
141\immutable\integerdef\hyphenasciicode 45
142\immutable\integerdef\periodasciicode 46
143\immutable\integerdef\forwardslashasciicode 47
144\immutable\integerdef\zeroasciicode 48
145\immutable\integerdef\nineasciicode 57
146\immutable\integerdef\colonasciicode 58
147\immutable\integerdef\semicolonasciicode 59
148\immutable\integerdef\lessthanasciicode 60
149\immutable\integerdef\morethanasciicode 62
150\immutable\integerdef\questionmarkasciicode 63
151\immutable\integerdef\atsignasciicode 64
152\immutable\integerdef\leftbracketasciicode 91
153\immutable\integerdef\backslashasciicode 92
154\immutable\integerdef\rightbracketasciicode 93
155\immutable\integerdef\circumflexasciicode 94
156\immutable\integerdef\underscoreasciicode 95
157\immutable\integerdef\alowercaseasciicode 97
158\immutable\integerdef\zlowercaseasciicode 122
159\immutable\integerdef\leftbraceasciicode 123
160\immutable\integerdef\barasciicode 124
161\immutable\integerdef\rightbraceasciicode 125
162\immutable\integerdef\tildeasciicode 126
163\immutable\integerdef\delasciicode 127
164
165\aliased\let\percentasciicode\commentasciicode
166
167
168\catcode\tabasciicode \spacecatcode
169\catcode\formfeedasciicode \activecatcode
170
171\catcode\endoffileasciicode \ignorecatcode
172
173\catcode\hashasciicode \parametercatcode
174\catcode\dollarasciicode \mathshiftcatcode
175
176\catcode\ampersandasciicode \alignmentcatcode
177
178\catcode\circumflexasciicode \superscriptcatcode
179\catcode\underscoreasciicode \subscriptcatcode
180\catcode\leftbraceasciicode \begingroupcatcode
181\catcode\rightbraceasciicode \endgroupcatcode
182\catcode\tildeasciicode \activecatcode
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\directlua {
224 tex.enableprimitives("normal",true)
225 function tex.enableprimitives() end
226}
227
228\untraced\permanent\let\undefined\undefined
229
230\immutable\def\space{ }
231\immutable\def\empty{}
232\mutable \def\temp {}
233
234\immutable\letcharcode \formfeedasciicode \par
235\immutable\letcharcode \tildeasciicode \
236\immutable\letcharcode \spaceasciicode \space
237
238\immutable\defcsname\tocharacter\tabasciicode \endcsname {\ }
239\immutable\defcsname\tocharacter\formfeedasciicode \endcsname {\par}
240\immutable\defcsname\tocharacter\endoflineasciicode\endcsname {\ }
241
242
243
244\permanent\def\gobbleoneargument#{}
245
246
247
248
249\def\unprotect
250 {\edef\protect
251 {\catcode\atsignasciicode \the\catcode\atsignasciicode \relax
252 \catcode\exclamationmarkasciicode\the\catcode\exclamationmarkasciicode\relax
253 \catcode\questionmarkasciicode \the\catcode\questionmarkasciicode \relax
254 \catcode\underscoreasciicode \the\catcode\underscoreasciicode \relax
255 \let\protect\relax}
256 \catcode\atsignasciicode \lettercatcode
257 \catcode\exclamationmarkasciicode\lettercatcode
258 \catcode\questionmarkasciicode \lettercatcode
259 \catcode\underscoreasciicode \lettercatcode}
260
261\let\protect\relax
262
263\unprotect
264
265
266
267\immutable\let\bgroup={
268\immutable\let\egroup=}
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308\directlua {tex.magicconstants = status.getconstants()}
309
310\permanent\countdef\c_syst_min_allocated_register = 201 \c_syst_min_allocated_register = 256
311
312\permanent\countdef\c_syst_min_allocated_iohandle = 203 \c_syst_min_allocated_iohandle = 0
313\permanent\countdef\c_syst_max_allocated_iohandle = 204 \c_syst_max_allocated_iohandle = 1023
314
315\permanent\countdef\c_syst_min_allocated_mark = 205 \c_syst_min_allocated_mark = 16
316\permanent\countdef\c_syst_max_allocated_mark = 206 \c_syst_max_allocated_mark = 1024
317
318\permanent\countdef\c_syst_min_allocated_attribute = 207 \c_syst_min_allocated_attribute = 1024
319\permanent\countdef\c_syst_max_allocated_attribute = 208 \c_syst_min_allocated_attribute = \directlua{tex.write(tex.magicconstants.max_attribute_register_index)}
320
321\permanent\countdef\c_syst_max_allocated_count = 211 \c_syst_max_allocated_count = \directlua{tex.write(tex.magicconstants.max_integer_register_index)}
322\permanent\countdef\c_syst_max_allocated_dimen = 212 \c_syst_max_allocated_dimen = \directlua{tex.write(tex.magicconstants.max_dimension_register_index)}
323\permanent\countdef\c_syst_max_allocated_skip = 213 \c_syst_max_allocated_skip = \directlua{tex.write(tex.magicconstants.max_glue_register_index)}
324\permanent\countdef\c_syst_max_allocated_muskip = 214 \c_syst_max_allocated_muskip = \directlua{tex.write(tex.magicconstants.max_muglue_register_index)}
325\permanent\countdef\c_syst_max_allocated_box = 215 \c_syst_max_allocated_box = \directlua{tex.write(tex.magicconstants.max_box_register_index)}
326\permanent\countdef\c_syst_max_allocated_toks = 216 \c_syst_max_allocated_toks = \directlua{tex.write(tex.magicconstants.max_toks_register_index)}
327\permanent\countdef\c_syst_max_allocated_read = 217 \c_syst_max_allocated_read = \c_syst_max_allocated_iohandle
328\permanent\countdef\c_syst_max_allocated_write = 218 \c_syst_max_allocated_write = \c_syst_max_allocated_iohandle
329\permanent\countdef\c_syst_max_allocated_float = 220 \c_syst_max_allocated_float = \directlua{tex.write(tex.magicconstants.max_float_register_index or 0)}
330
331\permanent\countdef\c_syst_last_allocated_count = 221 \c_syst_last_allocated_count = \c_syst_min_allocated_register
332\permanent\countdef\c_syst_last_allocated_dimen = 222 \c_syst_last_allocated_dimen = \c_syst_min_allocated_register
333\permanent\countdef\c_syst_last_allocated_skip = 223 \c_syst_last_allocated_skip = \c_syst_min_allocated_register
334\permanent\countdef\c_syst_last_allocated_muskip = 224 \c_syst_last_allocated_muskip = \c_syst_min_allocated_register
335\permanent\countdef\c_syst_last_allocated_box = 225 \c_syst_last_allocated_box = \c_syst_min_allocated_register
336\permanent\countdef\c_syst_last_allocated_toks = 226 \c_syst_last_allocated_toks = \c_syst_min_allocated_register
337\permanent\countdef\c_syst_last_allocated_read = 227 \c_syst_last_allocated_read = \c_syst_min_allocated_iohandle
338\permanent\countdef\c_syst_last_allocated_write = 228 \c_syst_last_allocated_write = \c_syst_min_allocated_iohandle
339\permanent\countdef\c_syst_last_allocated_marks = 229 \c_syst_last_allocated_marks = \c_syst_min_allocated_mark
340\permanent\countdef\c_syst_last_allocated_float = 230 \c_syst_last_allocated_float = \c_syst_min_allocated_register
341
342\permanent\countdef\c_syst_min_counter_value = 253 \c_syst_min_counter_value = "7FFFFFFF
343\permanent\countdef\c_syst_max_counter_value = 254 \c_syst_max_counter_value = "7FFFFFFF
344
345\immutable\integerdef\zerocount 0
346\immutable\integerdef\plusone 1
347\immutable\integerdef\minusone 1
348
349\immutable\integerdef\normalpagebox 255
350
351\immutable\integerdef\statuswrite \minusone
352
353\immutable\dimensiondef\zeropoint 0pt
354
355\immutable\positdef\zerofloat 0
356
357
358
359
360
361
362
363
364
365\permanent\protected\def\newinteger #1{\integerdef #1\zerocount}
366\permanent\protected\def\newdimension #1{\dimensiondef #1\zeropoint}
367\permanent\protected\def\newgluespec #1{\gluespecdef #1\zeropoint}
368\permanent\protected\def\newmugluespec#1{\mugluespecdef#1\zeropoint}
369\permanent\protected\def\newposit #1{\positdef #1\zerocount}
370
371
372
373
374
375
376\protected\def\aliasinteger #1#2{\untraced\protected\def#1{#2}}
377\protected\def\aliasdimension#1#2{\untraced\protected\def#1{#2}}
378\protected\def\aliasposit #1#2{\untraced\protected\def#1{#2}}
379
380
381
382
383
384
385\permanent\let\wlog\gobbleoneargument
386
387
388
389
390\permanent\protected\def\newcount {\syst_basics_allocate\c_syst_last_allocated_count \count \countdef \c_syst_max_allocated_count}
391\permanent\protected\def\newdimen {\syst_basics_allocate\c_syst_last_allocated_dimen \dimen \dimendef \c_syst_max_allocated_dimen}
392\permanent\protected\def\newskip {\syst_basics_allocate\c_syst_last_allocated_skip \skip \skipdef \c_syst_max_allocated_skip}
393\permanent\protected\def\newmuskip{\syst_basics_allocate\c_syst_last_allocated_muskip\muskip\muskipdef \c_syst_max_allocated_muskip}
394\permanent\protected\def\newbox {\syst_basics_allocate\c_syst_last_allocated_box \box \integerdef\c_syst_max_allocated_box}
395\permanent\protected\def\newtoks {\syst_basics_allocate\c_syst_last_allocated_toks \toks \toksdef \c_syst_max_allocated_toks}
396\permanent\protected\def\newread {\syst_basics_allocate\c_syst_last_allocated_read \read \integerdef\c_syst_max_allocated_read}
397\permanent\protected\def\newwrite {\syst_basics_allocate\c_syst_last_allocated_write \write \integerdef\c_syst_max_allocated_write}
398\permanent\protected\def\newmarks {\syst_basics_allocate\c_syst_last_allocated_marks \marks \integerdef\c_syst_max_allocated_mark}
399\permanent\protected\def\newfloat {\syst_basics_allocate\c_syst_last_allocated_float \float \floatdef \c_syst_max_allocated_float}
400
401\firstvalidlanguage \plusone
402
403
404
405
406\permanent\protected\def\setconstant {}
407\permanent\protected\def\setconstantvalue#1#2{\csname#1\endcsname\numexpr#2\relax}
408
409\permanent\protected\def\newconstant#1
410 {\ifrelax#1
411
412 \unletfrozen#1
413
414 \newinteger#1
415 \orelse\ifdefined#1
416
417 \else
418
419 \newinteger#1
420 \fi}
421
422\permanent\protected\def\setnewconstant#1{\newconstant#1#1}
423
424
425
426\newlinechar\newlineasciicode \permanent\edef\outputnewlinechar{\tocharacter\newlineasciicode}
427
428
429
430
431
432
433
434
435
436
437\ifdefined\writestatus \else
438
439 \frozen\protected\def\writestatus#1#2{\message{#1: #2}}
440\fi
441
442
443
444
445
446
447
448
449
450
451
452
453
454\def\syst_basics_allocate_yes#1#2#3#4#5
455 {\ifnum#1<#4\relax
456 \global\advanceby#1\plusone
457 \permanent\global#3#5=#1\relax
458 \else
459 \writestatus{warning}{no room for \string#2\space \string#5\space (max: \number#4)}
460 \fi}
461
462\def\syst_basics_allocate_nop#1#2#3#4#5
463 {\writestatus{warning}{\string#2 \string#5 is already defined (\string\relax\space it first)}}
464
465\def\syst_basics_allocate#1#2#3#4#5
466 {\ifrelax#5
467 \expandafter\syst_basics_allocate_yes
468 \orelse\ifdefined#5
469 \expandafter\syst_basics_allocate_nop
470 \else
471 \expandafter\syst_basics_allocate_yes
472 \fi
473 #1#2#3#4#5}
474
475
476
477
478
479
480
481
482
483\immutable\integerdef\attributeunsetvalue\c_syst_min_counter_value
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502\newinteger \scratchcounter \newinteger \globalscratchcounter \newinteger \privatescratchcounter
503\newposit \scratchfloat \newposit \globalscratchfloat \newposit \privatescratchfloat
504\newdimension\scratchdimen \newdimension\globalscratchdimen \newdimension\privatescratchdimen
505\newgluespec \scratchskip \newgluespec \globalscratchskip \newgluespec \privatescratchskip
506\newmuskip \scratchmuskip \newmuskip \globalscratchmuskip \newmuskip \privatescratchmuskip
507\newtoks \scratchtoks \newtoks \globalscratchtoks \newtoks \privatescratchtoks
508\newbox \scratchbox \newbox \globalscratchbox \newbox \privatescratchbox
509
510\newinteger \scratchcounterone \newinteger \scratchcountertwo \newinteger \scratchcounterthree
511\newposit \scratchfloatone \newposit \scratchfloattwo \newposit \scratchfloatthree
512\newdimension\scratchdimenone \newdimension\scratchdimentwo \newdimension\scratchdimenthree
513\newgluespec \scratchskipone \newgluespec \scratchskiptwo \newgluespec \scratchskipthree
514\newmuskip \scratchmuskipone \newmuskip \scratchmuskiptwo \newmuskip \scratchmuskipthree
515\newtoks \scratchtoksone \newtoks \scratchtokstwo \newtoks \scratchtoksthree
516\newbox \scratchboxone \newbox \scratchboxtwo \newbox \scratchboxthree
517
518\newinteger \scratchcounterfour\newinteger \scratchcounterfive \newinteger \scratchcountersix
519\newposit \scratchfloatfour \newposit \scratchfloatfive \newposit \scratchfloatsix
520\newdimension\scratchdimenfour \newdimension\scratchdimenfive \newdimension\scratchdimensix
521\newgluespec \scratchskipfour \newgluespec \scratchskipfive \newgluespec \scratchskipsix
522\newmuskip \scratchmuskipfour \newmuskip \scratchmuskipfive \newmuskip \scratchmuskipsix
523\newtoks \scratchtoksfour \newtoks \scratchtoksfive \newtoks \scratchtokssix
524\newbox \scratchboxfour \newbox \scratchboxfive \newbox \scratchboxsix
525
526\newinteger\globalscratchcounterone
527\newinteger\globalscratchcountertwo
528\newinteger\globalscratchcounterthree
529
530\mutable\let\scratchmacro \relax
531\mutable\let\scratchmacroone\relax
532\mutable\let\scratchmacrotwo\relax
533
534
535
536
537\mutable\lettonothing\tempstring
538
539\mutable\lettonothing\scratchstring
540\mutable\lettonothing\scratchstringone
541\mutable\lettonothing\scratchstringtwo
542
543
544
545
546
547
548\newdimension\scratchwidth
549\newdimension\scratchheight
550\newdimension\scratchdepth
551\newdimension\scratchitalic
552\newdimension\scratchtotal
553
554\newdimension\scratchoffset
555\newdimension\scratchleftoffset
556\newdimension\scratchrightoffset
557\newdimension\scratchtopoffset
558\newdimension\scratchbottomoffset
559
560\newdimension\scratchdistance
561
562\newdimension\scratchhsize
563\newdimension\scratchvsize
564
565\newdimension\scratchxoffset
566\newdimension\scratchyoffset
567\newdimension\scratchhoffset
568\newdimension\scratchvoffset
569
570\newdimension\scratchxposition
571\newdimension\scratchyposition
572
573\newinteger\scratchnx
574\newinteger\scratchny
575
576\newinteger\scratchmx
577\newinteger\scratchmy
578
579\newinteger\scratchmin
580\newinteger\scratchmax
581
582\newinteger\scratchunicode
583\newinteger\scratchunicodeone
584\newinteger\scratchunicodetwo
585\newinteger\scratchunicodethree
586
587\newdimension\scratchleftskip
588\newdimension\scratchrightskip
589\newdimension\scratchtopskip
590\newdimension\scratchbottomskip
591
592
593
594
595
596
597
598
599
600
601
602
603
604\immutable\integerdef \maxcount 2147483647
605
606
607\immutable\dimensiondef \onepoint 1pt
608\immutable\dimensiondef \halfapoint 0.5pt
609\immutable\dimensiondef \maxdimen 16383.99999pt
610\immutable\dimensiondef \onebasepoint 1bp
611\immutable\dimensiondef \scaledpoint 1sp
612\immutable\dimensiondef \thousandpoint 1000pt
613
614\immutable\gluespecdef \zeroskip \zeropoint plus \zeropoint minus \zeropoint
615\immutable\gluespecdef \centeringskip \zeropoint plus \thousandpoint minus \thousandpoint
616\immutable\gluespecdef \stretchingskip \zeropoint plus \thousandpoint
617\immutable\gluespecdef \shrinkingskip \zeropoint minus \thousandpoint
618\immutable\gluespecdef \centeringfillskip \zeropoint plus 1fill minus 1fill
619\immutable\gluespecdef \stretchingfillskip \zeropoint plus 1fill
620\immutable\gluespecdef \shrinkingfillskip \zeropoint minus 1fill
621\immutable\gluespecdef \centeringfilllskip \zeropoint plus 1filll minus 1filll
622\immutable\gluespecdef \stretchingfilllskip \zeropoint plus 1filll
623\immutable\gluespecdef \shrinkingfilllskip \zeropoint minus 1filll
624
625\immutable\mugluespecdef \zeromuskip 0mu
626\immutable\mugluespecdef \onemuskip 1mu
627\immutable\mugluespecdef \muquad 18mu
628
629\aliased\let\points \onepoint
630\aliased\let\halfpoint\halfapoint
631
632\newtoks \emptytoks
633
634
635
636
637
638
639\immutable\integerdef\minustwo 2
640
641
642\immutable\integerdef\plustwo 2
643\immutable\integerdef\plusthree 3
644\immutable\integerdef\plusfour 4
645\immutable\integerdef\plusfive 5
646\immutable\integerdef\plussix 6
647\immutable\integerdef\plusseven 7
648\immutable\integerdef\pluseight 8
649\immutable\integerdef\plusnine 9
650\immutable\integerdef\plusten 10
651\immutable\integerdef\pluseleven 11
652\immutable\integerdef\plustwelve 12
653\immutable\integerdef\plussixteen 16
654\immutable\integerdef\plusfifty 50
655\immutable\integerdef\plushundred 100
656\immutable\integerdef\plusonehundred 100
657\immutable\integerdef\plustwohundred 200
658\immutable\integerdef\plusfivehundred 500
659\immutable\integerdef\pluscxxvii 127
660\immutable\integerdef\pluscxxviii 128
661\immutable\integerdef\pluscclv 255
662\immutable\integerdef\pluscclvi 256
663\immutable\integerdef\plusthousand 1000
664\immutable\integerdef\plustenthousand 10000
665\immutable\integerdef\plustwentythousand 20000
666\immutable\integerdef\medcard 32768
667\immutable\integerdef\maxcard 65536
668\immutable\integerdef\maxcardminusone 65535
669\immutable\integerdef\maxiterator "FFFFF
670
671\immutable\integerdef\binaryshiftedten 1024
672\immutable\integerdef\binaryshiftedtwenty 1048576
673\immutable\integerdef\binaryshiftedthirty 1073741824
674
675
676
677
678
679
680\permanent\let\singleexpandafter \expandafter
681\permanent\def\doubleexpandafter{\expandafter\expandafter\expandafter}
682\permanent\def\tripleexpandafter{\expandafter\doubleexpandafter\expandafter}
683
684
685
686
687\newbox\voidbox
688
689\permanent\def\unvoidbox{\unhbox\voidbox}
690\permanent\def\emptybox {\box \voidbox}
691\permanent\def\emptyvbox{\normalvpack{}}
692\permanent\def\emptyhbox{\normalhpack{}}
693
694\aliased\let\leavevmode\unvoidbox
695
696
697
698
699
700
701
702
703
704
705
706
707\permanent\protected\def\dontcomplain
708 {\hbadness\plustenthousand
709 \vbadness\plustenthousand
710 \hfuzz \maxdimen
711 \vfuzz \maxdimen}
712
713\permanent\protected\def\noboxtracing
714 {\showboxdepth \zerocount
715 \showboxbreadth\zerocount}
716
717\permanent\protected\def\lessboxtracing
718 {\showboxdepth \plusfive
719 \showboxbreadth\plusten}
720
721\permanent\protected\def\moreboxtracing
722 {\showboxbreadth\maxcount
723 \showboxdepth \maxcount}
724
725
726
727
728\aliased\let\p@ \onepoint
729\aliased\let\m@ne \minusone
730\aliased\let\z@ \zeropoint
731\aliased\let\@ne \plusone
732\aliased\let\tw@ \plustwo
733\aliased\let\thr@@ \plusthree
734\aliased\let\sixt@@n\plussixteen
735\aliased\let\@cclv \pluscclv
736\aliased\let\@cclvi \pluscclvi
737\aliased\let\voidb@x\voidbox
738
739\newtoks \toks@
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785\permanent\protected\def\new_if_define#1#2
786 {\permanent\protected\gdefcsname\expandafter\new_if_check\csstring#2true\endcsname {\enforced#1#2\iftrue }
787 \permanent\protected\gdefcsname\expandafter\new_if_check\csstring#2false\endcsname{\enforced#1#2\iffalse}
788 \csname\expandafter\new_if_check\csstring#2false\endcsname}
789
790\normalexpanded{\gdef\noexpand\new_if_check\string i\string f{}}
791
792\permanent\protected\def\newif {\new_if_define\let }
793\permanent\protected\def\globalnewif{\new_if_define\glet}
794
795
796
797\newif\ifdone \globalnewif\ifglobaldone
798\newif\iffound \globalnewif\ifglobalfound
799
800\newif\ifscratchcondition
801\newif\ifscratchconditionone
802\newif\ifscratchconditiontwo
803
804
805
806
807\aliased\let\htdp\boxtotal
808
809
810
811
812
813
814
815
816
817
818
819\aliased\let\active\activecatcode
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846\permanent\protected\def\tracingall
847 {\tracingcommands \plusfour
848 \tracingmacros \plusthree
849 \tracingoutput \plusone
850 \tracingpages \plusone
851 \tracingparagraphs\plustwo
852 \tracingrestores \plusone
853 \tracinggroups \plusone
854 \tracingifs \plusone
855 \tracingnesting \plusthree
856 \tracingassigns \plustwo
857 \tracingmath \plusone
858 \tracingalignments\plustwo
859 \showboxbreadth \maxcount
860 \showboxdepth \maxcount
861 \tracingonline \plusone}
862
863\permanent\protected\def\tracingless
864 {\tracingall
865 \tracingoutput \zerocount
866 \showboxbreadth \maxcount
867 \showboxdepth \plusten}
868
869\permanent\protected\def\loggingall
870 {\tracingall
871 \tracingonline \zerocount}
872
873\permanent\protected\def\tracingnone
874 {\tracingonline \zerocount
875 \showboxdepth \plusfive
876 \showboxbreadth \plusten
877 \tracingalignments\zerocount
878 \tracingmath \zerocount
879 \tracingassigns \zerocount
880 \tracingnesting \zerocount
881 \tracingifs \zerocount
882 \tracinggroups \zerocount
883 \tracingrestores \zerocount
884 \tracingparagraphs\zerocount
885 \tracingpages \zerocount
886 \tracingoutput \zerocount
887 \tracingmacros \zerocount
888 \tracingcommands \zerocount
889 \tracingonline \zerocount}
890
891
892
893
894
895
896\lessboxtracing
897
898
899
900\tracingstats\plusone
901
902
903
904\permanent\def\pushoverloadmode
905 {\enforced\permanent\protected\edef\popoverloadmode{\normaloverloadmode\the\normaloverloadmode\enforced\let\popoverloadmode\relax}
906 \normaloverloadmode\zerocount}
907
908\aliased\let\popoverloadmode\relax
909
910\let\pushrunstate\relax
911\let\poprunstate \relax
912
913\newtoks\everydump
914
915\pushoverloadmode
916
917\permanent\protected\def\dump
918 {\the\everydump
919 \global\everydump\emptytoks
920 \pushoverloadmode
921 \enforced\glet\dump\relax
922 \popoverloadmode
923
924
925
926 \normaldump}
927
928\permanent\protected\def\input
929 {\normalinput}
930
931\popoverloadmode
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970\aliased\let\conditionalfalse\plusone
971\aliased\let\conditionaltrue \zerocount
972
973
974
975
976
977
978
979\permanent\protected\def\settrue #1{\enforced\let#1\conditionaltrue }
980\permanent\protected\def\setfalse #1{\enforced\let#1\conditionalfalse}
981\permanent\protected\def\setconditional#1{\enforced\let#1}
982
983\permanent\protected\def\settruevalue #1{\enforced\letcsname#1\endcsname\conditionaltrue }
984\permanent\protected\def\setfalsevalue#1{\enforced\letcsname#1\endcsname\conditionalfalse}
985
986
987\aliased\let\newconditional\setfalse
988\aliased\let\ifconditional \ifcase
989
990\permanent\protected\lettonothing\then
991
992\permanent\def\truecondition {\iftrue}
993\permanent\def\falsecondition{\iffalse}
994
995
996
997
998\permanent\def\quitcondition{\orelse\iffalse}
999
1000
1001
1002
1003
1004
1005
1006
1007
1008\permanent\protected\def\newmacro #1{\mutable\lettonothing#1}
1009\permanent\protected\def\setnewmacro#1{\mutable\let#1}
1010
1011\permanent\protected\def\newfraction#1{\mutable\let#1\!!plusone}
1012
1013\def\!!zerocount{0}
1014\def\!!plusone {1}
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030\aliased\let\ifzeropt\ifzerodim
1031\aliased\let\ifzero \ifzeronum
1032
1033
1034
1035
1036
1037
1038
1039
1040\newtoks\t_syst_toks_temp \let\m_syst_toks_temp\t_syst_toks_temp
1041
1042\permanent\protected\def\appendtotoks #1{\let\m_syst_toks_temp#1\afterassignment\syst_toks_append_l \t_syst_toks_temp=}
1043\permanent\protected\def\prependtotoks#1{\let\m_syst_toks_temp#1\afterassignment\syst_toks_prepend_l\t_syst_toks_temp=}
1044
1045
1046
1047
1048\permanent\protected\def\globalappendtotoks #1{\let\m_syst_toks_temp#1\afterassignment\syst_toks_append_g \t_syst_toks_temp=}
1049\permanent\protected\def\globalprependtotoks#1{\let\m_syst_toks_temp#1\afterassignment\syst_toks_prepend_g\t_syst_toks_temp=}
1050
1051\def\syst_toks_append_l {\normalexpanded{\m_syst_toks_temp{\the\m_syst_toks_temp\the\t_syst_toks_temp}}}
1052\def\syst_toks_prepend_l{\normalexpanded{\m_syst_toks_temp{\the\t_syst_toks_temp\the\m_syst_toks_temp}}}
1053
1054\def\syst_toks_append_g {\global\syst_toks_append_l }
1055\def\syst_toks_prepend_g{\global\syst_toks_prepend_l}
1056
1057\permanent\protected\def\addtotoks #1{\let\m_syst_toks_temp#1\afterassignment\syst_toks_add_l\let\next}
1058\permanent\protected\def\globaladdtotoks#1{\let\m_syst_toks_temp#1\afterassignment\syst_toks_add_g\let\next}
1059
1060\def\syst_toks_add_l{\m_syst_toks_temp\expandafter\bgroup\the\m_syst_toks_temp}
1061\def\syst_toks_add_g{\global\syst_toks_add_l}
1062
1063\permanent\protected\def\addtotokscs #1#2{#1{\the#1#2}}
1064\permanent\protected\def\globaladdtotokscs#1#2{\global#1{\the#1#2}}
1065
1066
1067
1068
1069
1070
1071
1072
1073\aliased\let\begcsname\begincsname
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090\permanent\protected\def\reseteverypar
1091 {\everypar\emptytoks}
1092
1093\aliased\let\endgraf\par
1094
1095
1096\permanent\protected\def\null{\hpack{}}
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112\def\obeylines {\catcode\endoflineasciicode\activecatcode\letcharcode\endoflineasciicode\par }
1113\def\obeyspaces{\catcode\spaceasciicode \activecatcode\letcharcode\spaceasciicode \space}
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124\let\syst_plain_body\relax
1125
1126\permanent\def\loop#1\repeat{\def\syst_plain_body{#1}\syst_plain_iterate}
1127
1128
1129
1130
1131\permanent\let\repeat\fi
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156\def\syst_plain_iterate
1157 {\syst_plain_body
1158 \expandafter\syst_plain_iterate\else\fi}
1159
1160
1161
1162\output{\shipout\box\normalpagebox}
1163
1164
1165
1166
1167\permanent\countdef\pageno\zerocount \pageno\plusone
1168
1169
1170
1171
1172\permanent\def\folio{\the\pageno}
1173
1174
1175
1176
1177\newgluespec \bigskipamount \bigskipamount = 12pt plus 4pt minus 4pt
1178\newgluespec \medskipamount \medskipamount = 6pt plus 2pt minus 2pt
1179\newgluespec \smallskipamount \smallskipamount = 3pt plus 1pt minus 1pt
1180
1181\baselineskip = 12pt
1182\lineskip = 1pt
1183\lineskiplimit = 0pt
1184
1185
1186
1187\ifdefined\vkern \else \permanent\protected\def\vkern {\ifhmode\par \fi\kern} \fi
1188\ifdefined\hkern \else \permanent\protected\def\hkern {\ifvmode\dontleavehmode\fi\kern} \fi
1189
1190\ifdefined\vpenalty \else \permanent\protected\def\vpenalty{\ifhmode\par \fi\penalty} \fi
1191\ifdefined\hpenalty \else \permanent\protected\def\hpenalty{\ifvmode\dontleavehmode\fi\penalty} \fi
1192
1193
1194
1195
1196\newgluespec \hideskip \hideskip = 1000pt plus 1fill
1197\newgluespec \centering \centering = 0pt plus 1000pt minus 1000pt
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207\newcount \mscount
1208
1209\permanent\def\spanomit{\span\omit}
1210
1211\permanent\def\multispan#1
1212 {\omit
1213 \mscount#1\relax
1214 \loop
1215 \ifnum\mscount>\plusone
1216 \spanomit \advanceby\mscount\minusone
1217 \repeat}
1218
1219\let\nopdfcompression \relax
1220\let\onlypdfobjectcompression\relax
1221\let\maximumpdfcompression \relax
1222\let\normalpdfcompression \relax
1223
1224
1225
1226
1227
1228
1229
1230\ifdefined\fmtname \else \immutable\def\fmtname {ConTeXt Initial TeX} \fi
1231\ifdefined\fmtversion \else \immutable\def\fmtversion{3.1415926} \fi
1232
1233
1234
1235
1236\permanent\def\modulonumber#1#2{\the\numexpr#2(#2:#1)*#1\relax}
1237\permanent\def\dividenumber#1#2{\the\numexpr(#2(#12))#1\relax}
1238
1239
1240
1241\immutable\edef\texenginename {\directlua{tex.print(LUATEXENGINE)}}
1242\immutable\edef\texengineversion {\directlua{tex.print(LUATEXVERSION)}}
1243\immutable\edef\texenginefunctionality{\directlua{tex.print(LUATEXFUNCTIONALITY)}}
1244
1245
1246
1247\savingvdiscards\plusone
1248
1249
1250
1251
1252\newcount\synctex
1253
1254
1255
1256
1257
1258
1259\matheqnogapstep\zerocount
1260
1261
1262
1263
1264\newcount\c_syst_helpers_n_of_namespaces \c_syst_helpers_n_of_namespaces\pluseight
1265
1266\def\v_interfaces_prefix_template_system{\the \c_syst_helpers_n_of_namespaces>>}
1267
1268
1269\protected\def\installsystemnamespace#1
1270 {\ifcsname ??#1\endcsname
1271 \immediate\write\statuswrite{fatal error: duplicate system namespace #1}
1272 \else
1273 \global\advanceby\c_syst_helpers_n_of_namespaces\plusone
1274 \immutable\cdefcsname ??#1\endcsname{\v_interfaces_prefix_template_system}
1275 \fi}
1276
1277
1278
1279\aliased\let\normalstartimath \Ustartmath
1280\aliased\let\normalstopimath \Ustopmath
1281\aliased\let\normalstartdmath \Ustartdisplaymath
1282\aliased\let\normalstopdmath \Ustopdisplaymath
1283
1284\aliased\let\normalUchar \tocharacter
1285
1286
1287
1288\aliased\let\Usuperscript \superscript
1289\aliased\let\Usubscript \subscript
1290\aliased\let\Uprimescript \primescript
1291\aliased\let\Unosuperscript \nosuperscript
1292\aliased\let\Unosubscript \nosubscript
1293\aliased\let\Usuperprescript \superprescript
1294\aliased\let\Usubprescript \subprescript
1295\aliased\let\Unosuperprescript \nosuperprescript
1296\aliased\let\Unosubprescript \nosubprescript
1297
1298\aliased\let\Ustack \mathstack
1299\aliased\let\Umathdict \mathdictionary
1300\aliased\let\Umathclass \mathclass
1301
1302\aliased\let\Ustyle \givenmathstyle
1303
1304\aliased\let\Uchar \tocharacter
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371\immutable\def\wildcardsymbol{*}
1372
1373
1374
1375\immutable\integerdef\eTeXversion 2
1376\immutable\def \eTeXrevision {.2}
1377
1378
1379
1380\aliased\let\immediateassigned\localcontrolled
1381
1382
1383
1384\mutable\let\nexttoken \relax
1385\mutable\let\next \relax
1386\mutable\let\nextnext \relax
1387\mutable\let\nextnextnext\relax
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397\mutable\let\on \relax
1398\mutable\let\of \relax
1399\mutable\let\and \relax
1400\mutable\let\with\relax
1401
1402\mutable\lettonothing\nop
1403\mutable\lettonothing\yes
1404
1405
1406
1407\def\syst_suggested_alias#1#2
1408 {\beginlocalcontrol
1409 \writestatus{suggestion}{use \string#2 instead of \string#1}
1410 \enforced\glet#1#2
1411 \endlocalcontrol
1412 #2}
1413
1414\permanent\protected\def\suggestedalias#1#2
1415 {\ifflags#2\permanent\permanent\fi
1416 \def#1{\syst_suggested_alias#1#2}}
1417
1418
1419
1420
1421
1422
1423
1424
1425\suggestedalias \count@ \scratchcounter
1426\suggestedalias \dimen@ \scratchdimen
1427\suggestedalias \dimen@i \scratchdimenone
1428\suggestedalias \dimen@ii \scratchdimentwo
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459\permanent\countdef\c_syst_local_count = 231 \c_syst_local_count = \c_syst_max_allocated_count
1460\permanent\countdef\c_syst_local_dimen = 232 \c_syst_local_dimen = \c_syst_max_allocated_dimen
1461\permanent\countdef\c_syst_local_skip = 233 \c_syst_local_skip = \c_syst_max_allocated_skip
1462\permanent\countdef\c_syst_local_muskip = 234 \c_syst_local_muskip = \c_syst_max_allocated_muskip
1463\permanent\countdef\c_syst_local_box = 235 \c_syst_local_box = \c_syst_max_allocated_box
1464\permanent\countdef\c_syst_local_toks = 236 \c_syst_local_toks = \c_syst_max_allocated_toks
1465\permanent\countdef\c_syst_local_read = 237 \c_syst_local_read = \c_syst_max_allocated_read
1466\permanent\countdef\c_syst_local_write = 238 \c_syst_local_write = \c_syst_max_allocated_write
1467
1468\c_syst_max_allocated_count \numexpr\c_syst_max_allocated_count :2\relax
1469\c_syst_max_allocated_dimen \numexpr\c_syst_max_allocated_dimen :2\relax
1470\c_syst_max_allocated_skip \numexpr\c_syst_max_allocated_skip :2\relax
1471\c_syst_max_allocated_muskip \numexpr\c_syst_max_allocated_muskip :2\relax
1472\c_syst_max_allocated_toks \numexpr\c_syst_max_allocated_toks :2\relax
1473\c_syst_max_allocated_box \numexpr\c_syst_max_allocated_box :2\relax
1474\c_syst_max_allocated_read \numexpr\c_syst_max_allocated_read :2\relax
1475\c_syst_max_allocated_write \numexpr\c_syst_max_allocated_write :2\relax
1476
1477\permanent\protected\def\syst_local_overflow#1#2{\writestatus\m!system{no room for local #1 \string#2}\wait}
1478
1479\permanent\protected\def\setnewlocalcount#1
1480 {\ifnum\c_syst_local_count>\c_syst_max_allocated_count
1481 \advanceby\c_syst_local_count\minusone
1482 \overloaded\frozen\countdef#1\c_syst_local_count
1483 \else
1484 \syst_local_overflow_count#1
1485 \fi
1486 #1}
1487
1488\permanent\protected\def\setnewlocaldimen#1
1489 {\ifnum\c_syst_local_dimen>\c_syst_max_allocated_dimen
1490 \advanceby\c_syst_local_dimen\minusone\dimendef#1\c_syst_local_dimen
1491 \else
1492 \syst_local_overflow_dimen#1
1493 \fi
1494 #1}
1495
1496\permanent\protected\def\setnewlocalskip#1
1497 {\ifnum\c_syst_local_skip>\c_syst_max_allocated_skip
1498 \advanceby\c_syst_local_skip\minusone
1499 \overloaded\frozen\skipdef#1\c_syst_local_skip
1500 \else
1501 \syst_local_overflow_skip#1
1502 \fi
1503 #1}
1504
1505\permanent\protected\def\setnewlocalmuskip#1
1506 {\ifnum\c_syst_local_muskip>\c_syst_max_allocated_muskip
1507 \advanceby\c_syst_local_muskip\minusone
1508 \overloaded\frozen\muskipdef#1\c_syst_local_muskip
1509 \else
1510 \syst_local_overflow_muskip#1
1511 \fi
1512 #1}
1513
1514\permanent\protected\def\setnewlocaltoks#1
1515 {\ifnum\c_syst_local_toks>\c_syst_max_allocated_toks
1516 \advanceby\c_syst_local_toks\minusone
1517 \overloaded\frozen\toksdef#1\c_syst_local_toks
1518 \else
1519 \syst_local_overflow_toks#1
1520 \fi
1521 #1}
1522
1523\permanent\protected\def\setnewlocalbox#1
1524 {\ifnum\c_syst_local_box>\c_syst_max_allocated_box
1525 \advanceby\c_syst_local_box\minusone
1526 \overloaded\frozen\integerdef#1\c_syst_local_box
1527 \else
1528 \syst_local_overflow_box#1
1529 \fi
1530 \setbox#1}
1531
1532\permanent\protected\def\newlocalread#1
1533 {\ifnum\c_syst_local_read>\c_syst_max_allocated_read
1534 \advanceby\c_syst_local_read\minusone
1535 \overloaded\frozen\integerdef#1\c_syst_local_read
1536 \else
1537 \syst_local_overflow_read#1
1538 \fi}
1539
1540\permanent\protected\def\newlocalwrite#1
1541 {\ifnum\c_syst_local_write>\c_syst_max_allocated_write
1542 \advanceby\c_syst_local_write\minusone
1543 \overloaded\frozen\integerdef#1\c_syst_local_write
1544 \else
1545 \syst_local_overflow_write#1
1546 \fi}
1547
1548
1549
1550\permanent\protected\def\syst_local_overflow_count {\syst_local_overflow {count}}
1551\permanent\protected\def\syst_local_overflow_dimen {\syst_local_overflow {dimen}}
1552\permanent\protected\def\syst_local_overflow_skip {\syst_local_overflow {skip}}
1553\permanent\protected\def\syst_local_overflow_muskip{\syst_local_overflow{muskip}}
1554\permanent\protected\def\syst_local_overflow_toks {\syst_local_overflow {toks}}
1555\permanent\protected\def\syst_local_overflow_box {\syst_local_overflow {box}}
1556\permanent\protected\def\syst_local_overflow_read {\syst_local_overflow {read}}
1557\permanent\protected\def\syst_local_overflow_write {\syst_local_overflow {write}}
1558
1559
1560
1561
1562\permanent\protected\def\newlocalcount #1{\setnewlocalcount #1\zerocount }
1563\permanent\protected\def\newlocaldimen #1{\setnewlocaldimen #1\zeropoint }
1564\permanent\protected\def\newlocalskip #1{\setnewlocalskip #1\zeroskip }
1565\permanent\protected\def\newlocalmuskip#1{\setnewlocalmuskip#1\zeromuskip}
1566\permanent\protected\def\newlocaltoks #1{\setnewlocaltoks #1\emptytoks }
1567\permanent\protected\def\newlocalbox #1{\setnewlocalbox #1\emptybox }
1568
1569
1570
1571\tracinglevels\plusthree
1572
1573\permanent\protected\def\tracingcatcodes{\tracinglevels\plusseven}
1574
1575
1576
1577\tracinghyphenation\plusone
1578
1579
1580
1581\let\ifexpression\ifnumexpression
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606\autoparagraphmode\plusone
1607
1608
1609
1610
1611\tracingfullboxes\zerocount
1612
1613
1614
1615
1616
1617
1618
1619\ifdefined\mathpunctuation \else \let\mathpunctuation\mathpunct \fi
1620
1621
1622
1623\ifdefined\linebreakcriterion \aliased\let\linebreakcriterium \linebreakcriterion \fi
1624\ifdefined\ignoredepthcriterion \aliased\let\ignoredepthcriterium\ignoredepthcriterion \fi
1625
1626
1627
1628\permanent\protected\def\if_false{\iffalse}
1629\permanent\protected\def\if_true {\iftrue}
1630
1631
1632
1633\permanent\untraced\def\localcontrolledrepeating{\localcontrolledrepeat\maxcount}
1634\permanent\untraced\def\expandedrepeating {\expandedrepeat \maxcount}
1635\permanent\untraced\def\unexpandedrepeating {\unexpandedrepeat \maxcount}
1636
1637\aliased\let\lastchkinteger\lastchknumber
1638\aliased\let\ifchkinteger \ifchknumber
1639
1640
1641
1642\permanent\untraced\def\userunitcode#1#2
1643 {\numexpr(#1\alowercaseasciicode)*26(#2\alowercaseasciicode)\relax}
1644
1645\permanent\protected\def\newuserunit#1#2#3
1646 {\associateunit#1=\numexpr(#2\alowercaseasciicode)*26(#3\alowercaseasciicode)\relax}
1647
1648\newdimension\piunit \piunit 3.1415926535898pt
1649\newdimension\ftunit \ftunit 12in
1650\newdimension\uunit \uunit 1cm
1651
1652\newuserunit \piunit pi
1653\newuserunit \ftunit ft
1654\newuserunit \uunit uu
1655
1656
1657
1658\parametermode \plusone
1659
1660
1661
1662\ifdefined\protecteddetokenize\else
1663 \aliased\let\protecteddetokenize\detokenize
1664\fi
1665
1666
1667
1668\let\boxwidth \wd
1669\let\boxheight\ht
1670\let\boxdepth \dp
1671
1672\protect \endinput
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685 |