1
2
3
4
5
6
7
8
9
10
11
12
13
14\writestatus{loading}{ConTeXt Node Support Finalizing}
15
16
17
18
19\unprotect
20
21\registerctxluafile{nodeshp}{optimize}
22
23\registerctxluafile{nodefin}{optimize}
24
25
26
27\unexpanded\def\finalizeobjectbox #1{\clf_finalizebox#1\relax}
28\unexpanded\def\finalizeshipoutbox#1{\clf_finalizebox#1\relax}
29
30
31
32\unexpanded\def\cleanupbox#1{\clf_cleanupbox#1\relax}
33
34
35
36\definesystemattribute[trigger][public]
37
38\newcount\c_syst_attr_trigger
39
40\edef\startinheritattributes{\c_attr_trigger\plusone}
41\edef\stopinheritattributes {\c_attr_trigger\attributeunsetvalue}
42
43\def\syst_attr_trigger_copy_yes{\afterassignment\syst_attr_trigger_copy_indeed\c_syst_attr_trigger}
44\def\syst_attr_trigger_dump_yes{\afterassignment\syst_attr_trigger_dump_indeed\c_syst_attr_trigger}
45
46\def\syst_attr_trigger_copy_indeed
47 {\ifvbox\c_syst_attr_trigger
48 \vpack attr \triggerattribute \plusone {\unvcopy\c_syst_attr_trigger}
49 \else
50 \hpack attr \triggerattribute \plusone {\unhcopy\c_syst_attr_trigger}
51 \fi}
52
53\def\syst_attr_trigger_dump_indeed
54 {\ifvbox\c_syst_attr_trigger
55 \vpack attr \triggerattribute \plusone {\unvbox\c_syst_attr_trigger}
56 \else
57 \hpack attr \triggerattribute \plusone {\unhbox\c_syst_attr_trigger}
58 \fi}
59
60\unexpanded\def\enableattributeinheritance
61 {\clf_enablestatetriggering
62 \let\attributedcopy\syst_attr_trigger_copy_yes
63 \let\attributedbox \syst_attr_trigger_dump_yes}
64
65\unexpanded\def\disableattributeinheritance
66 {\clf_disablestatetriggering
67 \let\attributedcopy\copy
68 \let\attributedbox \box}
69
70\disableattributeinheritance
71
72\installtexdirective
73 {attributes.inheritance}
74 {\enableattributeinheritance}
75 {\disableattributeinheritance}
76
77
78
79
80
81\protect \endinput
82 |