node-mig.mkiv /size: 1836 b    last modification: 2020-07-01 14:35
1
%D \module
2
%D [ file=node-mig,
3
%D version=2010.01.19,
4
%D title=\CONTEXT\ Node Macros,
5
%D subtitle=Inserts,
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
/
Migrations
}
15 16
%D This is very experimental and although it is used in a
17
%D real project it mostly serves a testbed for Taco and me so
18
%D as prelude to extending the inserts mechanism.
19
%D
20
%D \starttyping
21
%D \automigrateinserts
22
%D
23
%D \hbox{\vbox{x\footnote{1}x\footnote{2}x\footnote{3}x}}
24
%D \vbox{x\footnote{4}x}
25
%D \hbox{\vbox{x\footnote{5}x}}
26
%D
27
%D \hbox{x}
28
%D \hbox{x\footnote{6}x}
29
%D \hbox{x}
30
%D
31
%D \starttabulate
32
%D \NC test \NC test \footnote{test} \input tufte \NC \NR
33
%D \NC test \NC test \footnote{test} \input tufte \NC \NR
34
%D \NC test \NC test \footnote{test} \input tufte \NC \NR
35
%D \NC test \NC test \footnote{test} \input tufte \NC \NR
36
%D \NC test \NC test \footnote{test} \input tufte \NC \NR
37
%D \NC test \NC test \footnote{test} \input tufte \NC \NR
38
%D \stoptabulate
39
%D \stoptyping
40 41
\unprotect
42 43
\registerctxluafile
{
node
-
mig
}{}
44 45
\newtoks
\everyautomigratefootnotes
46
\newtoks
\everyautomigratemarks
47 48
\def
\automigrateinserts
{
\the
\everyautomigratefootnotes
}
% soon default but does not work (yet) for notes in captions (themselves inserts)
49
\def
\automigratemarks
{
\the
\everyautomigratemarks
}
50 51
\appendtoks
52
\let
\postponenotes
\relax
53
\enableexperiments
[
inserts
.
migrate
,
inserts
.
migrate
.
nested
]
%
54
\to
\everyautomigratefootnotes
55 56
\appendtoks
57
\writestatus
\m!system
{
migration
of
marks
is
normally
not
needed
}
%
58
\enableexperiments
[
marks
.
migrate
]
%
59
\to
\everyautomigratemarks
60 61
\protect
62