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
|
%D \module
%D [ file=node-ini,
%D version=2006.08.20,
%D title=\CONTEXT\ Character Macros,
%D subtitle=Node Support (Initialization),
%D author=Hans Hagen,
%D date=\currentdate,
%D copyright=PRAGMA]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
\writestatus{loading}{Node Support (initialization)}
\registerctxluafile{node-ini}{1.001}
% \appendtoks
% \ctxlua {
% callbacks.push('hpack_filter')
% callbacks.push('vpack_filter')
% callbacks.push('buildpage_filter')
% callbacks.push('pre_linebreak_filter')
% callbacks.push('pre_output_filter')
% }%
% \to \everybeforeoutput
% \appendtoks
% \ctxlua {
% callbacks.pop('hpack_filter')
% callbacks.pop('vpack_filter')
% callbacks.pop('buildpage_filter')
% callbacks.pop('pre_linebreak_filter')
% callbacks.pop('pre_output_filter')
% }%
% \to \everyafteroutput
\newcount\shownodescounter
\def\shownextnodes {\afterassignment\doshownodes\shownextnodescounter}
\def\showflatnodes {\afterassignment\doshownodes\showflatnodescounter}
\def\doshownextnodes {\ctxlua{texio.write_nl('log',nodes.serializebox(\number\shownodescounter,false,true))}}
\def\doshowflatnodes {\ctxlua{texio.write_nl('log',nodes.serializebox(\number\shownodescounter,true, true))}}
\def\visualizenextnodes{\dowithnextbox{\ctxlua{nodes.visualizebox(\number\nextbox,false,true)}}}
\def\visualizeflatnodes{\dowithnextbox{\ctxlua{nodes.visualizebox(\number\nextbox,true,true)}}}
\def\starttracingnodes[#1]{\ctxlua{nodes.tracers.characters.start("#1")}}
\def\stoptracingnodes {\ctxlua{nodes.tracers.characters.stop()}}
% \starttext
% \starttracingnodes[characters]
% \input tufte \par
% \input tufte \par
% \stoptracingnodes
% \stoptext
\endinput
|