1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18\writestatus{loading}{ConTeXt Page Macros Backgrounds}
19
20\unprotect
21
22\startcontextdefinitioncode
23
24
25
26
27
28
29
30
31
32
33\newconditional\c_page_backgrounds_new
34\newconditional\c_page_backgrounds_new_right
35\newconditional\c_page_backgrounds_new_left
36\newconditional\c_page_backgrounds_some
37
38\appendtoks
39 \ifconditional\c_page_backgrounds_some
40 \ifconditional\c_page_backgrounds_new
41 \setsystemmode\v!background
42 \fi
43 \fi
44\to \everybeforepagebody
45
46\permanent\protected\def\initializepagebackgrounds
47 {\c_page_backgrounds_new\conditionalfalse
48 \c_page_backgrounds_new_right\conditionalfalse
49 \c_page_backgrounds_new_left\conditionalfalse
50 \c_page_backgrounds_some\conditionalfalse}
51
52
53
54
55\mutable\lettonothing\currentotrbackground
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138\protected\def\page_backgrounds_check_background
139 {\unless\ifcsname\??framed\currentotrbackground:\c!background\endcsname
140 \page_backgrounds_check_frame
141 \orelse\ifempty{\lastnamedcs}
142
143 \page_backgrounds_check_frame
144 \else
145 \page_backgrounds_set_yes
146 \fi}
147
148\def\page_backgrounds_check_frame
149 {\unless\ifcsname\??framed\currentotrbackground:\c!frame\endcsname
150 \page_backgrounds_check_leftframe
151 \orelse\ifcstok{\lastnamedcs}\v!on
152
153 \page_backgrounds_set_yes
154 \else
155 \page_backgrounds_check_leftframe
156 \fi}
157
158\def\page_backgrounds_check_leftframe
159 {\unless\ifcsname\??framed\currentotrbackground:\c!leftframe\endcsname
160 \page_backgrounds_check_rightframe
161 \orelse\ifcstok{\lastnamedcs}\v!on
162
163 \page_backgrounds_set_yes
164 \else
165 \page_backgrounds_check_rightframe
166 \fi}
167
168\def\page_backgrounds_check_rightframe
169 {\unless\ifcsname\??framed\currentotrbackground:\c!rightframe\endcsname
170 \page_backgrounds_check_topframe
171 \orelse\ifcstok{\lastnamedcs}\v!on
172
173 \page_backgrounds_set_yes
174 \else
175 \page_backgrounds_check_topframe
176 \fi}
177
178\def\page_backgrounds_check_topframe
179 {\unless\ifcsname\??framed\currentotrbackground:\c!topframe\endcsname
180 \page_backgrounds_check_bottomframe
181 \orelse\ifcstok{\lastnamedcs}\v!on
182
183 \page_backgrounds_set_yes
184 \else
185 \page_backgrounds_check_bottomframe
186 \fi}
187
188\def\page_backgrounds_check_bottomframe
189 {\unless\ifcsname\??framed\currentotrbackground:\c!bottomframe\endcsname
190 \page_backgrounds_set_nop
191 \orelse\ifcstok{\lastnamedcs}\v!on
192
193 \page_backgrounds_set_yes
194 \else
195 \page_backgrounds_set_nop
196 \fi}
197
198
199
200
201\installcorenamespace{layoutbackgrounds}
202\installcorenamespace{layoutbackgroundcheck}
203
204\def\page_backgrounds_set_yes{\letcsname\currentotrbackground\endcsname\relax }
205\def\page_backgrounds_set_nop{\letcsname\currentotrbackground\endcsname\undefined}
206
207\protected\def\page_backgrounds_check#1
208 {\cdef\currentotrbackground{\??layoutbackgrounds#1}
209 \page_backgrounds_check_background}
210
211\permanent\def\doifelsesomebackground#1
212 {\ifexporting
213 \expandafter\secondoftwoarguments
214 \orelse\ifcsname\??layoutbackgrounds#1\endcsname
215 \expandafter\firstoftwoarguments
216 \else
217 \expandafter\secondoftwoarguments
218 \fi}
219
220\aliased\let\doifsomebackgroundelse\doifelsesomebackground
221
222\permanent\def\doifsomebackground#1
223 {\ifexporting
224 \expandafter\gobbleoneargument
225 \orelse\ifcsname\??layoutbackgrounds#1\endcsname
226 \expandafter\firstofoneargument
227 \else
228 \expandafter\gobbleoneargument
229 \fi}
230
231
232
233
234\def\page_backgrounds_add_to_box#1
235 {\ifexporting
236 \expandafter\gobblefourarguments
237 \orelse\ifcsname\??layoutbackgrounds#1\endcsname
238 \expandafter\page_backgrounds_add_to_box_indeed
239 \else
240 \expandafter\gobblefourarguments
241 \fi#1}
242
243
244
245
246
247\def\page_backgrounds_add_to_box_indeed#1#2#3#4
248 {\edef\p_page_backgrounds_setups{\namedframedparameter{\??layoutbackgrounds#1}\c!setups}
249 \ifempty\p_page_backgrounds_setups \else
250 \doprocesslocalsetups\p_page_backgrounds_setups
251 \fi
252
253 \setbox#2\hpack{\localbackgroundframed{\??layoutbackgrounds#1}#1#2}}
254
255
256
257
258
259
260\def\page_backgrounds_add_to_print#1
261 {\page_backgrounds_add_to_box\v!paper#1\printpaperwidth\printpaperheight}
262
263
264
265
266
267\def\page_backgrounds_add_to_paper#1
268 {\doifbothsidesoverruled
269 {\page_backgrounds_add_to_box\v!rightpage#1\paperwidth\paperheight}
270 {\page_backgrounds_add_to_box\v!rightpage#1\paperwidth\paperheight}
271 {\page_backgrounds_add_to_box\v!leftpage #1\paperwidth\paperheight}
272 \page_backgrounds_add_to_box\v!page#1\paperwidth\paperheight}
273
274
275
276
277
278
279\newbox\leftbackground
280\newbox\rightbackground
281
282
283
284
285
286\newconditional\c_page_backgrounds_hidden_enabled
287
288\def\page_backgrounds_add_to_text#1
289 {\ifconditional\c_page_backgrounds_hidden_enabled
290 \page_backgrounds_add_to_box\v!hidden#1\makeupwidth\textheight
291 \fi
292 \page_backgrounds_add_to_box\v!text#1\makeupwidth\textheight}
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308\def\page_backgrounds_recalculate
309 {\global\c_page_backgrounds_new\conditionaltrue}
310
311\def\page_backgrounds_set_boxes
312 {\ifconditional\c_page_backgrounds_new
313 \page_backgrounds_set_boxes_r
314 \fi
315 \doifbothsides
316 \page_backgrounds_set_boxes_a
317 \page_backgrounds_set_boxes_b
318 \page_backgrounds_set_boxes_c
319 \ifx\p_page_backgrounds_state\v!repeat\else
320 \global\c_page_backgrounds_new\conditionalfalse
321 \fi}
322
323\def\page_backgrounds_set_boxes_r
324 {\global\c_page_backgrounds_new_right\conditionaltrue
325 \global\c_page_backgrounds_new_left\conditionaltrue
326 \global\setbox\leftbackground\emptybox
327 \global\setbox\rightbackground\emptybox}
328
329\def\page_backgrounds_set_boxes_a
330 {\ifconditional\c_page_backgrounds_new_left
331
332 \page_backgrounds_set_box\leftbackground
333 \global\c_page_backgrounds_new_left\conditionalfalse
334 \global\c_page_backgrounds_new_right\conditionalfalse
335 \fi}
336
337\def\page_backgrounds_set_boxes_b
338 {\ifconditional\c_page_backgrounds_new_left
339
340 \page_backgrounds_set_box\leftbackground
341 \global\c_page_backgrounds_new_left\conditionalfalse
342 \fi}
343
344\def\page_backgrounds_set_boxes_c
345 {\ifconditional\c_page_backgrounds_new_right
346
347 \page_backgrounds_set_box\rightbackground
348 \global\c_page_backgrounds_new_right\conditionalfalse
349 \fi}
350
351\def\page_backgrounds_add_to_main#1
352 {\ifconditional\c_page_backgrounds_some
353 \page_backgrounds_set_boxes
354 \setbox#1\vpack
355 {\offinterlineskip
356 \doifelsemarginswap{\copy\leftbackground}{\copy\rightbackground}
357 \box#1}
358 \fi}
359
360\newdimension\pagebackgroundhoffset
361\newdimension\pagebackgroundvoffset
362\newdimension\pagebackgroundoffset
363\newdimension\pagebackgrounddepth
364\newdimension\pagebackgroundcompensation
365
366\def\page_backgrounds_set_offsets
367 {\ifconditional\c_page_backgrounds_some \ifconditional\c_page_backgrounds_new
368 \page_backgrounds_set_offsets_indeed
369 \fi \fi}
370
371\def\page_backgrounds_set_offsets_indeed
372 {\ifcsname\??layoutbackgrounds\v!text\v!text\endcsname
373 \page_backgrounds_set_offsets_yes
374 \orelse\ifcsname\??layoutbackgrounds\v!text\endcsname
375 \page_backgrounds_set_offsets_yes
376 \else
377 \page_backgrounds_set_offsets_nop
378 \fi}
379
380\def\page_backgrounds_set_offsets_nop
381 {\global\pagebackgroundhoffset \zeropoint
382 \global\pagebackgroundvoffset \zeropoint
383 \global\pagebackgrounddepth \zeropoint
384 \global\pagebackgroundcompensation\zeropoint}
385
386\def\page_backgrounds_set_offsets_yes
387 {\global\pagebackgroundoffset \d_page_backgrounds_depth
388 \global\pagebackgroundcompensation\d_page_backgrounds_offset\relax
389 \ifzeropt\pagebackgroundcompensation
390 \page_backgrounds_set_offsets_nop
391 \else
392 \ifcsname\??layoutbackgrounds\v!top\v!text\endcsname
393 \global\pagebackgroundhoffset\zeropoint
394 \orelse\ifcsname\??layoutbackgrounds\v!bottom\v!text\endcsname
395 \global\pagebackgroundhoffset\zeropoint
396 \else
397 \global\pagebackgroundhoffset\pagebackgroundcompensation
398 \fi
399 \ifcsname\??layoutbackgrounds\v!text\v!rightedge\endcsname
400 \global\pagebackgroundvoffset\zeropoint
401 \global\pagebackgrounddepth \zeropoint
402 \orelse\ifcsname\??layoutbackgrounds\v!text\v!leftedge\endcsname
403 \global\pagebackgroundvoffset\zeropoint
404 \global\pagebackgrounddepth \zeropoint
405 \else
406 \global\pagebackgroundvoffset\pagebackgroundcompensation
407 \global\pagebackgrounddepth \d_page_backgrounds_depth
408 \fi
409 \fi}
410
411\appendtoks
412 \page_backgrounds_set_offsets
413\to \everybeforepagebody
414
415\newconditional\swapbackgroundmargins \swapbackgroundmargins\conditionaltrue
416
417
418
419
420\def\page_backgrounds_set_box#1
421 {\global\setbox#1\vpack
422 {\dontcomplain
423 \page_layouts_swap_margins\v!background
424 \ifconditional\swapbackgroundmargins
425 \doifelsemarginswap \donothing
426 {\enforced\swapcsvalues\v!rightmargin\v!leftmargin
427 \enforced\swapcsvalues\v!rightedge \v!leftedge}
428 \fi
429 \calculatereducedvsizes
430 \offinterlineskip
431 \ifdim\topheight>\zeropoint
432 \kern{\topheight\topdistance}
433 \page_backgrounds_set_box_row\v!top\topheight
434 \kern\topdistance
435 \fi
436 \ifdim\headerheight>\zeropoint
437 \page_backgrounds_set_box_row\v!header\headerheight
438 \kern\headerdistance
439 \fi
440 \ifdim\textheight>\zeropoint
441 \page_backgrounds_set_box_row\v!text\textheight
442 \fi
443 \ifdim\footerheight>\zeropoint
444 \kern\footerdistance
445 \page_backgrounds_set_box_row\v!footer\footerheight
446 \fi
447 \ifdim\bottomheight>\zeropoint
448 \kern\bottomdistance
449 \page_backgrounds_set_box_row\v!bottom\bottomheight
450 \fi
451 \vfilll}
452 \smashbox#1}
453
454\def\page_backgrounds_set_box_row#1#2
455 {\setbox\scratchbox\vpack to #2
456 \bgroup\hpack\bgroup
457 \goleftonpage
458 \ifdim\leftedgewidth>\zeropoint
459 \ifcsname\??layoutbackgrounds#1\v!leftedge\endcsname
460 \page_backgrounds_set_box_cell#1\v!leftedge\leftedgewidth#2
461 \else
462 \kern\leftedgewidth
463 \fi
464 \kern\leftedgedistance
465 \fi
466 \ifdim\leftmarginwidth>\zeropoint
467 \ifcsname\??layoutbackgrounds#1\v!leftmargin\endcsname
468 \page_backgrounds_set_box_cell#1\v!leftmargin\leftmarginwidth#2
469 \else
470 \kern\leftmarginwidth
471 \fi
472 \kern\leftmargindistance
473 \fi
474 \ifcsname\??layoutbackgrounds#1\v!text\endcsname
475 \page_backgrounds_set_box_cell#1\v!text\makeupwidth#2
476 \else
477 \kern\makeupwidth
478 \fi
479 \ifdim\rightmarginwidth>\zeropoint
480 \kern\rightmargindistance
481 \ifcsname\??layoutbackgrounds#1\v!rightmargin\endcsname
482 \page_backgrounds_set_box_cell#1\v!rightmargin\rightmarginwidth#2
483 \else
484 \kern\rightmarginwidth
485 \fi
486 \fi
487 \ifdim\rightedgewidth>\zeropoint
488 \kern\rightedgedistance
489 \ifcsname\??layoutbackgrounds#1\v!rightedge\endcsname
490 \page_backgrounds_set_box_cell#1\v!rightedge\rightedgewidth#2
491 \else
492 \kern\rightedgewidth
493 \fi
494 \fi
495 \egroup\egroup
496 \wd\scratchbox\zeropoint
497 \box\scratchbox\relax}
498
499
500
501
502\def\page_backgrounds_set_box_cell#1#2#3#4
503 {\begingroup
504 \edef\p_page_backgrounds_setups{\namedframedparameter{\??layoutbackgrounds#1#2}\c!setups}
505 \ifempty\p_page_backgrounds_setups \else
506 \doprocesslocalsetups\p_page_backgrounds_setups
507 \fi
508 \edef\p_page_backgrounds_command{\namedframedparameter{\??layoutbackgrounds#1#2}\c!command}
509 \ifempty\p_page_backgrounds_command
510 \expandafter\page_backgrounds_set_box_cell_nop
511 \else
512 \expandafter\page_backgrounds_set_box_cell_yes
513 \fi#3#4
514 \localbackgroundframed{\??layoutbackgrounds#1#2}{#1:#2}\scratchbox
515 \endgroup}
516
517\def\page_backgrounds_set_box_cell_nop#1#2
518 {\setbox\scratchbox\emptyvbox
519 \wd\scratchbox#1
520 \ht\scratchbox#2}
521
522\def\page_backgrounds_set_box_cell_yes#1#2
523 {\setbox\scratchbox\vpack to #2{\vss\hpack to#1{\hss\p_page_backgrounds_command\hss}\vss}
524 \dp\scratchbox\zeropoint}
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541\newtoks\everybackgroundssetup
542
543\permanent\tolerant\protected\def\setupbackgrounds[#S#1]#*[#S#2]#*[#S#3]
544 {\ifarguments
545 \expandafter\gobblethreeoptionals
546 \or
547 \expandafter\page_backgrounds_setup_basics
548 \or
549 \expandafter\page_backgrounds_setup_single
550 \or
551 \expandafter\page_backgrounds_setup_double
552 \fi[#1][#2][#3]}
553
554\newdimension\d_page_backgrounds_offset
555\newdimension\d_page_backgrounds_depth
556
557\appendtoks
558 \edef\p_page_backgrounds_offset{\namedframedparameter{\??layoutbackgrounds\v!page}\c!offset}
559 \edef\p_page_backgrounds_depth {\namedframedparameter{\??layoutbackgrounds\v!page}\c!depth }
560 \edef\p_page_backgrounds_state {\namedframedparameter{\??layoutbackgrounds }\c!state }
561 \global\d_page_backgrounds_offset\ifempty\p_offset\zeropoint\else{\p_page_backgrounds_offset}\fi
562 \global\d_page_backgrounds_depth \ifempty\p_depth \zeropoint\else{\p_page_backgrounds_depth }\fi
563 \global\pagebackgroundoffset\d_page_backgrounds_offset\relax
564 \global\pagebackgrounddepth \d_page_backgrounds_depth \relax
565 \ifx\p_page_backgrounds_state\v!stop
566 \global\c_page_backgrounds_new\conditionalfalse
567 \else
568 \global\c_page_backgrounds_new\conditionaltrue
569 \fi
570\to \everybackgroundssetup
571
572\def\v_page_backgrounds_double_set{\v!paper,\v!page,\v!leftpage,\v!rightpage}
573\def\v_page_backgrounds_single_set{\v!text,\v!hidden,\v!paper,\v!page,\v!leftpage,\v!rightpage}
574\def\v_page_backgrounds_common_set{\v!leftedge,\v!leftmargin,\v!text,\v!rightmargin,\v!rightedge}
575
576\let\page_backgrounds_setup_step_nested\relax
577
578\protected\def\page_backgrounds_setup_double[#1][#2][#S#3]
579 {\global\c_page_backgrounds_some\conditionaltrue
580 \def\page_backgrounds_setup_step##1
581 {\ifinset{##1}\v_page_backgrounds_double_set
582 \page_backgrounds_setup_and_check{##1}{#3}
583 \else
584 \def\page_backgrounds_setup_step_nested####1{\page_backgrounds_setup_and_check{##1####1}{#3}}
585 \processcommacommand[#2]\page_backgrounds_setup_step_nested
586 \fi}
587 \processcommacommand[#1]\page_backgrounds_setup_step
588 \expand\everybackgroundssetup}
589
590\protected\def\page_backgrounds_setup_single[#1][#S#2][#]
591 {\global\c_page_backgrounds_some\conditionaltrue
592 \ifcommon{#1}\v_page_backgrounds_single_set
593 \def\page_backgrounds_setup_step##1{\page_backgrounds_setup_and_check{##1}{#2}}
594 \processcommacommand[#1]\page_backgrounds_setup_step
595 \expand\everybackgroundssetup
596 \else
597 \page_backgrounds_setup_double[#1][\v_page_backgrounds_common_set][#2]
598 \fi}
599
600\protected\def\page_backgrounds_setup_basics[#S#1][#][#]
601 {\setupframed[\??layoutbackgrounds][#1]
602 \expand\everybackgroundssetup}
603
604\protected\def\page_backgrounds_setup_and_check#1#2
605 {\cdef\currentotrbackground{\??layoutbackgrounds#1}
606 \setupframed[\currentotrbackground][#2]
607 \page_backgrounds_check_background}
608
609
610
611
612\definesimplifiedframed[\??layoutbackgrounds\v!paper]
613\definesimplifiedframed[\??layoutbackgrounds\v!page]
614\definesimplifiedframed[\??layoutbackgrounds\v!leftpage]
615\definesimplifiedframed[\??layoutbackgrounds\v!rightpage]
616
617\definesimplifiedframed[\??layoutbackgrounds\v!text]
618\definesimplifiedframed[\??layoutbackgrounds\v!hidden]
619
620\definesimplifiedframed[\??layoutbackgrounds\v!top\v!leftedge]
621\definesimplifiedframed[\??layoutbackgrounds\v!top\v!leftmargin]
622\definesimplifiedframed[\??layoutbackgrounds\v!top\v!text]
623\definesimplifiedframed[\??layoutbackgrounds\v!top\v!rightmargin]
624\definesimplifiedframed[\??layoutbackgrounds\v!top\v!rightedge]
625
626\definesimplifiedframed[\??layoutbackgrounds\v!header\v!leftedge]
627\definesimplifiedframed[\??layoutbackgrounds\v!header\v!leftmargin]
628\definesimplifiedframed[\??layoutbackgrounds\v!header\v!text]
629\definesimplifiedframed[\??layoutbackgrounds\v!header\v!rightmargin]
630\definesimplifiedframed[\??layoutbackgrounds\v!header\v!rightedge]
631
632\definesimplifiedframed[\??layoutbackgrounds\v!text\v!leftedge]
633\definesimplifiedframed[\??layoutbackgrounds\v!text\v!leftmargin]
634\definesimplifiedframed[\??layoutbackgrounds\v!text\v!text]
635\definesimplifiedframed[\??layoutbackgrounds\v!text\v!rightmargin]
636\definesimplifiedframed[\??layoutbackgrounds\v!text\v!rightedge]
637
638\definesimplifiedframed[\??layoutbackgrounds\v!footer\v!leftedge]
639\definesimplifiedframed[\??layoutbackgrounds\v!footer\v!leftmargin]
640\definesimplifiedframed[\??layoutbackgrounds\v!footer\v!text]
641\definesimplifiedframed[\??layoutbackgrounds\v!footer\v!rightmargin]
642\definesimplifiedframed[\??layoutbackgrounds\v!footer\v!rightedge]
643
644\definesimplifiedframed[\??layoutbackgrounds\v!bottom\v!leftedge]
645\definesimplifiedframed[\??layoutbackgrounds\v!bottom\v!leftmargin]
646\definesimplifiedframed[\??layoutbackgrounds\v!bottom\v!text]
647\definesimplifiedframed[\??layoutbackgrounds\v!bottom\v!rightmargin]
648\definesimplifiedframed[\??layoutbackgrounds\v!bottom\v!rightedge]
649
650\setupbackgrounds
651 [\v!page]
652 [\c!offset=\zeropoint,
653 \c!depth=\zeropoint]
654
655
656
657\setupbackgrounds
658 [\c!state=\c!start]
659
660
661
662
663
664
665
666\permanent\protected\def\enablehiddenbackground
667 {\global\c_page_backgrounds_hidden_enabled\conditionaltrue
668 \global\c_page_backgrounds_some\conditionaltrue
669 \page_backgrounds_recalculate}
670
671\permanent\protected\def\disablehiddenbackground
672 {\global\c_page_backgrounds_hidden_enabled\conditionalfalse}
673
674\immutable\def\hiddenbackgroundlist
675 {\v!text2,\v!text1,\v!foreground,\v!text1,\v!text2}
676
677\permanent\protected\def\prependhiddenbackground#1{\enforced\edef\hiddenbackgroundlist{#1,\hiddenbackgroundlist}}
678\permanent\protected\def\appendhiddenbackground #1{\enforced\edef\hiddenbackgroundlist{\hiddenbackgroundlist,#1}}
679
680\defineoverlay[\v!text2][\positionregionoverlay\textanchor{\v!text2}]
681\defineoverlay[\v!text1][\positionregionoverlay\textanchor{\v!text1}]
682\defineoverlay[\v!text1][\positionregionoverlay\textanchor{\v!text1}]
683\defineoverlay[\v!text2][\positionregionoverlay\textanchor{\v!text2}]
684
685\setupbackgrounds
686 [\v!hidden]
687 [\c!background=\hiddenbackgroundlist]
688
689
690
691
692
693
694
695
696\c_page_backgrounds_some\conditionalfalse
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723\permanent\protected\def\pushbackground[#1]
724 {\pushmacro\popbackground
725 \cdef\currentotrbackground{\??layoutbackgrounds#1}
726 \enforced\permanent\protected\edef\popbackground
727 {\setupframed
728 [\currentotrbackground]
729 [\c!background=\namedframedparameter{\currentotrbackground}\c!background,
730 \c!backgroundcolor=\namedframedparameter{\currentotrbackground}\c!backgroundcolor]
731 \page_backgrounds_check_background
732 \popmacro\popbackground}
733 \setupframed
734 [\currentotrbackground]
735 [\c!background=,\c!backgroundcolor=]
736 \page_backgrounds_check_background}
737
738\permanent\let\popbackground\relax
739
740\stopcontextdefinitioncode
741
742\protect \endinput
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 |