context-2017-synctex.tex /size: 3630 b    last modification: 2020-07-01 14:35
1% \setupsynctex
2%   [state=start]
3
4% \enabletrackers
5%   [system.synctex.visualize]
6
7\usemodule[present-lines]
8
9\definecolor[maincolor][r=.6]
10
11\startdocument[title=\SYNCTEX,subtitle={\CONTEXT\ 2017 Maibach}]
12
13\startchapter[title=What is \SYNCTEX]
14
15\startitemize
16    \startitem it is a mechanism for going back from viewer to editor \stopitem
17    \startitem it uses an extra (zipped) output file \stopitem
18    \startitem it adds an overhead of 5 to 15 percent runtime \stopitem
19    \startitem it is designed with a specific macro package in mind \stopitem
20    \startitem the rather generic approach works okay for simple document layouts \stopitem
21    \startitem but it often fails for projects that use multiple files\stopitem
22    \startitem and that moves information around like \XML\ encoded files \stopitem
23\stopitemize
24
25\startchapter[title=Disclaimer]
26
27\startitemize
28    \startitem till recently it was supported in \CONTEXT\ as-it-was  \stopitem
29    \startitem there were no compliants, so it must have worked ok for most users \stopitem
30    \startitem we never used it ourselves because of mentioned reasons \stopitem
31    \startitem we only wanted to support it when it works ok in projects \stopitem
32    \startitem (think of thousands of \XML\ with deeply nested inclusions in one document) \stopitem
33    \startitem but what we support now is purely based on personal experiences \stopitem
34    \startitem we don't use it ourselves so feedback is welcome \stopitem
35\stopitemize
36
37\stopchapter
38
39\startchapter[title=What we do]
40
41\startitemize
42    \startitem the normal \SYNCTEX\ mechanism is disabled \stopitem
43    \startitem when told so, \CONTEXT\ will kick in its own code \stopitem
44    \startitem this is done by using \LUA\ code to set the right information \stopitem
45    \startitem only source files that make sense are dealt with \stopitem
46    \startitem this protects the styles from unwanted changes \stopitem
47    \startitem within reasonable bounds \XML\ is supported \stopitem
48    \startitem this also includes nested documents \stopitem
49\stopitemize
50
51\stopchapter
52
53\startchapter[title=How it works]
54
55\startitemize
56    \startitem we only mark text and don't bother about the rest \stopitem
57    \startitem we collapse information about whole stretches \stopitem
58    \startitem the extra file is therefore not that large \stopitem
59    \startitem so we can do without compression \stopitem
60    \startitem some care is needed to avoid interference with the editors parser \stopitem
61    \startitem (read: we need to get rid of the rather complex and heuristics) \stopitem
62    \startitem (read: it would be nice to have a simple robust parser option) \stopitem
63    \startitem there are flaws but I will look into them when motivated \stopitem
64\stopitemize
65
66\stopchapter
67
68\startchapter[title=What the user gets]
69
70\startitemize
71    \startitem a way to turn it on:
72        \starttyping
73            \setupsynctex[state=start]
74        \stoptyping
75    \stopitem
76    \startitem control over methods:
77        \starttyping
78            \setupsynctex[method=max]
79        \stoptyping
80    \stopitem
81    \startitem visual tracing:
82        \starttyping
83            \enabletrackers[system.synctex.visualize]
84        \stoptyping
85    \stopitem
86    \startitem some low level commands:
87        \starttyping
88            \synctexblockfilename{filename}
89            \synctexsetfilename  {filename}
90            \synctexresetfilename
91            \synctexpause
92            \synctexresume
93        \stoptyping
94    \stopitem
95\stopitemize
96
97% \enabletrackers[system.synctex.xml]
98% \enabledirectives[system.synctex.details]
99
100\stopchapter
101
102\stopdocument
103