cont-run.mkxl /size: 2023 b    last modification: 2023-12-21 09:44
1%D \module
2%D   [       file=cont-run,
3%D        version=2014.12.26,
4%D          title=\CONTEXT\ Core Macros,
5%D       subtitle=Runner,
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 Core Macros / Runner}
15
16\registerctxluafile{cont-run}{autosuffix}
17
18% \enabletrackers[system.synctex.visualize]
19% \enabletrackers[system.synctex.xml]
20% \enabledirectives[system.synctex.details]
21% \setupsynctex[state=start]
22
23\unprotect
24
25% \synctexsetfilename   % defined at lua end
26% \synctexresetfilename % idem
27% \synctexblockfilename % idem
28
29\permanent\protected\lettonothing\synctexpause
30\permanent\protected\lettonothing\synctexresume
31\permanent\protected\lettonothing\synctexpushline
32\permanent\protected\lettonothing\synctexpopline
33
34\appendtoks\synctexpause \to\everybeforeoutput
35\appendtoks\synctexresume\to\everyafteroutput
36
37\permanent\protected\def\setupsynctex[#1]%
38  {\begingroup
39   \getdummyparameters[\c!state=\v!stop,\c!method=\v!max,#1]%
40   \edef\p_state{\dummyparameter\c!state}%
41   \clf_setupsynctex
42      state  {\p_state}%
43      method {\dummyparameter\c!method}%
44   \relax
45   \ifx\p_state\v!start
46     % when public implementor, use conditional
47     \enforced\glet\synctexpause   \clf_synctexpause
48     \enforced\glet\synctexresume  \clf_synctexresume
49     \enforced\glet\synctexpushline\clf_synctexpushline
50     \enforced\glet\synctexpopline \clf_synctexpopline
51   \fi
52   \endgroup}
53
54\permanent\protected\def\blocksynctexfile[#1]%
55  {\processcommacommand{#1}\synctexblockfilename}
56
57\permanent\protected\lettonothing\continuewhenlmtxmode
58
59\permanent\protected\def\continuewhenmkivmode
60  {\starttext
61   \startTEXpage[\c!offset=2\exheight,\c!foregroundstyle=\tttf]%
62      This file needs \LuaTeX\ and \ConTeXt\ \MKIV.%
63   \stopTEXpage
64   \stoptext
65   \endinput}
66
67\protect \endinput
68