summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/cont-run.mkiv
blob: b650be67d93c9b03eb5cea04be48e03fa4771ce9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
%D \module
%D   [       file=cont-run,
%D        version=2014.12.26,
%D          title=\CONTEXT\ Core Macros,
%D       subtitle=Runner,
%D         author=Hans Hagen,
%D           date=\currentdate,
%D      copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.

\writestatus{loading}{ConTeXt Core Macros / Runner}

\registerctxluafile{cont-run}{}

% \enabletrackers[system.synctex.visualize]
% \enabletrackers[system.synctex.xml]
% \enabledirectives[system.synctex.details]
% \setupsynctex[state=start]

\unprotect

\let\synctexsetfilename  \clf_synctexsetfilename
\let\synctexresetfilename\clf_synctexresetfilename
\let\synctexblockfilename\clf_synctexblockfilename
\let\synctexpause        \clf_synctexpause
\let\synctexresume       \clf_synctexresume

\appendtoks\clf_synctexpause \to\everybeforeoutput
\appendtoks\clf_synctexresume\to\everyafteroutput

\unexpanded\def\setupsynctex[#1]%
  {\begingroup
   \getdummyparameters[\c!state=\v!stop,\c!method=\v!max,#1]%
   \clf_setupsynctex
      state  {\dummyparameter\c!state}%
      method {\dummyparameter\c!method}%
   \relax
   \endgroup}

\unexpanded\def\blocksynctexfile[#1]%
  {\processcommacommand{#1}\synctexblockfilename}

\protect \endinput