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\chardef\escapecatcode 0
28\chardef\begingroupcatcode 1
29\chardef\endgroupcatcode 2
30\chardef\mathshiftcatcode 3
31\chardef\alignmentcatcode 4
32\chardef\endoflinecatcode 5
33\chardef\parametercatcode 6
34\chardef\superscriptcatcode 7
35\chardef\subscriptcatcode 8
36\chardef\ignorecatcode 9
37\chardef\spacecatcode 10
38\chardef\lettercatcode 11
39\chardef\othercatcode 12
40\chardef\activecatcode 13
41\chardef\commentcatcode 14
42\chardef\invalidcatcode 15
43
44
45\chardef\tabasciicode 9
46\chardef\newlineasciicode 10
47\chardef\formfeedasciicode 12
48\chardef\endoflineasciicode 13
49\chardef\endoffileasciicode 26
50\chardef\spaceasciicode 32
51\chardef\exclamationmarkasciicode 33
52\chardef\doublequoteasciicode 34
53\chardef\hashasciicode 35
54\chardef\dollarasciicode 36
55\chardef\commentasciicode 37
56\chardef\ampersandasciicode 38
57\chardef\singlequoteasciicode 39
58\chardef\primeasciicode 39
59\chardef\leftparentasciicode 40
60\chardef\rightparentasciicode 41
61\chardef\commaasciicode 44
62\chardef\hyphenasciicode 45
63\chardef\periodasciicode 46
64\chardef\forwardslashasciicode 47
65\chardef\colonasciicode 58
66\chardef\lessthanasciicode 60
67\chardef\morethanasciicode 62
68\chardef\questionmarkasciicode 63
69\chardef\atsignasciicode 64
70\chardef\backslashasciicode 92
71\chardef\circumflexasciicode 94
72\chardef\underscoreasciicode 95
73\chardef\leftbraceasciicode 123
74\chardef\barasciicode 124
75\chardef\rightbraceasciicode 125
76\chardef\tildeasciicode 126
77\chardef\delasciicode 127
78
79
80\catcode\tabasciicode \spacecatcode
81\catcode\formfeedasciicode \activecatcode
82
83\catcode\endoffileasciicode \ignorecatcode
84
85\catcode\hashasciicode \parametercatcode
86\catcode\dollarasciicode \mathshiftcatcode
87
88\catcode\ampersandasciicode \alignmentcatcode
89
90\catcode\circumflexasciicode \superscriptcatcode
91\catcode\underscoreasciicode \subscriptcatcode
92\catcode\leftbraceasciicode \begingroupcatcode
93\catcode\rightbraceasciicode \endgroupcatcode
94\catcode\tildeasciicode \activecatcode
95
96
97\chardef\statuswrite 128
98
99
100
101\directlua {
102 local primitives = tex.extraprimitives("core","tex","etex","luatex")
103
104
105
106 tex.enableprimitives("", primitives)
107 tex.enableprimitives("normal",primitives)
108
109 function tex.enableprimitives() end
110}
111
112\def\space{ }
113\def\empty{}
114
115\letcharcode \formfeedasciicode \par
116\letcharcode \tildeasciicode \
117\letcharcode \spaceasciicode \space
118
119\expandafter\def\csname\Uchar\tabasciicode \endcsname {\ }
120\expandafter\def\csname\Uchar\formfeedasciicode \endcsname {\par}
121\expandafter\def\csname\Uchar\endoflineasciicode\endcsname {\ }
122
123
124
125\def\gobbleoneargument#1{}
126
127
128
129
130\def\unprotect
131 {\edef\protect
132 {\catcode\atsignasciicode \the\catcode\atsignasciicode \relax
133 \catcode\exclamationmarkasciicode\the\catcode\exclamationmarkasciicode\relax
134 \catcode\questionmarkasciicode \the\catcode\questionmarkasciicode \relax
135 \catcode\underscoreasciicode \the\catcode\underscoreasciicode \relax
136 \let\protect\relax}
137 \catcode\atsignasciicode \lettercatcode
138 \catcode\exclamationmarkasciicode\lettercatcode
139 \catcode\questionmarkasciicode \lettercatcode
140 \catcode\underscoreasciicode \lettercatcode}
141
142\let\protect\relax
143
144\unprotect
145
146
147
148\let\bgroup={
149\let\egroup=}
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175\countdef \c_syst_min_allocated_register = 52 \c_syst_min_allocated_register = 256
176\countdef \c_syst_max_allocated_register = 53 \c_syst_max_allocated_register = 32767
177\countdef \c_syst_min_allocated_read = 54 \c_syst_min_allocated_read = 1
178\countdef \c_syst_max_allocated_read = 55 \c_syst_max_allocated_read = 16
179\countdef \c_syst_min_allocated_language = 56 \c_syst_min_allocated_language = 0
180\countdef \c_syst_max_allocated_language = 57 \c_syst_max_allocated_language = 255
181\countdef \c_syst_min_allocated_insert = 58 \c_syst_min_allocated_insert = 128
182\countdef \c_syst_max_allocated_insert = 59 \c_syst_max_allocated_insert = 254
183\countdef \c_syst_min_allocated_family = 60 \c_syst_min_allocated_family = 128
184\countdef \c_syst_max_allocated_family = 61 \c_syst_max_allocated_family = 255
185\countdef \c_syst_min_allocated_attribute = 62 \c_syst_min_allocated_attribute = 1024
186\countdef \c_syst_min_allocated_write = 63 \c_syst_min_allocated_write = 0
187\countdef \c_syst_max_allocated_write = 64 \c_syst_max_allocated_write = 127
188
189\countdef \c_syst_last_allocated_count = 32 \c_syst_last_allocated_count = \c_syst_min_allocated_register
190\countdef \c_syst_last_allocated_dimen = 33 \c_syst_last_allocated_dimen = \c_syst_min_allocated_register
191\countdef \c_syst_last_allocated_skip = 34 \c_syst_last_allocated_skip = \c_syst_min_allocated_register
192\countdef \c_syst_last_allocated_muskip = 35 \c_syst_last_allocated_muskip = \c_syst_min_allocated_register
193\countdef \c_syst_last_allocated_box = 36 \c_syst_last_allocated_box = \c_syst_min_allocated_register
194\countdef \c_syst_last_allocated_toks = 37 \c_syst_last_allocated_toks = \c_syst_min_allocated_register
195\countdef \c_syst_last_allocated_read = 38 \c_syst_last_allocated_read = \c_syst_min_allocated_read
196\countdef \c_syst_last_allocated_write = 39 \c_syst_last_allocated_write = \c_syst_min_allocated_write
197\countdef \c_syst_last_allocated_marks = 40 \c_syst_last_allocated_marks = \c_syst_min_allocated_register
198\countdef \c_syst_last_allocated_language = 41 \c_syst_last_allocated_language = \c_syst_min_allocated_language
199\countdef \c_syst_last_allocated_insertion = 42 \c_syst_last_allocated_insertion = \c_syst_min_allocated_insert
200\countdef \c_syst_last_allocated_family = 43 \c_syst_last_allocated_family = \c_syst_min_allocated_family
201\countdef \c_syst_last_allocated_attribute = 44 \c_syst_last_allocated_attribute = \c_syst_min_allocated_attribute
202
203\countdef \c_syst_min_counter_value = 125 \c_syst_min_counter_value = "7FFFFFFF
204\countdef \c_syst_max_counter_value = 126 \c_syst_max_counter_value = "7FFFFFFF
205
206\countdef \zerocount = 120 \zerocount = 0
207\countdef \plusone = 121 \plusone = 1
208\countdef \minusone = 122 \minusone = 1
209
210\countdef \normalpagebox = 127 \normalpagebox = 255
211
212
213
214
215
216
217
218
219
220
221
222
223
224\countdef \count@ 255
225\dimendef \dimen@ 0
226\dimendef \dimen@i 1
227\dimendef \dimen@ii 2
228
229
230
231
232
233
234\let\wlog\gobbleoneargument
235
236
237
238\protected\def\newcount {\syst_basics_allocate\c_syst_last_allocated_count \count \countdef \c_syst_max_allocated_register}
239\protected\def\newdimen {\syst_basics_allocate\c_syst_last_allocated_dimen \dimen \dimendef \c_syst_max_allocated_register}
240\protected\def\newskip {\syst_basics_allocate\c_syst_last_allocated_skip \skip \skipdef \c_syst_max_allocated_register}
241\protected\def\newmuskip {\syst_basics_allocate\c_syst_last_allocated_muskip \muskip \muskipdef \c_syst_max_allocated_register}
242\protected\def\newbox {\syst_basics_allocate\c_syst_last_allocated_box \box \mathchardef\c_syst_max_allocated_register}
243\protected\def\newtoks {\syst_basics_allocate\c_syst_last_allocated_toks \toks \toksdef \c_syst_max_allocated_register}
244\protected\def\newread {\syst_basics_allocate\c_syst_last_allocated_read \read \chardef \c_syst_max_allocated_read}
245\protected\def\newwrite {\syst_basics_allocate\c_syst_last_allocated_write \write \chardef \c_syst_max_allocated_write}
246\protected\def\newmarks {\syst_basics_allocate\c_syst_last_allocated_marks \marks \mathchardef\c_syst_max_allocated_register}
247\protected\def\newinsert {\syst_basics_allocate\c_syst_last_allocated_insertion\insert \chardef \c_syst_max_allocated_insert}
248
249
250
251\protected\def\newlanguage{\syst_basics_allocate\c_syst_last_allocated_language \language\chardef \c_syst_max_allocated_language}
252\protected\def\newfamily {\syst_basics_allocate\c_syst_last_allocated_family \fam \chardef \c_syst_max_allocated_family}
253
254\let\newfam\newfamily
255
256\firstvalidlanguage\plusone
257
258
259
260
261\protected\def\newconstant #1{\ifdefined#1\let#1\undefined\fi\newcount#1}
262\protected\def\setnewconstant #1{\ifdefined#1\let#1\undefined\fi\newcount#1#1}
263\protected\def\setconstant {}
264\protected\def\setconstantvalue#1#2{\csname#1\endcsname\numexpr#2\relax}
265
266
267
268
269
270\newlinechar\newlineasciicode \edef\outputnewlinechar{\Uchar\newlineasciicode}
271
272
273
274
275
276
277
278\ifdefined\writestatus \else
279
280 \protected\def\writestatus#1#2{\message{#1: #2}}
281\fi
282
283\def\syst_basics_allocate_yes#1#2#3#4#5
284 {\ifnum#1<#4\relax
285 \global\advance#1\plusone
286 \global#3#5=#1\relax
287 \else
288 \writestatus{warning}{no room for \string#2\space \string#5\space (max: \number#4)}
289 \fi}
290
291\def\syst_basics_allocate_nop#1#2#3#4#5
292 {\writestatus{warning}{\string#2 \string#5 is already defined (\string\relax\space it first)}}
293
294\def\syst_basics_allocate#1#2#3#4#5
295 {\ifx#5\undefined
296 \expandafter\syst_basics_allocate_yes
297 \else\ifx#5\relax
298 \expandafter\expandafter\expandafter\syst_basics_allocate_yes
299 \else
300 \expandafter\expandafter\expandafter\syst_basics_allocate_nop
301 \fi\fi
302 #1#2#3#4#5}
303
304
305
306
307\protected\def\newbox {\syst_basics_allocate\c_syst_last_allocated_box \box \chardef\c_syst_max_allocated_register}
308\protected\def\newmarks{\syst_basics_allocate\c_syst_last_allocated_marks\marks\chardef\c_syst_max_allocated_register}
309
310
311
312
313
314
315\let\attributeunsetvalue\c_syst_min_counter_value
316
317\protected\def\newattribute{\syst_basics_allocate\c_syst_last_allocated_attribute\attribute\attributedef\c_syst_max_allocated_register}
318
319
320
321
322
323
324\protected\def\newhelp#1#2{\newtoks#1#1\expandafter{\detokenize{#2}}}
325
326
327
328
329
330
331
332
333
334
335
336\newcount \scratchcounter \newcount \globalscratchcounter \newcount \privatescratchcounter
337\newdimen \scratchdimen \newdimen \globalscratchdimen \newdimen \privatescratchdimen
338\newskip \scratchskip \newskip \globalscratchskip \newskip \privatescratchskip
339\newmuskip\scratchmuskip \newmuskip\globalscratchmuskip \newmuskip\privatescratchmuskip
340\newtoks \scratchtoks \newtoks \globalscratchtoks \newtoks \privatescratchtoks
341\newbox \scratchbox \newbox \globalscratchbox \newbox \privatescratchbox
342
343\newcount\scratchcounterone \newcount\scratchcountertwo \newcount\scratchcounterthree
344\newdimen \scratchdimenone \newdimen \scratchdimentwo \newdimen \scratchdimenthree
345\newskip \scratchskipone \newskip \scratchskiptwo \newskip \scratchskipthree
346\newmuskip\scratchmuskipone \newmuskip\scratchmuskiptwo \newmuskip\scratchmuskipthree
347\newtoks \scratchtoksone \newtoks \scratchtokstwo \newtoks \scratchtoksthree
348\newbox \scratchboxone \newbox \scratchboxtwo \newbox \scratchboxthree
349
350\newcount\scratchcounterfour \newcount\scratchcounterfive \newcount\scratchcountersix
351\newdimen \scratchdimenfour \newdimen \scratchdimenfive \newdimen \scratchdimensix
352\newskip \scratchskipfour \newskip \scratchskipfive \newskip \scratchskipsix
353\newmuskip\scratchmuskipfour \newmuskip\scratchmuskipfive \newmuskip\scratchmuskipsix
354\newtoks \scratchtoksfour \newtoks \scratchtoksfive \newtoks \scratchtokssix
355\newbox \scratchboxfour \newbox \scratchboxfive \newbox \scratchboxsix
356
357\newcount\globalscratchcounterone
358\newcount\globalscratchcountertwo
359\newcount\globalscratchcounterthree
360
361
362
363
364\let\tempstring\empty
365
366
367
368
369
370
371\newdimen\scratchwidth
372\newdimen\scratchheight
373\newdimen\scratchdepth
374\newdimen\scratchtotal
375
376\newdimen\scratchoffset
377\newdimen\scratchleftoffset
378\newdimen\scratchrightoffset
379\newdimen\scratchtopoffset
380\newdimen\scratchbottomoffset
381
382\newdimen\scratchdistance
383
384\newdimen\scratchhsize
385\newdimen\scratchvsize
386
387\newdimen\scratchxoffset
388\newdimen\scratchyoffset
389\newdimen\scratchhoffset
390\newdimen\scratchvoffset
391
392\newdimen\scratchxposition
393\newdimen\scratchyposition
394
395\newcount\scratchnx
396\newcount\scratchny
397
398\newcount\scratchmx
399\newcount\scratchmy
400
401\newcount\scratchmin
402\newcount\scratchmax
403
404\newcount\scratchunicode
405
406\newdimen\scratchleftskip
407\newdimen\scratchrightskip
408\newdimen\scratchtopskip
409\newdimen\scratchbottomskip
410
411
412
413\newskip \zeroskip \zeroskip 0pt plus 0pt minus 0pt
414\newdimen \zeropoint \zeropoint 0pt
415\newdimen \onepoint \onepoint 1pt
416\newdimen \halfapoint \halfapoint 0.5pt
417\newdimen \maxdimen \maxdimen 16383.99999pt
418\newcount \maxcount \maxcount 2147483647
419\newdimen \onebasepoint \onebasepoint 1bp
420\newdimen \scaledpoint \scaledpoint 1sp
421\newdimen \thousandpoint \thousandpoint 1000pt
422\newmuskip\zeromuskip \zeromuskip 0mu
423\newmuskip\onemuskip \onemuskip 1mu
424
425\newmuskip\muquad \muquad 18mu
426
427\let\points \onepoint
428\let\halfpoint\halfapoint
429
430\newtoks \emptytoks
431
432
433
434
435\newcount\minustwo \minustwo 2
436
437
438\chardef \plustwo 2
439\chardef \plusthree 3
440\chardef \plusfour 4
441\chardef \plusfive 5
442\chardef \plussix 6
443\chardef \plusseven 7
444\chardef \pluseight 8
445\chardef \plusnine 9
446\chardef \plusten 10
447\chardef \pluseleven 11
448\chardef \plustwelve 12
449\chardef \plussixteen 16
450\chardef \plusfifty 50
451\chardef \plushundred 100
452\chardef \plusonehundred 100
453\chardef \plustwohundred 200
454\chardef \plusfivehundred 500
455\chardef \pluscxxvii 127
456\chardef \pluscxxviii 128
457\chardef \pluscclv 255
458\chardef \pluscclvi 256
459\chardef \plusthousand 1000
460\chardef \plustenthousand 10000
461\chardef \plustwentythousand 20000
462\chardef \medcard 32768
463\chardef \maxcard 65536
464\chardef \maxcardminusone 65535
465
466
467
468
469
470
471\let\singleexpandafter \expandafter
472\def\doubleexpandafter{\expandafter\expandafter\expandafter}
473\def\tripleexpandafter{\expandafter\doubleexpandafter\expandafter}
474
475
476
477
478\newbox\voidbox
479
480\let\normalhbox\hbox
481\let\normalvbox\vbox
482
483\def\unvoidbox{\unhbox\voidbox}
484\def\emptybox {\box \voidbox}
485\def\emptyvbox{\normalvpack{}}
486\def\emptyhbox{\normalhpack{}}
487
488\let\leavevmode\unvoidbox
489
490
491
492
493
494
495\protected\def\dontcomplain
496 {\hbadness\plustenthousand
497 \vbadness\plustenthousand
498 \hfuzz \maxdimen
499 \vfuzz \maxdimen}
500
501
502
503
504\let \p@ \onepoint
505\let \m@ne \minusone
506\let \z@ \zeropoint
507\let \@ne \plusone
508\let \tw@ \plustwo
509\let \thr@@ \plusthree
510\let \sixt@@n \plussixteen
511\let \@cclv \pluscclv
512\let \@cclvi \pluscclvi
513\let \voidb@x \voidbox
514\newtoks \toks@
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560\protected\def\newif#1
561 {\let\new_if_saved\newif
562 \let\newif\new_if_check
563 \expandafter\def\csname\expandafter\newif\csstring#1true\endcsname {\let#1\iftrue }
564 \expandafter\def\csname\expandafter\newif\csstring#1false\endcsname{\let#1\iffalse}
565 \csname\expandafter\newif\csstring#1false\endcsname
566 \let\newif\new_if_saved}
567
568\bgroup
569 \normalexpanded{\gdef\noexpand\new_if_check\string i\string f{}}
570\egroup
571
572
573
574\newif\ifdone
575\newif\iffound
576
577\def\htdp#1{\dimexpr\ht#1\dp#1\relax}
578
579
580
581\protected\def\udef {\protected\def }
582\protected\def\ugdef{\protected\gdef}
583\protected\def\uedef{\protected\edef}
584\protected\def\uxdef{\protected\xdef}
585
586
587
588\protected\def\defUmathtopaccent #1#2#3#4{\global\instance\protected\def#1{\Umathaccent "#2 "#3 "#4 }}
589\protected\def\defUmathbotaccent #1#2#3#4{\global\instance\protected\def#1{\Umathbotaccent "#2 "#3 "#4 }}
590\protected\def\defUdelimiterover #1#2#3#4{\global\instance\protected\def#1{\Udelimiterover "#2 "#3 }}
591\protected\def\defUdelimiterunder #1#2#3#4{\global\instance\protected\def#1{\Udelimiterunder "#2 "#3 }}
592\protected\def\defUdelimiter #1#2#3#4{\global\instance\protected\def#1{\Udelimiter "#2 "#2 "#4 }}
593\protected\def\defUradical #1#2#3{\global\instance\protected\def#1{\Uradical "#2 "#3 }}
594\protected\def\defUroot #1#2#3{\global\instance\protected\def#1{\Uroot "#2 "#3 }}
595\protected\def\defUmathchar #1#2#3#4{\global\instance\Umathchardef #1 "#2 "#3 "#4 }
596
597
598
599
600\let\active\activecatcode
601
602
603
604\chardef\bottomlevelgroupcode = 0
605\chardef\simplegroupcode = 1
606\chardef\hboxgroupcode = 2
607\chardef\adjustedhboxgroupcode = 3
608\chardef\vboxgroupcode = 4
609\chardef\vtopgroupcode = 5
610\chardef\aligngroupcode = 6
611\chardef\noaligngroupcode = 7
612\chardef\outputgroupcode = 8
613\chardef\mathgroupcode = 9
614\chardef\discretionarygroupcode = 10
615\chardef\insertgroupcode = 11
616\chardef\vcentergroupcode = 12
617\chardef\mathchoicegroupcode = 13
618\chardef\semisimplegroupcode = 14
619\chardef\mathshiftgroupcode = 15
620\chardef\mathleftgroupcode = 16
621\chardef\vadjustgroupcode = \insertgroupcode
622
623
624
625\chardef\batchmodecode = 0
626\chardef\nonstopmodecode = 1
627\chardef\scrollmodecode = 2
628\chardef\errorstopmodecode = 3
629
630
631
632
633
634
635
636
637
638\ifdefined\internalcodesmode
639
640 \internalcodesmode\plusone
641
642
643
644
645
646\else
647
648
649
650
651
652
653
654
655
656
657
658
659 \chardef\gluenodecode = 11
660 \chardef\kernnodecode = 12
661 \chardef\penaltynodecode = 13
662
663
664
665\fi
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
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712\protected\def\tracingall
713 {\tracingonline \plusone
714 \tracingcommands \plusthree
715 \tracingstats \plustwo
716 \tracingpages \plusone
717 \tracingoutput \plusone
718 \tracinglostchars \plustwo
719 \tracingmacros \plustwo
720 \tracingparagraphs\plusone
721 \tracingrestores \plusone
722 \showboxbreadth \maxdimen
723 \showboxdepth \maxdimen
724 \tracinggroups \plusone
725 \tracingifs \plusone
726 \tracingscantokens\plusone
727 \tracingnesting \plustwo
728 \tracingassigns \plustwo}
729
730\protected\def\loggingall
731 {\tracingall
732 \tracingonline \zerocount}
733
734\protected\def\tracingnone
735 {\tracingassigns \zerocount
736 \tracingnesting \zerocount
737 \tracingscantokens\zerocount
738 \tracingifs \zerocount
739 \tracinggroups \zerocount
740 \showboxdepth \plusthree
741 \showboxbreadth \plusfive
742 \tracingrestores \zerocount
743 \tracingparagraphs\zerocount
744 \tracingmacros \zerocount
745 \tracinglostchars \plusone
746 \tracingoutput \zerocount
747 \tracingpages \zerocount
748 \tracingstats \zerocount
749 \tracingcommands \zerocount
750 \tracingonline \zerocount}
751
752
753
754\showboxdepth \maxdimen
755\showboxbreadth\maxdimen
756
757
758
759\tracingstats\plusone
760
761
762
763\ifdefined\normalinput \else \let\normalinput\input \fi
764
765
766
767
768\let\normalouter\outer \def\outer{}
769
770
771
772
773\ifdefined\normaldump \else \let\normaldump\dump \fi
774
775\newtoks\everydump
776
777\def\dump{\the\everydump\global\everydump\emptytoks\glet\dump\relax\normaldump}
778
779
780
781\ifdefined\normaleveryjob \else \let\normaleveryjob\everyjob \fi
782
783\let\everyjob\relax \newtoks\everyjob
784
785\normaleveryjob{\the\everyjob}
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824\let\conditionalfalse\plusone
825\let\conditionaltrue \zerocount
826
827\protected\def\settrue #1{\let#1\conditionaltrue }
828\protected\def\setfalse#1{\let#1\conditionalfalse}
829
830\protected\def\settruevalue #1{\expandafter\let\csname#1\endcsname\conditionaltrue }
831\protected\def\setfalsevalue#1{\expandafter\let\csname#1\endcsname\conditionalfalse}
832
833\let\newconditional\setfalse
834\let\ifconditional \ifcase
835
836\let\then\relax
837
838\def\truecondition {\iftrue}
839\def\falsecondition{\iffalse}
840
841
842
843
844
845
846
847\protected\def\newmacro #1{\let#1\empty}
848\protected\def\setnewmacro#1{\let#1}
849
850\def\!!zerocount{0}
851\def\!!plusone {1}
852
853\protected\def\newfraction#1{\let#1\!!plusone}
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869\let\ifzeropt\ifcase
870
871
872
873
874
875
876
877
878\newtoks\t_syst_toks_temp \let\m_syst_toks_temp\t_syst_toks_temp
879
880\protected\def\appendtotoks #1{\let\m_syst_toks_temp#1\afterassignment\syst_toks_append_l \t_syst_toks_temp=}
881\protected\def\prependtotoks#1{\let\m_syst_toks_temp#1\afterassignment\syst_toks_prepend_l\t_syst_toks_temp=}
882
883
884
885
886\protected\def\globalappendtotoks #1{\let\m_syst_toks_temp#1\afterassignment\syst_toks_append_g \t_syst_toks_temp=}
887\protected\def\globalprependtotoks#1{\let\m_syst_toks_temp#1\afterassignment\syst_toks_prepend_g\t_syst_toks_temp=}
888
889\def\syst_toks_append_l {\normalexpanded{\m_syst_toks_temp{\the\m_syst_toks_temp\the\t_syst_toks_temp}}}
890\def\syst_toks_prepend_l{\normalexpanded{\m_syst_toks_temp{\the\t_syst_toks_temp\the\m_syst_toks_temp}}}
891
892\def\syst_toks_append_g {\global\syst_toks_append_l }
893\def\syst_toks_prepend_g{\global\syst_toks_prepend_l}
894
895\protected\def\addtotoks #1{\let\m_syst_toks_temp#1\afterassignment\syst_toks_add_l\let\next}
896\protected\def\globaladdtotoks#1{\let\m_syst_toks_temp#1\afterassignment\syst_toks_add_g\let\next}
897
898\def\syst_toks_add_l{\m_syst_toks_temp\expandafter\bgroup\the\m_syst_toks_temp}
899\def\syst_toks_add_g{\global\syst_toks_add_l}
900
901\protected\def\addtotokscs #1#2{#1{\the#1#2}}
902\protected\def\globaladdtotokscs#1#2{\global#1{\the#1#2}}
903
904
905
906
907
908
909
910
911\let\begcsname\begincsname
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928\protected\def\reseteverypar
929 {\everypar\emptytoks}
930
931\let\endgraf\par
932\let\endline\cr
933
934\protected\def\null{\hpack{}}
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950\def\obeylines {\catcode\endoflineasciicode\activecatcode\letcharcode\endoflineasciicode\par}
951\def\obeyspaces{\catcode\spaceasciicode \activecatcode\letcharcode\spaceasciicode \space}
952
953
954
955
956
957
958
959
960
961
962\def\loop#1\repeat{\def\@@plnbody{#1}\@@plniterate}
963
964
965
966
967\let\repeat\fi
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983\def\@@plniterate{\@@plnbody\expandafter\@@plniterate\else\fi}
984
985
986
987\output{\shipout\box\normalpagebox}
988
989
990
991
992\countdef\pageno\zerocount \pageno\plusone
993
994
995
996
997\def\folio{\the\pageno}
998
999
1000
1001
1002\newskip \bigskipamount \bigskipamount = 12pt plus 4pt minus 4pt
1003\newskip \medskipamount \medskipamount = 6pt plus 2pt minus 2pt
1004\newskip \smallskipamount \smallskipamount = 3pt plus 1pt minus 1pt
1005
1006\baselineskip = 12pt
1007\lineskip = 1pt
1008\lineskiplimit = 0pt
1009
1010
1011
1012
1013\protected\def\vkern {\ifhmode\par \fi\kern}
1014\protected\def\hkern {\ifvmode\dontleavehmode\fi\kern}
1015
1016\protected\def\vpenalty{\ifhmode\par \fi\penalty}
1017\protected\def\hpenalty{\ifvmode\dontleavehmode\fi\penalty}
1018
1019
1020
1021
1022\newskip \hideskip \hideskip = 1000pt plus 1fill
1023\newskip \centering \centering = 0pt plus 1000pt minus 1000pt
1024
1025\def\hidewidth
1026 {\hskip\hideskip}
1027
1028\def\ialign
1029 {\everycr\emptytoks
1030 \tabskip\zeroskip
1031 \halign}
1032
1033\newcount \mscount
1034
1035\def\spanomit{\span\omit}
1036
1037\def\multispan#1
1038 {\omit
1039 \mscount#1\relax
1040 \loop
1041 \ifnum\mscount>\plusone
1042 \spanomit \advance\mscount\minusone
1043 \repeat}
1044
1045
1046
1047\ifdefined\pdfvariable
1048
1049 \pdfvariable compresslevel \plusthree
1050 \pdfvariable objcompresslevel \plusone
1051
1052 \pdfvariable decimaldigits \plussix
1053 \pdfvariable gamma \plusthousand
1054 \pdfvariable imageresolution 300
1055 \pdfvariable imageapplygamma \zerocount
1056 \pdfvariable imagegamma 2200
1057 \pdfvariable imagehicolor \plusone
1058 \pdfvariable imageaddfilename \plusone
1059 \pdfvariable pkresolution 1200
1060 \pdfvariable inclusioncopyfonts \plusone
1061 \pdfvariable inclusionerrorlevel \zerocount
1062 \pdfvariable gentounicode \plusone
1063 \pdfvariable omitcidset \plusone
1064 \pdfvariable omitcharset \plusone
1065 \pdfvariable pagebox \zerocount
1066
1067 \pdfvariable minorversion \plusseven
1068 \pdfvariable uniqueresname \zerocount
1069 \pdfvariable horigin 1in
1070 \pdfvariable vorigin 1in
1071
1072
1073
1074
1075 \pdfvariable pkfixeddpi \plusone
1076 \pdfvariable ignoreunknownimages \zerocount
1077
1078\fi
1079
1080\let\nopdfcompression \relax
1081\let\onlypdfobjectcompression\relax
1082\let\maximumpdfcompression \relax
1083\let\normalpdfcompression \relax
1084
1085\ifdefined\outputmode
1086 \outputmode \zerocount
1087\fi
1088
1089
1090
1091\newif\ifproductionrun
1092
1093
1094
1095\ifx\fmtname \undefined \def\fmtname {ConTeXt Initial TeX} \fi
1096\ifx\fmtversion\undefined \def\fmtversion{3.1415926} \fi
1097
1098
1099
1100\def\modulonumber#1#2{\the\numexpr#2((((#2(#12))#1)1)*#1)\relax}
1101\def\dividenumber#1#2{\the\numexpr(#2(#12))#1\relax}
1102
1103\ifdefined\texenginename \else
1104 \edef\texenginename{\directlua{tex.print(LUATEXENGINE)}}
1105\fi
1106
1107\ifdefined\texengineversion \else
1108 \edef\texengineversion{\directlua{tex.print(LUATEXVERSION)}}
1109\fi
1110
1111\ifdefined\texenginefunctionality \else
1112 \edef\texenginefunctionality{\directlua{tex.print(LUATEXFUNCTIONALITY)}}
1113\fi
1114
1115
1116
1117\savingvdiscards\plusone
1118
1119
1120
1121
1122\let\synctex\undefined \newcount\synctex \let\normalsynctex\synctex
1123
1124
1125
1126\voffset\zeropoint \let\voffset\relax \newdimen\voffset \let\normalvoffset\voffset
1127\hoffset\zeropoint \let\hoffset\relax \newdimen\hoffset \let\normalhoffset\hoffset
1128
1129\ifdefined\pageleftoffset
1130 \let\pageleftoffset \hoffset \let\normalpageleftoffset \hoffset
1131 \let\pagerightoffset \hoffset \let\normalpagerightoffset \hoffset
1132 \let\pagetopoffset \voffset \let\normalpagetopoffset \voffset
1133 \let\pagebottomoffset\voffset \let\normalpagebottomoffset\voffset
1134\fi
1135
1136
1137
1138\ifdefined\suppresslongerror \suppresslongerror \plusone \fi
1139\ifdefined\suppressoutererror \suppressoutererror \plusone \fi
1140\ifdefined\suppressmathparerror \suppressmathparerror \plusone \fi
1141\ifdefined\suppressifcsnameerror \suppressifcsnameerror \plusone \fi
1142\ifdefined\suppressfontnotfounderror\suppressfontnotfounderror\zerocount\fi
1143
1144\let \suppresslongerror \relax
1145\newcount\suppresslongerror \let\normalsuppresslongerror \suppresslongerror
1146\let \suppressoutererror \suppresslongerror \let\normalsuppressoutererror \suppresslongerror
1147\let \suppressmathparerror \suppresslongerror \let\normalsuppressmathparerror \suppresslongerror
1148\let \suppressifcsnameerror \suppresslongerror \let\normalsuppressifcsnameerror \suppresslongerror
1149\let \suppressfontnotfounderror\suppresslongerror \let\normalsuppressfontnotfounderror\suppresslongerror
1150
1151\matheqnogapstep\zerocount
1152
1153
1154
1155\ifdefined\overloadmode \else
1156 \newcount\overloadmode
1157
1158 \let\frozen \empty
1159 \let\tolerant \empty
1160 \let\overloaded\empty
1161 \let\aliased \empty
1162 \let\permanent \empty
1163 \let\immutable \empty
1164 \let\mutable \empty
1165 \let\instance \empty
1166 \let\noaligned \empty
1167 \let\enforced \empty
1168
1169 \let\unletfrozen\gobbleoneargument
1170 \let\letfrozen \gobbleoneargument
1171 \def\letcsname {\expandafter\let \csname}
1172 \def\defcsname {\expandafter\def \csname}
1173 \def\edefcsname {\expandafter\edef\csname}
1174
1175 \let\pushoverloadmode\relax
1176 \let\popoverloadmode\relax
1177
1178 \let\pushrunstate\relax
1179 \let\poprunstate \relax
1180\fi
1181
1182
1183
1184
1185\newcount\c_syst_helpers_n_of_namespaces \c_syst_helpers_n_of_namespaces\pluseight
1186
1187\def\v_interfaces_prefix_template_system{\number \c_syst_helpers_n_of_namespaces>>}
1188
1189
1190\protected\def\installsystemnamespace#1
1191 {\ifcsname ??#1\endcsname
1192 \immediate\write\statuswrite{fatal error: duplicate system namespace #1}
1193 \expandafter\normalend
1194 \else
1195 \global\advance\c_syst_helpers_n_of_namespaces\plusone
1196 \expandafter\edef\csname ??#1\endcsname{\v_interfaces_prefix_template_system}
1197 \fi}
1198
1199
1200
1201\let\normalsuperscript \Usuperscript
1202\let\normalsubscript \Usubscript
1203\let\normalnosuperscript\Unosuperscript
1204\let\normalnosubscript \Unosubscript
1205\let\normalstartimath \Ustartmath
1206\let\normalstopimath \Ustopmath
1207\let\normalstartdmath \Ustartdisplaymath
1208\let\normalstopdmath \Ustopdisplaymath
1209
1210
1211
1212\def\wildcardsymbol{*}
1213
1214
1215
1216
1217\let\eTeXglueshrinkorder \undefined
1218\let\eTeXgluestretchorder\undefined
1219
1220
1221
1222\ifdefined\glyphdimensionsmode \else \newcount\glyphdimensionsmode \fi
1223
1224\glyphdimensionsmode\plusone
1225
1226
1227
1228
1229
1230\ifdefined \tokenized \else
1231 \def\tokenized#1{\scantextokens\expandafter{\normalexpanded{#1}}}
1232\fi
1233
1234\ifdefined \unhpack \else
1235 \let\unhpack\unhbox
1236 \let\unvpack\unvbox
1237\fi
1238
1239
1240
1241\let\nexttoken\relax
1242
1243
1244
1245
1246
1247
1248\ifdefined\partokenname
1249 \let\partokencontext\relax
1250 \newcount\partokencontext
1251 \let\partokenname\gobbleoneargument
1252\fi
1253
1254\protect \endinput
1255 |