node-fin.mkxl /size: 2955 b    last modification: 2023-12-21 09:44
1%D \module
2%D   [       file=attr-ini,
3%D        version=2007.06.06, % probably a bit older
4%D          title=\CONTEXT\ Node Macros,
5%D       subtitle=Finalizing,
6%D         author=Hans Hagen,
7%D           date=\currentdate,
8%D      copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
9%C
10%C This module is part of the \CONTEXT\ macro||package and is
11%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
12%C details.
13
14\writestatus{loading}{ConTeXt Node Support / Finalizing}
15
16\unprotect
17
18\registerctxluafile{node-shp}{autosuffix}
19\registerctxluafile{node-fin}{autosuffix}
20
21\permanent\protected\def\finalizeobjectbox #1{\clf_finalizebox#1\relax}
22\permanent\protected\def\finalizeshipoutbox#1{\clf_finalizebox#1\relax}
23
24% % Tricky stuff: this might become obsolete. It is about time to check this out
25% % now (after more than a decade)! The few times that we need this we can better
26% % copy some of the sensitive attributes (mostly color).
27%
28% \definesystemattribute[trigger][public]
29%
30% \newinteger\c_syst_attr_trigger
31%
32% \permanent\edef\startinheritattributes{\c_attr_trigger\plusone}
33% \permanent\edef\stopinheritattributes {\c_attr_trigger\attributeunsetvalue}
34%
35% \permanent\def\syst_attr_trigger_copy_yes{\afterassignment\syst_attr_trigger_copy_indeed\c_syst_attr_trigger}
36% \permanent\def\syst_attr_trigger_dump_yes{\afterassignment\syst_attr_trigger_dump_indeed\c_syst_attr_trigger}
37%
38% \def\syst_attr_trigger_copy_indeed
39%   {\ifvbox\c_syst_attr_trigger
40%      \vpack attr \triggerattribute \plusone {\unvcopy\c_syst_attr_trigger}%
41%    \else
42%      \hpack attr \triggerattribute \plusone {\unhcopy\c_syst_attr_trigger}%
43%    \fi}
44%
45% \def\syst_attr_trigger_dump_indeed
46%   {\ifvbox\c_syst_attr_trigger
47%      \vpack attr \triggerattribute \plusone {\unvbox\c_syst_attr_trigger}%
48%    \else
49%      \hpack attr \triggerattribute \plusone {\unhbox\c_syst_attr_trigger}%
50%    \fi}
51%
52% \permanent\protected\def\enableattributeinheritance
53%   {\clf_enablestatetriggering
54%    \enforced\let\attributedcopy\syst_attr_trigger_copy_yes
55%    \enforced\let\attributedbox \syst_attr_trigger_dump_yes}
56%
57% \permanent\protected\def\disableattributeinheritance
58%   {\clf_disablestatetriggering
59%    \enforced\let\attributedcopy\copy
60%    \enforced\let\attributedbox \box}
61%
62% \disableattributeinheritance
63%
64% \installtexdirective
65%   {attributes.inheritance}
66%   {\enableattributeinheritance}
67%   {\disableattributeinheritance}
68%
69% % \appendtoks
70% %     \enableattributeinheritance % might become default
71% % \to\everyjob
72
73% This is just a compatibility hack:
74
75\newinteger\c_syst_attr_trigger
76
77\permanent\protected\def\attributedcopy{\afterassignment\syst_attr_copy\c_syst_attr_trigger}
78\permanent\protected\def\attributedbox {\afterassignment\syst_attr_box \c_syst_attr_trigger}
79
80\def\syst_attr_copy{\recolorbox\c_syst_attr_trigger\copy\c_syst_attr_trigger}
81\def\syst_attr_box {\recolorbox\c_syst_attr_trigger\box \c_syst_attr_trigger}
82
83\protect \endinput
84