trac-brk.mkxl /size: 1357 b    last modification: 2024-01-16 10:22
1%D \module
2%D   [       file=trac-brk,
3%D        version=2023.05.23,
4%D          title=\CONTEXT\ Tracing Macros,
5%D       subtitle=Linebreaks,
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\ifdefined\showbreakpoints \endinput \fi
15
16\writestatus{loading}{ConTeXt Tracing Macros / Breakpoints}
17
18\registerctxluafile{trac-brk}{}
19
20\unprotect
21
22\permanent\tolerant\protected\gdef\startshowbreakpoints[#1]%
23  {\begingroup
24   \getdummyparameters[\c!option=,\c!list=,\c!offset=\zeropoint,#1]%
25   \ctxlua{tracers.breakpoints.start {
26        option = "\dummyparameter\c!option",
27        list   = "\dummyparameter\c!list",
28        offset = \number\dimexpr\dummyparameter\c!offset\relax,
29    }}%
30   \endgroup}
31
32\permanent\protected\gdef\stopshowbreakpoints
33  {\par
34   \ctxlua{tracers.breakpoints.stop()}}
35
36\permanent\tolerant\protected\gdef\showbreakpoints[#1]%
37  {\begingroup
38   \switchtobodyfont[7pt]%
39   \dorecurse{\cldcontext{tracers.breakpoints.nofresults()}} {
40     \startcolumns[n=3,notes=no,#1]%
41       \ctxlua{tracers.breakpoints.typesetresult(##1)}%
42     \stopcolumns
43   }%
44   \ctxlua{tracers.breakpoints.reset()}%
45   \endgroup}
46
47\protect \endinput
48