trac-vsp.mkxl /size: 1334 b    last modification: 2025-02-21 11:03
1%D \module
2%D   [       file=trac-vsp,
3%D        version=2024.10.24,
4%D          title=\CONTEXT\ Tracing Macros,
5%D       subtitle=Slits,
6%D         author=Hans Hagen & Mikael Sundqvist,
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% these will become runtime commands
15
16\writestatus{loading}{ConTeXt Tracing Macros / Splitpoints}
17
18\registerctxluafile{trac-vsp}{}
19
20\unprotect
21
22\permanent\tolerant\protected\gdef\startshowsplitpoints[#1]%
23  {\begingroup
24   \getdummyparameters[\c!option=,\c!list=,\c!offset=\zeropoint,#1]%
25   \ctxlua{tracers.splitpoints.start {
26        option = "\dummyparameter\c!option",
27        list   = "\dummyparameter\c!list",
28        offset = \number\dimexpr\dummyparameter\c!offset\relax
29    }}%
30   \endgroup
31   \vsplitchecks\plusone}
32
33\permanent\protected\gdef\stopshowsplitpoints
34  {\relax % prevent lookahead
35   \ctxlua{tracers.splitpoints.stop()}%
36   \vsplitchecks\zerocount}
37
38\permanent\tolerant\protected\gdef\showsplitpoints[#1]%
39  {\begingroup
40   \getdummyparameters[\c!option=,#1]%
41   \switchtobodyfont[6pt]%
42   \ctxlua{tracers.splitpoints.typesetresult("\dummyparameter\c!option")}%
43   \endgroup}
44
45\protect \endinput
46