toks-tra.mkiv /size: 1184 b    last modification: 2020-07-01 14:35
1
%D \module
2
%D [ file=toks-tra, % was toks-ini
3
%D version=2007.03.03,
4
%D title=\CONTEXT\ Token Support,
5
%D subtitle=Initialization,
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
Token
Support
/
Tracing
}
15 16
\registerctxluafile
{
toks
-
tra
}{}
17 18
\unprotect
19 20
%D Handy for manuals \unknown\ but not really used in practice, so it might
21
%D become a runtime loaded module instead.
22 23
\unexpanded
\def
\starttokens
[#
1
]
{
\ctxcommand{
collecttokens
(
"
#1
"
,
"
stoptokens
"
)
}
}
24
\let
\stoptokens
\relax
25
\unexpanded
\def
\flushtokens
[#
1
]
{
\ctxcommand{
flushtokens
(
"
#1
"
)
}
}
26
\unexpanded
\def\showtokens
[#
1
]
{
\ctxcommand{
showtokens
(
"
#1
"
)
}
}
27
\unexpanded
\def
\testtokens
[#
1
]
{
\ctxcommand{
testtokens
(
"
#1
"
)
}
}
28
\unexpanded
\def
\registertoken
#
1
{
\ctxcommand{
registertoken
(
"
#1
"
)
}
}
29 30
\let
\toks_show
\showtokens
% we also support the primitive
31 32
\unexpanded
\def\showtokens
{
\doifelsenextoptional
\toks_show
\normalshowtokens
}
33 34
\protect
\endinput
35