1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17\writestatus{loading}{ConTeXt Typesetting Macros Synchronizers}
18
19\registerctxluafile{typosyn}{autosuffix}
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129\unprotect
130
131\definesystemattribute[synchronize][public]
132
133\installcorenamespace {synchronize}
134\installcorenamespace {synchronizecontent}
135
136\installcommandhandler \??synchronize {synchronize} \??synchronize
137\installcommandhandler \??synchronizecontent {synchronizecontent} \??synchronizecontent
138
139\setupsynchronize
140 [\c!buffer=,
141 \c!text=,
142 \c!list=,
143 \c!split=,
144 \c!distance=\zeropoint]
145
146\let\typo_sync_rule\novrule
147
148\installtextracker
149 {synchronize}
150 {\let\typo_sync_rule\vrule}
151 {\let\typo_sync_rule\novrule}
152
153\tolerant\protected\def\typo_synchronize#1#*[#S#2]#:#3#4
154 {\dontleavehmode
155 \begingroup
156 \cdef\currentsynchronize{#1}
157 \setupcurrentsynchronize[#2]
158 \scratchdistance\synchronizeparameter\c!distance
159 \dontcomplain
160 \setbox\scratchboxtwo\hbox\bgroup
161 \usesynchronizestyleandcolor\c!style\c!color
162 \begstrut
163 \ignorespaces#4\removeunwantedspaces
164 \endstrut
165 \egroup
166 \scratchdimentwo\wd\scratchboxtwo
167 \advanceby\scratchdimentwo\scratchdistance
168 \clf_registersynchronize
169 \strutht
170 \strutdp
171 .1\onepoint
172 \box\scratchboxtwo
173 \relax
174 \setbox\scratchboxone\hbox\bgroup
175 \ignorespaces#3\removeunwantedspaces
176 \egroup
177 \scratchdimenone\wd\scratchboxone
178 \unhbox\scratchboxone
179 \advanceby\scratchdimentwo\scratchdimenone
180 \ifdim\scratchdimentwo>\zeropoint
181 \wordboundary
182 \typo_sync_rule
183 \s!width \scratchdimentwo
184 \s!height \exheight
185 \s!depth \zeropoint
186 \relax
187 \fi
188 \endgroup}
189
190\protected\def\dosplitsynchronize#1#2#3#4
191 {\begingroup
192 \dontcomplain
193 \setbox\scratchboxtwo\hbox\bgroup
194 \def\currentsynchronizecontent{#2}
195 \usesynchronizecontentstyleandcolor\c!style\c!color
196 \uselanguageparameter\synchronizecontentparameter
197 \synchronizecontentparameter\c!left
198 \begstrut
199 \ignorespaces
200 #4\removeunwantedspaces
201 \endstrut
202 \synchronizecontentparameter\c!right
203 \egroup
204 \scratchdimentwo\wd\scratchboxtwo
205 \advanceby\scratchdimentwo\scratchdistance
206 \clf_registersynchronize
207 \strutht
208 \strutdp
209 .1\onepoint
210 \box\scratchboxtwo
211 \relax
212 \setbox\scratchboxone\hbox\bgroup
213 \def\currentsynchronizecontent{#1}
214 \usesynchronizecontentstyleandcolor\c!style\c!color
215 \uselanguageparameter\synchronizecontentparameter
216 \synchronizecontentparameter\c!left
217 \ignorespaces#3\removeunwantedspaces
218 \synchronizecontentparameter\c!right
219 \egroup
220 \scratchdimenone\wd\scratchboxone
221 \unhbox\scratchboxone
222 \advanceby\scratchdimentwo\scratchdimenone
223 \ifdim\scratchdimentwo>\zeropoint
224 \wordboundary
225 \typo_sync_rule
226 \s!width \scratchdimentwo
227 \s!height \exheight
228 \s!depth \zeropoint
229 \relax
230 \fi
231 \endgroup
232 \space}
233
234\tolerant\protected\def\placesynchronize[#1]#*[#S#2]
235 {\dontleavehmode
236 \begingroup
237 \cdef\currentsynchronize{#1}
238 \setupcurrentsynchronize[#2]
239 \scratchdistance\synchronizeparameter\c!distance
240 \clf_synchronizesteps
241 list {\synchronizeparameter\c!list}
242 split {\synchronizeparameter\c!split}
243 buffer {\synchronizeparameter\c!buffer}
244 text {\synchronizeparameter\c!text}
245 \relax
246 \removeunwantedspaces
247 \endgroup}
248
249\appendtoks
250 \protected\instance\edefcsname\currentsynchronize\endcsname{\typo_synchronize{\currentsynchronize}}
251\to \everydefinesynchronize
252
253
254
255
256\definesynchronize
257 [paralleltext]
258
259
260
261\protect \endinput
262 |