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\colonasciicode 58
145\immutable\integerdef\lessthanasciicode 60
146\immutable\integerdef\morethanasciicode 62
147\immutable\integerdef\questionmarkasciicode 63
148\immutable\integerdef\atsignasciicode 64
149\immutable\integerdef\leftbracketasciicode 91
150\immutable\integerdef\backslashasciicode 92
151\immutable\integerdef\rightbracketasciicode 93
152\immutable\integerdef\circumflexasciicode 94
153\immutable\integerdef\underscoreasciicode 95
154\immutable\integerdef\leftbraceasciicode 123
155\immutable\integerdef\barasciicode 124
156\immutable\integerdef\rightbraceasciicode 125
157\immutable\integerdef\tildeasciicode 126
158\immutable\integerdef\delasciicode 127
159
160\aliased\let\percentasciicode\commentasciicode
161
162
163\catcode\tabasciicode \spacecatcode
164\catcode\formfeedasciicode \activecatcode
165
166\catcode\endoffileasciicode \ignorecatcode
167
168\catcode\hashasciicode \parametercatcode
169\catcode\dollarasciicode \mathshiftcatcode
170
171\catcode\ampersandasciicode \alignmentcatcode
172
173\catcode\circumflexasciicode \superscriptcatcode
174\catcode\underscoreasciicode \subscriptcatcode
175\catcode\leftbraceasciicode \begingroupcatcode
176\catcode\rightbraceasciicode \endgroupcatcode
177\catcode\tildeasciicode \activecatcode
178
179
180
181
182
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\directlua {
219 tex.enableprimitives("normal",true)
220 function tex.enableprimitives() end
221}
222
223\untraced\permanent\let\undefined\undefined
224
225\immutable\def\space{ }
226\immutable\def\empty{}
227\mutable \def\temp {}
228
229\immutable\letcharcode \formfeedasciicode \par
230\immutable\letcharcode \tildeasciicode \
231\immutable\letcharcode \spaceasciicode \space
232
233\immutable\defcsname\Uchar\tabasciicode \endcsname {\ }
234\immutable\defcsname\Uchar\formfeedasciicode \endcsname {\par}
235\immutable\defcsname\Uchar\endoflineasciicode\endcsname {\ }
236
237
238
239\permanent\def\gobbleoneargument#{}
240
241
242
243
244\def\unprotect
245 {\edef\protect
246 {\catcode\atsignasciicode \the\catcode\atsignasciicode \relax
247 \catcode\exclamationmarkasciicode\the\catcode\exclamationmarkasciicode\relax
248 \catcode\questionmarkasciicode \the\catcode\questionmarkasciicode \relax
249 \catcode\underscoreasciicode \the\catcode\underscoreasciicode \relax
250 \let\protect\relax}
251 \catcode\atsignasciicode \lettercatcode
252 \catcode\exclamationmarkasciicode\lettercatcode
253 \catcode\questionmarkasciicode \lettercatcode
254 \catcode\underscoreasciicode \lettercatcode}
255
256\let\protect\relax
257
258\unprotect
259
260
261
262\immutable\let\bgroup={
263\immutable\let\egroup=}
264
265
266
267
268
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\permanent\countdef\c_syst_min_allocated_register = 201 \c_syst_min_allocated_register = 256
304\permanent\countdef\c_syst_max_allocated_register = 202 \c_syst_max_allocated_register = 65535
305\permanent\countdef\c_syst_min_allocated_iohandle = 203 \c_syst_min_allocated_iohandle = 0
306\permanent\countdef\c_syst_max_allocated_iohandle = 204 \c_syst_max_allocated_iohandle = 1023
307\permanent\countdef\c_syst_min_allocated_attribute = 205 \c_syst_min_allocated_attribute = 1024
308\permanent\countdef\c_syst_min_allocated_mark = 206 \c_syst_min_allocated_mark = 16
309\permanent\countdef\c_syst_max_allocated_mark = 207 \c_syst_max_allocated_mark = 1024
310
311\permanent\countdef\c_syst_last_allocated_count = 211 \c_syst_last_allocated_count = \c_syst_min_allocated_register
312\permanent\countdef\c_syst_last_allocated_dimen = 212 \c_syst_last_allocated_dimen = \c_syst_min_allocated_register
313\permanent\countdef\c_syst_last_allocated_skip = 213 \c_syst_last_allocated_skip = \c_syst_min_allocated_register
314\permanent\countdef\c_syst_last_allocated_muskip = 214 \c_syst_last_allocated_muskip = \c_syst_min_allocated_register
315\permanent\countdef\c_syst_last_allocated_box = 215 \c_syst_last_allocated_box = \c_syst_min_allocated_register
316\permanent\countdef\c_syst_last_allocated_toks = 216 \c_syst_last_allocated_toks = \c_syst_min_allocated_register
317\permanent\countdef\c_syst_last_allocated_read = 217 \c_syst_last_allocated_read = \c_syst_min_allocated_iohandle
318\permanent\countdef\c_syst_last_allocated_write = 218 \c_syst_last_allocated_write = \c_syst_min_allocated_iohandle
319\permanent\countdef\c_syst_last_allocated_marks = 219 \c_syst_last_allocated_marks = \c_syst_min_allocated_mark
320
321\permanent\countdef\c_syst_min_counter_value = 253 \c_syst_min_counter_value = "7FFFFFFF
322\permanent\countdef\c_syst_max_counter_value = 254 \c_syst_max_counter_value = "7FFFFFFF
323
324\immutable\integerdef\zerocount 0
325\immutable\integerdef\plusone 1
326\immutable\integerdef\minusone 1
327
328\immutable\integerdef\normalpagebox 255
329
330\immutable\integerdef\statuswrite \minusone
331
332
333
334
335
336
337\permanent\let\wlog\gobbleoneargument
338
339
340
341
342\permanent\protected\def\newcount {\syst_basics_allocate\c_syst_last_allocated_count \count \countdef \c_syst_max_allocated_register}
343\permanent\protected\def\newdimen {\syst_basics_allocate\c_syst_last_allocated_dimen \dimen \dimendef \c_syst_max_allocated_register}
344\permanent\protected\def\newskip {\syst_basics_allocate\c_syst_last_allocated_skip \skip \skipdef \c_syst_max_allocated_register}
345\permanent\protected\def\newmuskip{\syst_basics_allocate\c_syst_last_allocated_muskip\muskip\muskipdef \c_syst_max_allocated_register}
346\permanent\protected\def\newbox {\syst_basics_allocate\c_syst_last_allocated_box \box \integerdef\c_syst_max_allocated_register}
347\permanent\protected\def\newtoks {\syst_basics_allocate\c_syst_last_allocated_toks \toks \toksdef \c_syst_max_allocated_register}
348\permanent\protected\def\newread {\syst_basics_allocate\c_syst_last_allocated_read \read \integerdef\c_syst_max_allocated_iohandle}
349\permanent\protected\def\newwrite {\syst_basics_allocate\c_syst_last_allocated_write \write \integerdef\c_syst_max_allocated_iohandle}
350\permanent\protected\def\newmarks {\syst_basics_allocate\c_syst_last_allocated_marks \marks \integerdef\c_syst_max_allocated_mark }
351
352\firstvalidlanguage \plusone
353
354
355
356
357\permanent\protected\def\setconstant {}
358\permanent\protected\def\setconstantvalue#1#2{\csname#1\endcsname\numexpr#2\relax}
359
360\permanent\protected\def\newconstant#1
361 {\ifrelax#1
362
363 \unletfrozen#1
364 \newcount#1
365 \orelse\ifdefined#1
366
367 \else
368 \newcount#1
369 \fi}
370
371\permanent\protected\def\setnewconstant#1{\newconstant#1#1}
372
373
374
375\newlinechar\newlineasciicode \permanent\edef\outputnewlinechar{\Uchar\newlineasciicode}
376
377
378
379
380
381
382
383
384
385
386\ifdefined\writestatus \else
387
388 \frozen\protected\def\writestatus#1#2{\message{#1: #2}}
389\fi
390
391\def\syst_basics_allocate_yes#1#2#3#4#5
392 {\ifnum#1<#4\relax
393 \global\advance#1\plusone
394 \permanent\global#3#5=#1\relax
395 \else
396 \writestatus{warning}{no room for \string#2\space \string#5\space (max: \number#4)}
397 \fi}
398
399\def\syst_basics_allocate_nop#1#2#3#4#5
400 {\writestatus{warning}{\string#2 \string#5 is already defined (\string\relax\space it first)}}
401
402\def\syst_basics_allocate#1#2#3#4#5
403 {\ifrelax#5
404 \expandafter\syst_basics_allocate_yes
405 \orelse\ifdefined#5
406 \expandafter\syst_basics_allocate_nop
407 \else
408 \expandafter\syst_basics_allocate_yes
409 \fi
410 #1#2#3#4#5}
411
412
413
414
415
416
417
418
419
420
421
422
423\immutable\integerdef\attributeunsetvalue\c_syst_min_counter_value
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442\newcount \scratchcounter \newcount \globalscratchcounter \newcount \privatescratchcounter
443\newdimen \scratchdimen \newdimen \globalscratchdimen \newdimen \privatescratchdimen
444\newskip \scratchskip \newskip \globalscratchskip \newskip \privatescratchskip
445\newmuskip\scratchmuskip \newmuskip\globalscratchmuskip \newmuskip\privatescratchmuskip
446\newtoks \scratchtoks \newtoks \globalscratchtoks \newtoks \privatescratchtoks
447\newbox \scratchbox \newbox \globalscratchbox \newbox \privatescratchbox
448
449\newcount \scratchcounterone \newcount \scratchcountertwo \newcount \scratchcounterthree
450\newdimen \scratchdimenone \newdimen \scratchdimentwo \newdimen \scratchdimenthree
451\newskip \scratchskipone \newskip \scratchskiptwo \newskip \scratchskipthree
452\newmuskip \scratchmuskipone \newmuskip \scratchmuskiptwo \newmuskip \scratchmuskipthree
453\newtoks \scratchtoksone \newtoks \scratchtokstwo \newtoks \scratchtoksthree
454\newbox \scratchboxone \newbox \scratchboxtwo \newbox \scratchboxthree
455
456\newcount \scratchcounterfour \newcount \scratchcounterfive \newcount \scratchcountersix
457\newdimen \scratchdimenfour \newdimen \scratchdimenfive \newdimen \scratchdimensix
458\newskip \scratchskipfour \newskip \scratchskipfive \newskip \scratchskipsix
459\newmuskip \scratchmuskipfour \newmuskip \scratchmuskipfive \newmuskip \scratchmuskipsix
460\newtoks \scratchtoksfour \newtoks \scratchtoksfive \newtoks \scratchtokssix
461\newbox \scratchboxfour \newbox \scratchboxfive \newbox \scratchboxsix
462
463\newcount\globalscratchcounterone
464\newcount\globalscratchcountertwo
465\newcount\globalscratchcounterthree
466
467\mutable\let\scratchmacro \relax
468\mutable\let\scratchmacroone\relax
469\mutable\let\scratchmacrotwo\relax
470
471
472
473
474\mutable\let\tempstring \empty
475
476\mutable\let\scratchstring \empty
477\mutable\let\scratchstringone\empty
478\mutable\let\scratchstringtwo\empty
479
480
481
482
483
484
485\newdimen\scratchwidth
486\newdimen\scratchheight
487\newdimen\scratchdepth
488\newdimen\scratchtotal
489
490\newdimen\scratchoffset
491\newdimen\scratchleftoffset
492\newdimen\scratchrightoffset
493\newdimen\scratchtopoffset
494\newdimen\scratchbottomoffset
495
496\newdimen\scratchdistance
497
498\newdimen\scratchhsize
499\newdimen\scratchvsize
500
501\newdimen\scratchxoffset
502\newdimen\scratchyoffset
503\newdimen\scratchhoffset
504\newdimen\scratchvoffset
505
506\newdimen\scratchxposition
507\newdimen\scratchyposition
508
509\newcount\scratchnx
510\newcount\scratchny
511
512\newcount\scratchmx
513\newcount\scratchmy
514
515\newcount\scratchmin
516\newcount\scratchmax
517
518\newcount\scratchunicode
519
520\newdimen\scratchleftskip
521\newdimen\scratchrightskip
522\newdimen\scratchtopskip
523\newdimen\scratchbottomskip
524
525
526
527
528
529
530
531
532
533
534
535
536
537\immutable\integerdef \maxcount 2147483647
538
539\immutable\dimensiondef \zeropoint 0pt
540\immutable\dimensiondef \onepoint 1pt
541\immutable\dimensiondef \halfapoint 0.5pt
542\immutable\dimensiondef \maxdimen 16383.99999pt
543\immutable\dimensiondef \onebasepoint 1bp
544\immutable\dimensiondef \scaledpoint 1sp
545\immutable\dimensiondef \thousandpoint 1000pt
546
547\immutable\gluespecdef \zeroskip 0pt plus 0pt minus 0pt
548
549\immutable\mugluespecdef \zeromuskip 0mu
550\immutable\mugluespecdef \onemuskip 1mu
551\immutable\mugluespecdef \muquad 18mu
552
553\aliased\let\points \onepoint
554\aliased\let\halfpoint\halfapoint
555
556\newtoks \emptytoks
557
558
559
560
561
562
563\immutable\integerdef\minustwo 2
564
565
566\immutable\integerdef\plustwo 2
567\immutable\integerdef\plusthree 3
568\immutable\integerdef\plusfour 4
569\immutable\integerdef\plusfive 5
570\immutable\integerdef\plussix 6
571\immutable\integerdef\plusseven 7
572\immutable\integerdef\pluseight 8
573\immutable\integerdef\plusnine 9
574\immutable\integerdef\plusten 10
575\immutable\integerdef\pluseleven 11
576\immutable\integerdef\plustwelve 12
577\immutable\integerdef\plussixteen 16
578\immutable\integerdef\plusfifty 50
579\immutable\integerdef\plushundred 100
580\immutable\integerdef\plusonehundred 100
581\immutable\integerdef\plustwohundred 200
582\immutable\integerdef\plusfivehundred 500
583\immutable\integerdef\pluscxxvii 127
584\immutable\integerdef\pluscxxviii 128
585\immutable\integerdef\pluscclv 255
586\immutable\integerdef\pluscclvi 256
587\immutable\integerdef\plusthousand 1000
588\immutable\integerdef\plustenthousand 10000
589\immutable\integerdef\plustwentythousand 20000
590\immutable\integerdef\medcard 32768
591\immutable\integerdef\maxcard 65536
592\immutable\integerdef\maxcardminusone 65535
593
594
595
596
597
598
599\permanent\let\singleexpandafter \expandafter
600\permanent\def\doubleexpandafter{\expandafter\expandafter\expandafter}
601\permanent\def\tripleexpandafter{\expandafter\doubleexpandafter\expandafter}
602
603
604
605
606\newbox\voidbox
607
608\permanent\def\unvoidbox{\unhbox\voidbox}
609\permanent\def\emptybox {\box \voidbox}
610\permanent\def\emptyvbox{\normalvpack{}}
611\permanent\def\emptyhbox{\normalhpack{}}
612
613\aliased\let\leavevmode\unvoidbox
614
615
616
617
618
619
620
621
622
623
624
625
626\permanent\protected\def\dontcomplain
627 {\hbadness\plustenthousand
628 \vbadness\plustenthousand
629 \hfuzz \maxdimen
630 \vfuzz \maxdimen}
631
632\permanent\protected\def\lessboxtracing
633 {\showboxdepth \plusthree
634 \showboxbreadth\plusfive}
635
636
637
638
639\aliased\let\p@ \onepoint
640\aliased\let\m@ne \minusone
641\aliased\let\z@ \zeropoint
642\aliased\let\@ne \plusone
643\aliased\let\tw@ \plustwo
644\aliased\let\thr@@ \plusthree
645\aliased\let\sixt@@n\plussixteen
646\aliased\let\@cclv \pluscclv
647\aliased\let\@cclvi \pluscclvi
648\aliased\let\voidb@x\voidbox
649
650\newtoks \toks@
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696\permanent\protected\def\newif#1
697 {\permanent\protected\gdefcsname\expandafter\new_if_check\csstring#1true\endcsname {\overloaded\frozen\let#1\iftrue }
698 \permanent\protected\gdefcsname\expandafter\new_if_check\csstring#1false\endcsname{\overloaded\frozen\let#1\iffalse}
699 \csname\expandafter\new_if_check\csstring#1false\endcsname}
700
701\normalexpanded{\gdef\noexpand\new_if_check\string i\string f{}}
702
703
704
705\newif\ifdone
706\newif\iffound
707
708\newif\ifscratchcondition
709\newif\ifscratchconditionone
710\newif\ifscratchconditiontwo
711
712
713
714
715\aliased\let\htdp\boxtotal
716
717
718
719
720
721
722
723
724
725
726\permanent\protected\def\defUmathtopaccent #1#2#3#4{\global\immutable\protected\def#1{\Umathaccent "#2 "#3 "#4 }}
727\permanent\protected\def\defUmathbotaccent #1#2#3#4{\global\immutable\protected\def#1{\Umathbotaccent "#2 "#3 "#4 }}
728\permanent\protected\def\defUdelimiterover #1#2#3#4{\global\immutable\protected\def#1{\Udelimiterover "#2 "#3 }}
729\permanent\protected\def\defUdelimiterunder #1#2#3#4{\global\immutable\protected\def#1{\Udelimiterunder "#2 "#3 }}
730\permanent\protected\def\defUdelimiter #1#2#3#4{\global\immutable\protected\def#1{\Udelimiter "#2 "#3 "#4 }}
731\permanent\protected\def\defUradical #1#2#3{\global\immutable\protected\def#1{\Uradical "#2 "#3 }}
732\permanent\protected\def\defUroot #1#2#3{\global\immutable\protected\def#1{\Uroot "#2 "#3 }}
733\permanent\protected\def\defUmathchar #1#2#3#4{\global\immutable\Umathchardef #1 "#2 "#3 "#4 }
734
735
736
737
738\aliased\let\active\activecatcode
739
740
741
742\immutable\integerdef\batchmodecode \zerocount
743\immutable\integerdef\nonstopmodecode \plusone
744\immutable\integerdef\scrollmodecode \plustwo
745\immutable\integerdef\errorstopmodecode \plusthree
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765\permanent\protected\def\tracingall
766 {\tracingonline \plusone
767 \tracingcommands \plusfour
768 \tracingmacros \plusthree
769 \tracingoutput \plusone
770 \tracingpages \plusone
771 \tracingparagraphs\plustwo
772 \tracingrestores \plusone
773 \tracinggroups \plusone
774 \tracingifs \plusone
775 \tracingnesting \plusthree
776 \tracingassigns \plustwo
777 \tracingmath \plusone
778 \tracingalignments\plustwo
779 \showboxbreadth \maxcount
780 \showboxdepth \maxcount}
781
782\permanent\protected\def\tracingless
783 {\tracingall
784 \tracingoutput \zerocount
785 \showboxbreadth \maxcount
786 \showboxdepth \plusten}
787
788\permanent\protected\def\loggingall
789 {\tracingall
790 \tracingonline \zerocount}
791
792\permanent\protected\def\tracingnone
793 {\showboxdepth \maxcount
794 \showboxbreadth \plusten
795 \tracingalignments\zerocount
796 \tracingmath \zerocount
797 \tracingassigns \zerocount
798 \tracingnesting \zerocount
799 \tracingifs \zerocount
800 \tracinggroups \zerocount
801 \tracingrestores \zerocount
802 \tracingparagraphs\zerocount
803 \tracingpages \zerocount
804 \tracingoutput \zerocount
805 \tracingmacros \zerocount
806 \tracingcommands \zerocount
807 \tracingonline \zerocount}
808
809
810
811\showboxdepth \maxcount
812\showboxbreadth\maxcount
813
814
815
816\tracingstats\plusone
817
818
819
820\permanent\def\pushoverloadmode
821 {\enforced\permanent\protected\edef\popoverloadmode{\overloadmode\the\overloadmode\enforced\let\popoverloadmode\relax}
822 \overloadmode\zerocount}
823
824\aliased\let\popoverloadmode\relax
825
826\let\pushrunstate\relax
827\let\poprunstate \relax
828
829\newtoks\everydump
830
831\pushoverloadmode
832
833\permanent\protected\def\dump
834 {\the\everydump
835 \global\everydump\emptytoks
836 \pushoverloadmode
837 \enforced\glet\dump\relax
838 \popoverloadmode
839
840
841
842 \normaldump}
843
844\permanent\protected\def\input
845 {\normalinput}
846
847\popoverloadmode
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886\aliased\let\conditionalfalse\plusone
887\aliased\let\conditionaltrue \zerocount
888
889
890
891
892
893
894
895\permanent\protected\def\settrue #1{\enforced\let#1\conditionaltrue }
896\permanent\protected\def\setfalse #1{\enforced\let#1\conditionalfalse}
897\permanent\protected\def\setconditional#1{\enforced\let#1}
898
899\permanent\protected\def\settruevalue #1{\enforced\letcsname#1\endcsname\conditionaltrue }
900\permanent\protected\def\setfalsevalue#1{\enforced\letcsname#1\endcsname\conditionalfalse}
901
902
903\aliased\let\newconditional\setfalse
904\aliased\let\ifconditional \ifcase
905
906\permanent\protected\lettonothing\then
907
908\permanent\def\truecondition {\iftrue}
909\permanent\def\falsecondition{\iffalse}
910
911
912
913
914\permanent\def\quitcondition{\orelse\iffalse}
915
916
917
918
919
920
921
922
923
924\permanent\protected\def\newmacro #1{\mutable\let#1\empty}
925\permanent\protected\def\setnewmacro#1{\mutable\let#1}
926
927\permanent\protected\def\newfraction#1{\mutable\let#1\!!plusone}
928
929\def\!!zerocount{0}
930\def\!!plusone {1}
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946\aliased\let\ifzeropt\ifcase
947
948
949
950
951
952
953
954
955\newtoks\t_syst_toks_temp \let\m_syst_toks_temp\t_syst_toks_temp
956
957\permanent\protected\def\appendtotoks #1{\let\m_syst_toks_temp#1\afterassignment\syst_toks_append_l \t_syst_toks_temp=}
958\permanent\protected\def\prependtotoks#1{\let\m_syst_toks_temp#1\afterassignment\syst_toks_prepend_l\t_syst_toks_temp=}
959
960
961
962
963\permanent\protected\def\globalappendtotoks #1{\let\m_syst_toks_temp#1\afterassignment\syst_toks_append_g \t_syst_toks_temp=}
964\permanent\protected\def\globalprependtotoks#1{\let\m_syst_toks_temp#1\afterassignment\syst_toks_prepend_g\t_syst_toks_temp=}
965
966\def\syst_toks_append_l {\normalexpanded{\m_syst_toks_temp{\the\m_syst_toks_temp\the\t_syst_toks_temp}}}
967\def\syst_toks_prepend_l{\normalexpanded{\m_syst_toks_temp{\the\t_syst_toks_temp\the\m_syst_toks_temp}}}
968
969\def\syst_toks_append_g {\global\syst_toks_append_l }
970\def\syst_toks_prepend_g{\global\syst_toks_prepend_l}
971
972\permanent\protected\def\addtotoks #1{\let\m_syst_toks_temp#1\afterassignment\syst_toks_add_l\let\next}
973\permanent\protected\def\globaladdtotoks#1{\let\m_syst_toks_temp#1\afterassignment\syst_toks_add_g\let\next}
974
975\def\syst_toks_add_l{\m_syst_toks_temp\expandafter\bgroup\the\m_syst_toks_temp}
976\def\syst_toks_add_g{\global\syst_toks_add_l}
977
978\permanent\protected\def\addtotokscs #1#2{#1{\the#1#2}}
979\permanent\protected\def\globaladdtotokscs#1#2{\global#1{\the#1#2}}
980
981
982
983
984
985
986
987
988\aliased\let\begcsname\begincsname
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005\permanent\protected\def\reseteverypar
1006 {\everypar\emptytoks}
1007
1008\aliased\let\endgraf\par
1009
1010
1011\permanent\protected\def\null{\hpack{}}
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027\def\obeylines {\catcode\endoflineasciicode\activecatcode\letcharcode\endoflineasciicode\par }
1028\def\obeyspaces{\catcode\spaceasciicode \activecatcode\letcharcode\spaceasciicode \space}
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039\let\syst_plain_body\relax
1040
1041\permanent\def\loop#1\repeat{\def\syst_plain_body{#1}\syst_plain_iterate}
1042
1043
1044
1045
1046\permanent\let\repeat\fi
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071\def\syst_plain_iterate
1072 {\syst_plain_body
1073 \expandafter\syst_plain_iterate\else\fi}
1074
1075
1076
1077\output{\shipout\box\normalpagebox}
1078
1079
1080
1081
1082\permanent\countdef\pageno\zerocount \pageno\plusone
1083
1084
1085
1086
1087\permanent\def\folio{\the\pageno}
1088
1089
1090
1091
1092\newskip \bigskipamount \bigskipamount = 12pt plus 4pt minus 4pt
1093\newskip \medskipamount \medskipamount = 6pt plus 2pt minus 2pt
1094\newskip \smallskipamount \smallskipamount = 3pt plus 1pt minus 1pt
1095
1096\baselineskip = 12pt
1097\lineskip = 1pt
1098\lineskiplimit = 0pt
1099
1100
1101
1102\permanent\protected\def\vkern {\ifhmode\par \fi\kern}
1103\permanent\protected\def\hkern {\ifvmode\dontleavehmode\fi\kern}
1104
1105\permanent\protected\def\vpenalty{\ifhmode\par \fi\penalty}
1106\permanent\protected\def\hpenalty{\ifvmode\dontleavehmode\fi\penalty}
1107
1108
1109
1110
1111\newskip \hideskip \hideskip = 1000pt plus 1fill
1112\newskip \centering \centering = 0pt plus 1000pt minus 1000pt
1113
1114\permanent\def\hidewidth
1115 {\hskip\hideskip}
1116
1117\permanent\def\ialign
1118 {\everycr\emptytoks
1119 \tabskip\zeroskip
1120 \halign}
1121
1122\newcount \mscount
1123
1124\permanent\def\spanomit{\span\omit}
1125
1126\permanent\def\multispan#1
1127 {\omit
1128 \mscount#1\relax
1129 \loop
1130 \ifnum\mscount>\plusone
1131 \spanomit \advance\mscount\minusone
1132 \repeat}
1133
1134\let\nopdfcompression \relax
1135\let\onlypdfobjectcompression\relax
1136\let\maximumpdfcompression \relax
1137\let\normalpdfcompression \relax
1138
1139
1140
1141
1142
1143
1144
1145\ifdefined\fmtname \else \immutable\def\fmtname {ConTeXt Initial TeX} \fi
1146\ifdefined\fmtversion \else \immutable\def\fmtversion{3.1415926} \fi
1147
1148
1149
1150
1151\permanent\def\modulonumber#1#2{\the\numexpr#2(#2:#1)*#1\relax}
1152\permanent\def\dividenumber#1#2{\the\numexpr(#2(#12))#1\relax}
1153
1154
1155
1156\immutable\edef\texenginename {\directlua{tex.print(LUATEXENGINE)}}
1157\immutable\edef\texengineversion {\directlua{tex.print(LUATEXVERSION)}}
1158\immutable\edef\texenginefunctionality{\directlua{tex.print(LUATEXFUNCTIONALITY)}}
1159
1160
1161
1162\savingvdiscards\plusone
1163
1164
1165
1166
1167\newcount\synctex
1168
1169
1170
1171
1172
1173
1174\matheqnogapstep\zerocount
1175
1176
1177
1178
1179\newcount\c_syst_helpers_n_of_namespaces \c_syst_helpers_n_of_namespaces\pluseight
1180
1181\def\v_interfaces_prefix_template_system{\number \c_syst_helpers_n_of_namespaces>>}
1182
1183
1184\protected\def\installsystemnamespace#1
1185 {\ifcsname ??#1\endcsname
1186 \immediate\write\statuswrite{fatal error: duplicate system namespace #1}
1187 \else
1188 \global\advance\c_syst_helpers_n_of_namespaces\plusone
1189 \immutable\edefcsname ??#1\endcsname{\v_interfaces_prefix_template_system}
1190 \fi}
1191
1192
1193
1194\aliased\let\normalsuperscript \Usuperscript
1195\aliased\let\normalsubscript \Usubscript
1196\aliased\let\normalnosuperscript\Unosuperscript
1197\aliased\let\normalnosubscript \Unosubscript
1198\aliased\let\normalstartimath \Ustartmath
1199\aliased\let\normalstopimath \Ustopmath
1200\aliased\let\normalstartdmath \Ustartdisplaymath
1201\aliased\let\normalstopdmath \Ustopdisplaymath
1202
1203
1204
1205\immutable\def\wildcardsymbol{*}
1206
1207
1208
1209\immutable\integerdef\eTeXversion 2
1210\immutable\def \eTeXrevision {2}
1211
1212
1213
1214\glyphoptions"80
1215
1216
1217
1218\aliased\let\immediateassignment\immediate
1219\aliased\let\immediateassigned \localcontrolled
1220
1221
1222
1223\mutable\let\nexttoken \relax
1224\mutable\let\next \relax
1225\mutable\let\nextnext \relax
1226\mutable\let\nextnextnext\relax
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236\mutable\let\on \relax
1237\mutable\let\of \relax
1238\mutable\let\and \relax
1239\mutable\let\with\relax
1240\mutable\let\nop \empty
1241\mutable\let\yes \empty
1242
1243
1244
1245\def\syst_suggested_alias#1#2
1246 {\beginlocalcontrol
1247 \writestatus{suggestion}{use \string#2 instead of \string#1}
1248 \enforced\glet#1#2
1249 \endlocalcontrol
1250 #2}
1251
1252\permanent\protected\def\suggestedalias#1#2
1253 {\ifflags#2\permanent\permanent\fi
1254 \def#1{\syst_suggested_alias#1#2}}
1255
1256
1257
1258
1259
1260
1261
1262
1263\suggestedalias \count@ \scratchcounter
1264\suggestedalias \dimen@ \scratchdimen
1265\suggestedalias \dimen@i \scratchdimenone
1266\suggestedalias \dimen@ii \scratchdimentwo
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295\permanent\countdef\c_syst_local_count = 221 \c_syst_local_count = \c_syst_max_allocated_register
1296\permanent\countdef\c_syst_local_dimen = 222 \c_syst_local_dimen = \c_syst_local_count
1297\permanent\countdef\c_syst_local_skip = 223 \c_syst_local_skip = \c_syst_local_count
1298\permanent\countdef\c_syst_local_muskip = 224 \c_syst_local_muskip = \c_syst_local_count
1299\permanent\countdef\c_syst_local_box = 225 \c_syst_local_box = \c_syst_local_count
1300\permanent\countdef\c_syst_local_toks = 226 \c_syst_local_toks = \c_syst_local_count
1301\permanent\countdef\c_syst_local_read = 227 \c_syst_local_read = \c_syst_local_count
1302\permanent\countdef\c_syst_local_write = 228 \c_syst_local_write = \c_syst_local_count
1303
1304\c_syst_max_allocated_register \numexpr\c_syst_max_allocated_register:2\relax
1305
1306\permanent\protected\def\syst_local_overflow#1#2{\writestatus\m!system{no room for local #1 \string#2}\wait}
1307
1308\permanent\protected\def\setnewlocaldimen#1
1309 {\ifnum\c_syst_local_dimen>\c_syst_max_allocated_register
1310 \advance\c_syst_local_dimen\minusone\dimendef#1\c_syst_local_dimen
1311 \else
1312 \syst_local_overflow_dimen#1
1313 \fi
1314 #1}
1315
1316\permanent\protected\def\setnewlocalcount#1
1317 {\ifnum\c_syst_local_count>\c_syst_max_allocated_register
1318 \advance\c_syst_local_count\minusone
1319 \overloaded\frozen\countdef#1\c_syst_local_count
1320 \else
1321 \syst_local_overflow_count#1
1322 \fi
1323 #1}
1324
1325\permanent\protected\def\setnewlocalskip#1
1326 {\ifnum\c_syst_local_skip>\c_syst_max_allocated_register
1327 \advance\c_syst_local_skip\minusone
1328 \overloaded\frozen\skipdef#1\c_syst_local_skip
1329 \else
1330 \syst_local_overflow_skip#1
1331 \fi
1332 #1}
1333
1334\permanent\protected\def\setnewlocalmuskip#1
1335 {\ifnum\c_syst_local_muskip>\c_syst_max_allocated_register
1336 \advance\c_syst_local_muskip\minusone
1337 \overloaded\frozen\muskipdef#1\c_syst_local_muskip
1338 \else
1339 \syst_local_overflow_muskip#1
1340 \fi
1341 #1}
1342
1343\permanent\protected\def\setnewlocaltoks#1
1344 {\ifnum\c_syst_local_toks>\c_syst_max_allocated_register
1345 \advance\c_syst_local_toks\minusone
1346 \overloaded\frozen\toksdef#1\c_syst_local_toks
1347 \else
1348 \syst_local_overflow_toks#1
1349 \fi
1350 #1}
1351
1352\permanent\protected\def\setnewlocalbox#1
1353 {\ifnum\c_syst_local_box>\c_syst_max_allocated_register
1354 \advance\c_syst_local_box\minusone
1355 \overloaded\frozen\integerdef#1\c_syst_local_box
1356 \else
1357 \syst_local_overflow_box#1
1358 \fi
1359 \setbox#1}
1360
1361\permanent\protected\def\newlocalread#1
1362 {\ifnum\c_syst_local_read>\c_syst_max_allocated_register
1363 \advance\c_syst_local_read\minusone
1364 \overloaded\frozen\integerdef#1\c_syst_local_read
1365 \else
1366 \syst_local_overflow_read#1
1367 \fi}
1368
1369\permanent\protected\def\newlocalwrite#1
1370 {\ifnum\c_syst_local_write>\c_syst_max_allocated_register
1371 \advance\c_syst_local_write\minusone
1372 \overloaded\frozen\integerdef#1\c_syst_local_write
1373 \else
1374 \syst_local_overflow_write#1
1375 \fi}
1376
1377
1378
1379\permanent\protected\def\syst_local_overflow_count {\syst_local_overflow {count}}
1380\permanent\protected\def\syst_local_overflow_dimen {\syst_local_overflow {dimen}}
1381\permanent\protected\def\syst_local_overflow_skip {\syst_local_overflow {skip}}
1382\permanent\protected\def\syst_local_overflow_muskip{\syst_local_overflow{muskip}}
1383\permanent\protected\def\syst_local_overflow_toks {\syst_local_overflow {toks}}
1384\permanent\protected\def\syst_local_overflow_box {\syst_local_overflow {box}}
1385\permanent\protected\def\syst_local_overflow_read {\syst_local_overflow {read}}
1386\permanent\protected\def\syst_local_overflow_write {\syst_local_overflow {write}}
1387
1388
1389
1390
1391\permanent\protected\def\newlocalcount #1{\setnewlocalcount #1\zerocount }
1392\permanent\protected\def\newlocaldimen #1{\setnewlocaldimen #1\zeropoint }
1393\permanent\protected\def\newlocalskip #1{\setnewlocalskip #1\zeroskip }
1394\permanent\protected\def\newlocalmuskip#1{\setnewlocalmuskip#1\zeromuskip}
1395\permanent\protected\def\newlocaltoks #1{\setnewlocaltoks #1\emptytoks }
1396\permanent\protected\def\newlocalbox #1{\setnewlocalbox #1\emptybox }
1397
1398
1399
1400\tracinglevels\plusthree
1401
1402\permanent\protected\def\tracingcatcodes{\tracinglevels\plusseven}
1403
1404
1405
1406\tracinghyphenation\plusone
1407
1408
1409
1410\let\ifexpression\ifnumexpression
1411
1412
1413
1414\autoparagraphmode\plusone
1415
1416
1417
1418
1419
1420\tracingfullboxes\zerocount
1421
1422\protect \endinput
1423 |