Debian Codegraph @

texmf-dist/tex/latex/tikz-nfold/pgflibraryoffsetpath.code.tex

raw
1 %% pgflibraryoffsetpath.code.tex
2 %% Copyright 2023 Jonathan Schulz
3 %
4 % This work may be distributed and/or modified under the
5 % conditions of the LaTeX Project Public License, either version 1.3c
6 % of this license or (at your option) any later version.
7 % The latest version of this license is in
8 % http://www.latex-project.org/lppl.txt
9 % and version 1.3c or later is part of all distributions of LaTeX
10 % version 2008-05-04 or later.
11 %
12 % This work has the LPPL maintenance status 'maintained'.
13 %
14 % The Current Maintainer of this work is Jonathan Schulz.
15 %
16 % This work consists of the files
17 % pgflibrarybezieroffset.code.tex, pgflibrarynfold.code.tex, pgflibraryoffsetpath.code.tex, tikz-nfold-doc.tex, tikzlibrarynfold.code.tex, tikz-nfold-doc.tex, and tikz-nfold-doc.pdf.
18 %
19 %
20 % A commented version of this file can be found on https://github.com/jonschz/tikz-nfold .
21 %
22
23 \usepgflibrary{bezieroffset}
24
25
26
27
28
29
30 \gdef\pgf@nfold@cached@miterlimit{10}
31 \let\pgf@nfold@old@miterlimit\pgfsetmiterlimit
32 \def\pgfsetmiterlimit#1{%
33 \pgf@nfold@old@miterlimit{#1}%
34 \edef\pgf@nfold@cached@miterlimit{#1}%
35 }
36
37 \global\let\pgf@cached@linejoin=m%
38 \let\pgf@nfold@old@setbeveljoin\pgfsetbeveljoin
39 \let\pgf@nfold@old@setmiterjoin\pgfsetmiterjoin
40 \let\pgf@nfold@old@setroundjoin\pgfsetroundjoin
41 \def\pgfsetbeveljoin{%
42 \pgf@nfold@old@setbeveljoin%
43 \let\pgf@cached@linejoin=b%
44 }
45 \def\pgfsetmiterjoin{%
46 \pgf@nfold@old@setmiterjoin%
47 \let\pgf@cached@linejoin=m%
48 }
49 \def\pgfsetroundjoin{%
50 \pgf@nfold@old@setroundjoin%
51 \let\pgf@cached@linejoin=r%
52 }
53
54
55
56 \def\pgf@nfold@miterjoin{
57 \pgfpathlineto{
58 \pgfpointadd{\pgf@nfold@join@centre}{%
59 \pgfpointpolar{\pgf@nfold@firstang+.5*\pgf@nfold@deltaphi+90}%
60 {\pgf@nfold@shiftamount/cos(.5*\pgf@nfold@deltaphi)}%
61 }%
62 }%
63 }
64
65 \def\pgf@nfold@beveljoin{
66 \pgfmathsetlengthmacro{\bevelouterprotrusion}%
67 {\pgf@nfold@shortenstartjoin pt - .5*\pgflinewidth*abs(tan(.25*\pgf@nfold@deltaphi))}
68 \pgfmathsetmacro{\bevelshorten}{2*\insidepercentage*abs(tan(.25*\pgf@nfold@deltaphi))}
69 \pgfmathparse{\bevelshorten < abs(sin(.5*\pgf@nfold@deltaphi))}
70 \ifnum\pgfmathresult=1\relax
71 \pgfmathsetlengthmacro{\bevelextension}{\bevelouterprotrusion-\bevelshorten*\pgf@nfold@hwidth}
72 \pgfpointadd{\pgf@nfold@join@start}{\pgfpointpolar{\pgf@nfold@firstang}{\bevelextension}}
73 \pgfpathlineto{}
74 \pgfpointadd{\pgf@nfold@join@end}{\pgfpointpolar{\pgf@nfold@secondang}{-\bevelextension}}
75 \pgfpathlineto{}
76 \else
77 \pgf@nfold@miterjoin
78 \fi
79 }
80
81 \def\pgf@nfold@roundjoin{
82 \ifdim\insidepercentage pt<.5pt\relax
83 \pgfpointadd{\pgf@nfold@join@start}{\pgfpointpolar{\pgf@nfold@firstang}{\pgf@nfold@shortenstartjoin}}
84 \pgfpathlineto{}
85 \pgfmathsetmacro\pgf@tmp@firstang{\pgf@nfold@firstang+90*\turnindicator}
86 \pgfpatharc%
87 {\pgf@tmp@firstang}%
88 {\pgf@tmp@firstang+\pgf@nfold@deltaphi}%
89 {abs(\pgf@nfold@shift@fraction)*\pgf@nfold@hwidth}%
90 \else
91 \pgf@nfold@miterjoin
92 \fi
93 }
94
95 \def\pgf@nfold@token@join#1#2#3#4#5#6#7#8{%
96 \def\pgf@nfold@join@centre{#1}%
97 \def\pgf@nfold@join@prevend{#2}%
98 \def\pgf@nfold@join@nextstart{#3}%
99 \def\pgf@nfold@firstang{#4}%
100 \def\pgf@nfold@secondang{#5}%
101 \pgfextract@process\pgf@nfold@join@start{%
102 \pgfpointadd{#2}{\pgfpointpolar{\pgf@nfold@firstang+90}{\pgf@nfold@shiftamount}}}%
103 \pgfextract@process\pgf@nfold@join@end{%
104 \pgfpointadd{#3}{\pgfpointpolar{\pgf@nfold@secondang+90}{\pgf@nfold@shiftamount}}}%
105 \pgf@process{\pgfpointdiff{\pgf@nfold@join@start}{\pgf@nfold@join@end}}
106 \pgfpointtaxicabnorm\pgfutil@tempdima
107 \ifdim\pgfutil@tempdima>0.1pt\relax
108 \def\pgf@nfold@deltaphi{#6}%
109 \def\pgf@nfold@shortenstartjoin{#7}%
110 \ifdim\pgf@nfold@deltaphi pt<0pt
111 \def\turnindicator{1}
112 \else
113 \def\turnindicator{-1}
114 \fi
115 \pgfutil@tempdima=\pgf@nfold@shift@fraction pt\relax
116 \pgfutil@tempdima=\turnindicator\pgfutil@tempdima
117 \advance\pgfutil@tempdima by-1pt\relax
118 \pgfutil@tempdima=-.5\pgfutil@tempdima
119 \edef\insidepercentage{\pgf@sys@tonumber\pgfutil@tempdima}%
120 #8%
121 \fi
122 }
123
124
125 \def\pgf@nfold@process@join{%
126 \pgf@xa=\pgf@nfold@deltaphi@start pt\relax
127 \ifdim\pgf@xa<0pt\relax
128 \pgf@xa=-\pgf@xa
129 \fi
130 \ifdim\pgf@xa>1pt\relax
131 \edef\pgf@nfold@jointype{\pgf@cached@linejoin}
132 \if\pgf@cached@linejoin m%
133 \pgf@xa=.5\pgf@xa
134 \pgfmathcos@{\pgf@sys@tonumber\pgf@xa}
135 \pgf@xa=\pgfmathresult pt\relax
136 \pgf@xa=\pgf@nfold@cached@miterlimit\pgf@xa
137 \ifdim\pgf@xa>1pt\relax
138 \def\pgf@nfold@tmp@joinmacro{\pgf@nfold@miterjoin}
139 \else
140 \def\pgf@nfold@tmp@joinmacro{\pgf@nfold@beveljoin}
141 \fi
142 \else
143 \if b\pgf@cached@linejoin\relax
144 \def\pgf@nfold@tmp@joinmacro{\pgf@nfold@beveljoin}
145 \else
146 \def\pgf@nfold@tmp@joinmacro{\pgf@nfold@roundjoin}
147 \fi
148 \fi
149 \edef\pgf@nfold@macrotoadd{%
150 \noexpand\pgf@nfold@token@join{\pgf@nfold@cur@first}{\pgf@nfold@prev@segment@end}
151 {\pgf@nfold@cur@movedfirst}{\pgf@nfold@prev@angle@ii}{\pgf@nfold@cur@angle@i}%
152 {\pgf@nfold@deltaphi@start}{\pgf@nfold@shortenstartjoin}{%
153 \expandafter\noexpand\pgf@nfold@tmp@joinmacro%
154 \expandafter\noexpand\ifpgf@nfold@closejoinsedgecase%
155 \pgf@nfold@token@finish@edgecase{\pgf@nfold@cur@movedlast}%
156 \else%
157 \pgf@nfold@token@finish@normal%
158 \fi%
159 }%
160 }%
161 \pgf@nfold@addmacro\pgf@parsed@cur@conn@seg%
162 \fi%
163 }
164
165
166 \def\pgf@nfold@token@finish@normal{%
167 \pgfpathlineto{\pgf@nfold@join@end}%
168 }
169
170 \def\pgf@nfold@token@finish@edgecase#1{%
171 \pgf@nfold@join@end%
172 \ifdim\insidepercentage pt<.5pt\relax%
173 \pgf@process{\pgfpointadd{#1}{\pgfpointpolar{\pgf@nfold@secondang+90}{\pgf@nfold@shiftamount}}}
174 \fi%
175 \pgfpathlineto{}%
176 }
177
178
179
180 \newif\ifpgf@nfold@continuesegment
181 \newif\ifpgf@nfold@closejoinsedgecase
182 \newif\ifpgf@nfold@angletoosharp
183 \newif\ifpgf@nfold@intersectionsnotloaded
184 \newif\ifpgf@nfold@lastconnsubpath
185
186
187 \def\pgf@nfold@process@segment{%
188 \if\pgf@nfold@cur@visible0
189 \if\pgf@nfold@cur@type m
190 \if\pgf@nfold@start@arrowcode1
191 \ifpgf@nfold@lastconnsubpath
192 \if\pgf@nfold@prev@type f
193 \if\pgf@nfold@next@visible1
194 \edef\pgf@nfold@macrotoadd{%
195 \noexpand\pgf@nfold@extendtotip{s}{\pgf@nfold@cur@last}{\pgf@nfold@next@angle@i}
196 }%
197 \pgf@nfold@addmacro\pgf@parsed@cur@conn@seg%
198 \let\pgf@nfold@cur@type l
199 \let\pgf@nfold@cur@visible1
200 \let\pgf@nfold@cur@angle@ii\pgf@nfold@next@angle@i
201 \let\pgf@nfold@cur@tang@ii\pgf@nfold@next@tang@i
202 \def\pgf@nfold@deltaphi@end{0}
203 \pgf@nfold@angletoosharpfalse
204 \fi
205 \fi%
206 \fi
207 \fi
208 \fi%
209 \else%
210 \let\pgf@nfold@cur@movedfirst\pgf@nfold@cur@first
211 \let\pgf@nfold@cur@movedlast\pgf@nfold@cur@last
212 \def\pgf@nfold@shortenstartjoin{0}
213 \def\pgf@nfold@shortenendjoin{0}
214 \pgf@nfold@closejoinsedgecasefalse
215 \if\pgf@nfold@prev@visible0
216 \pgf@nfold@continuesegmentfalse
217 \else
218 \pgf@nfold@continuesegmenttrue
219 \let\pgf@nfold@deltaphi@start\pgf@nfold@deltaphi@end
220 \pgf@xb=\pgf@nfold@deltaphi@start pt\relax
221 \ifdim\pgf@xb<0pt\relax
222 \pgf@xb=-\pgf@xb
223 \fi
224 \ifpgf@nfold@angletoosharp\else
225 \ifdim\pgf@xb>0.5pt\relax
226 \pgf@yb=.5\pgf@xb
227 \pgfmathtan@{\pgf@sys@tonumber\pgf@yb}
228 \pgf@yb=\pgf@nfold@hwidth\relax
229 \pgf@yb=\pgfmathresult\pgf@yb
230 \edef\pgf@nfold@shortenstartjoin{\pgf@sys@tonumber\pgf@yb}
231 \pgfextract@process\pgf@nfold@cur@movedfirst{%
232 \pgfpointadd{\pgf@nfold@cur@first}%
233 {\pgfqpointscale{\pgf@nfold@shortenstartjoin}{\pgf@nfold@cur@tang@i}}}%
234 \if\pgf@nfold@cur@type c
235 \pgf@process{\pgfpointdiff{\pgf@nfold@cur@first}{\pgf@nfold@cur@supporta}}
236 \pgfmathveclen@{\pgf@sys@tonumber\pgf@x}{\pgf@sys@tonumber\pgf@y}
237 \ifdim\pgfmathresult pt>0.1pt\relax
238 \pgfmathveclen@{\pgfmathresult}{\pgf@sys@tonumber\pgf@yb}
239 \pgfextract@process\pgf@nfold@cur@supporta{\pgfpointadd%
240 {\pgf@nfold@cur@first}%
241 {\pgfqpointscale{\pgfmathresult}{\pgf@nfold@cur@tang@i}}}%
242 \else
243 \let\pgf@nfold@cur@supporta\pgf@nfold@cur@movedfirst
244 \fi
245 \fi
246 \fi
247 \fi
248 \fi
249 \if\pgf@nfold@next@visible1
250 \pgfmathsubtract@{\pgf@nfold@next@angle@i}{\pgf@nfold@cur@angle@ii}
251 \pgf@nfold@clampangle
252 \edef\pgf@nfold@deltaphi@end{\pgfmathresult}
253 \pgf@xb=\pgf@nfold@deltaphi@end pt\relax
254 \ifdim\pgf@xb<0pt\relax
255 \pgf@xb=-\pgf@xb
256 \fi
257 \ifdim\pgf@xb>178pt\relax
258 \pgfutil@packagewarning{tikz-nfold}{Angle too sharp, expect visual errors}
259 \pgf@nfold@angletoosharptrue
260 \else
261 \pgf@nfold@angletoosharpfalse
262 \ifdim\pgf@xb>0.5pt\relax
263 \pgf@yb=.5\pgf@xb
264 \pgfmathtan@{\pgf@sys@tonumber\pgf@yb}
265 \pgf@yb=\pgf@nfold@hwidth\relax
266 \pgf@yb=\pgfmathresult\pgf@yb
267 \edef\pgf@nfold@shortenendjoin{\pgf@sys@tonumber\pgf@yb}
268 \pgf@yb=-\pgf@yb
269 \pgfextract@process\pgf@nfold@cur@movedlast{%
270 \pgfpointadd{\pgf@nfold@cur@last}%
271 {\pgfqpointscale{-\pgf@nfold@shortenendjoin}{\pgf@nfold@cur@tang@ii}}}%
272 \pgfextract@process\pgf@nfold@cur@movedlast{%
273 \pgfpointadd{\pgf@nfold@cur@last}%
274 {\pgfqpointpolar{\pgf@nfold@cur@angle@ii}{\pgf@yb}}}%
275 \if\pgf@nfold@cur@type c
276 \pgf@process{\pgfpointdiff{\pgf@nfold@cur@supportb}{\pgf@nfold@cur@last}}
277 \pgfmathveclen@{\pgf@sys@tonumber\pgf@x}{\pgf@sys@tonumber\pgf@y}
278 \ifdim\pgfmathresult pt>0.1pt\relax
279 \pgfmathveclen@{\pgfmathresult}{\pgf@sys@tonumber\pgf@yb}
280 \pgfextract@process\pgf@nfold@cur@supportb{\pgfpointadd%
281 {\pgf@nfold@cur@last}%
282 {\pgfqpointscale{-\pgfmathresult}{\pgf@nfold@cur@tang@ii}}}%
283 \else
284 \let\pgf@nfold@cur@supportb\pgf@nfold@cur@movedlast
285 \fi
286 \fi
287 \fi
288 \fi
289 \if\pgf@nfold@cur@type l
290 \pgf@process{\pgfpointdiff{\pgf@nfold@cur@first}{\pgf@nfold@cur@last}}
291 \pgfmathveclen@{\pgf@sys@tonumber\pgf@x}{\pgf@sys@tonumber\pgf@y}
292 \pgf@xa=\pgf@nfold@shortenstartjoin pt\relax
293 \advance\pgf@xa by\pgf@nfold@shortenendjoin pt\relax
294 \ifdim\pgf@xa>\pgfmathresult pt\relax
295 \pgf@nfold@closejoinsedgecasetrue
296 \fi
297 \fi
298 \fi%
299 \if\pgf@nfold@prev@visible0%
300 \ifpgf@nfold@closejoinsedgecase
301 \edef\pgf@nfold@macrotoadd{%
302 \noexpand\pgf@nfold@token@edgecase@movetostart{\pgf@nfold@cur@movedfirst}{\pgf@nfold@cur@angle@i}%
303 }%
304 \pgf@nfold@addmacro\pgf@parsed@cur@conn@seg%
305 \fi
306 \else
307 \ifpgf@nfold@angletoosharp\else
308 \if\pgf@nfold@cur@type z\else
309 \pgf@nfold@process@join
310 \fi
311 \fi
312 \fi
313 \let\pgf@nfold@prev@segment@end\pgf@nfold@cur@movedlast
314 \if\pgf@nfold@cur@type i
315 \let\pgf@nfold@connsubpath@tang@i\pgf@nfold@next@tang@i%
316 \let\pgf@nfold@connsubpath@angle@i\pgf@nfold@next@angle@i%
317 \fi
318 \if\pgf@nfold@cur@type l
319 \ifpgf@nfold@closejoinsedgecase\else
320 \edef\pgf@nfold@macrotoadd{%
321 \expandafter\noexpand\ifpgf@nfold@continuesegment%
322 \pgf@nfold@token@lineto@continue%
323 \else%
324 \pgf@nfold@token@lineto%
325 \fi{\pgf@nfold@cur@movedfirst}{\pgf@nfold@cur@movedlast}{\pgf@nfold@cur@tang@i}%
326 }%
327 \pgf@nfold@addmacro\pgf@parsed@cur@conn@seg%
328 \fi
329 \fi
330 \if\pgf@nfold@cur@type o
331 \def\pgf@nfold@macrotoadd{\pgf@nfold@token@closepath}%
332 \pgf@nfold@addmacro\pgf@parsed@cur@conn@seg%
333 \fi
334 \if\pgf@nfold@cur@type z
335 \def\pgf@nfold@macrotoadd{\pgf@nfold@token@closepath}%
336 \pgf@nfold@addmacro\pgf@parsed@cur@conn@seg%
337 \fi
338 \if\pgf@nfold@cur@type c
339 \ifpgf@nfold@continuesegment
340 \pgf@subdividecurve{\pgf@nfold@cur@movedfirst}{\pgf@nfold@cur@supporta}{\pgf@nfold@cur@supportb}{\pgf@nfold@cur@movedlast}{\pgf@offset@max@recursion}{0}{\pgf@nfold@addcurvesegment@callback@continue}
341 \else
342 \pgf@subdividecurve{\pgf@nfold@cur@movedfirst}{\pgf@nfold@cur@supporta}{\pgf@nfold@cur@supportb}{\pgf@nfold@cur@movedlast}{\pgf@offset@max@recursion}{0}{\pgf@nfold@addcurvesegment@callback}%
343 \fi
344 \fi
345 \if\pgf@nfold@cur@type i
346 \edef\pgf@nfold@macrotoadd{%
347 \noexpand\pgf@nfold@token@invisibleline{\pgf@nfold@cur@movedfirst}{\pgf@nfold@cur@movedlast}{\pgf@nfold@cur@tang@i}%
348 }%
349 \pgf@nfold@addmacro\pgf@parsed@cur@conn@seg%
350 \fi
351 \if\pgf@nfold@next@type t%
352 \ifnum\pgf@nfold@end@arrowcode=1
353 \edef\pgf@nfold@macrotoadd{%
354 \noexpand\pgf@nfold@extendtotip{e}{\pgf@nfold@cur@last}{\pgf@nfold@cur@angle@ii}}%
355 \pgf@nfold@addmacro\pgf@parsed@cur@conn@seg%
356 \fi%
357 \fi%
358 \fi%
359 }
360
361
362 \def\pgf@nfold@addcurvesegment@callback#1#2#3#4#5{%
363 \if#50%
364 \edef\pgf@nfold@macrotoadd{%
365 \noexpand\pgf@nfold@token@curveto{#1}{#2}{#3}{#4}{\pgf@tmp@tang@i}{\pgf@tmp@tang@ii}%
366 }%
367 \pgf@nfold@addmacro\pgf@parsed@cur@conn@seg%
368 \else%
369 \pgf@nfold@addcurvesegment@callback@continue{#1}{#2}{#3}{#4}{#5}%
370 \fi%
371 }
372
373 \def\pgf@nfold@addcurvesegment@callback@continue#1#2#3#4#5{%
374 \edef\pgf@nfold@macrotoadd{%
375 \noexpand\pgf@nfold@token@curveto@continue{#1}{#2}{#3}{#4}{\pgf@tmp@tang@i}{\pgf@tmp@tang@ii}%
376 }%
377 \pgf@nfold@addmacro\pgf@parsed@cur@conn@seg%
378 }
379
380
381
382 \expandafter\def\csname pgf@nfold@intersec@cache@2@3\endcsname{\pgfqpoint{2pt}{0pt}}
383 \expandafter\def\csname pgf@nfold@intersec@cache@2@4\endcsname{\pgfqpoint{0.94063pt}{-0.33333pt}}
384 \expandafter\def\csname pgf@nfold@intersec@cache@3@4\endcsname{\pgfqpoint{0.94063pt}{0.33333pt}}
385 \expandafter\def\csname pgf@nfold@intersec@cache@2@5\endcsname{\pgfqpoint{0.64167pt}{-0.5pt}}
386 \expandafter\def\csname pgf@nfold@intersec@cache@3@5\endcsname{\pgfqpoint{2pt}{0pt}}
387 \expandafter\def\csname pgf@nfold@intersec@cache@4@5\endcsname{\pgfqpoint{0.64167pt}{0.5pt}}
388 \def\pgf@nfold@intersec@numcached{5}
389
390 \newif\ifpgf@nfold@ontheedge
391 \def\pgf@nfold@extendtotip#1#2#3{
392 \ifpgf@nfold@intersectionsnotloaded
393 \pgfutil@packageerror{tikz-nfold}{%
394 If `nfold' is larger than \pgf@nfold@intersec@numcached\space and you use
395 an `Implies' arrow tip you need to say \string\usetikzlibrary{intersections}}{}
396 \else
397 \pgf@nfold@ontheedgetrue
398 \ifnum\pgf@nfold@index>1\relax\ifnum\pgf@nfold@index<\pgf@nfold@order\relax%
399 \pgf@nfold@ontheedgefalse
400 \fi\fi
401 \ifpgf@nfold@ontheedge%
402 \if#1s
403 \pgfpathmoveto{\pgfpointadd{#2}{\pgfpointpolar{#3+90}{\pgf@nfold@shiftamount}}}%
404 \fi
405 \else
406 \ifcsname pgf@nfold@intersec@cache@\the\pgf@nfold@index @\the\pgf@nfold@order\endcsname
407 \pgfextract@process\pgf@nfold@arrowintersect
408 {\csname pgf@nfold@intersec@cache@\the\pgf@nfold@index @\the\pgf@nfold@order\endcsname}%
409 \else
410 \pgfintersectionofpaths{
411 \pgfpathmoveto{\pgfqpoint{-1.4pt}{2.65pt}}
412 \pgfpathcurveto{\pgfqpoint{-0.75pt}{1.25pt}}{\pgfqpoint{1pt}{0.05pt}}{\pgfqpoint{2pt}{0pt}}
413 \pgfpathcurveto{\pgfqpoint{1pt}{-0.05pt}}{\pgfqpoint{-0.75pt}{-1.25pt}}{\pgfqpoint{-1.4pt}{-2.65pt}}
414 }{
415 \pgfpathmoveto{\pgfqpoint{-3pt}{\pgf@nfold@shift@fraction pt}}
416 \pgfpathlineto{\pgfqpoint{3pt}{\pgf@nfold@shift@fraction pt}}
417 }
418 \ifnum\pgfintersectionsolutions>0
419 \pgfextract@process\pgf@nfold@arrowintersect{\pgfpointintersectionsolution{1}}%
420 \immediate\write17{tikz-nfold: computed intersection cache@\the\pgf@nfold@index @\the\pgf@nfold@order: \string\pgfqpoint{\the\pgf@x}{\the\pgf@y}^^J}
421 \expandafter\xdef\csname pgf@nfold@intersec@cache@\the\pgf@nfold@index @\the\pgf@nfold@order\endcsname{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}
422 \else
423 \pgfutil@packagewarning{tikz-nfold}{did not find intersection}
424 \pgfextract@process\pgf@nfold@arrowintersect{\pgfqpoint{0pt}{\pgf@nfold@shift@fraction pt}}%
425 \fi
426 \fi%
427 \begingroup
428 \pgftransformreset
429 \pgftransformshift{#2}
430 \pgftransformrotate{#3}
431 \if#1s
432 \pgftransformxscale{-1}
433 \fi
434 \pgfutil@tempdima=\pgf@nfold@hwidth
435 \pgfutil@tempdima=\pgf@nfold@shift@fraction\pgfutil@tempdima
436 \pgfextract@process\pgf@nfold@startofextension
437 {\pgfpointtransformed{\pgfqpoint{0pt}{\pgfutil@tempdima}}}
438 \pgftransformshift{\pgfqpoint{.42\pgflinewidth}{0pt}}
439 \pgftransformscale{\pgf@nfold@hwidth}
440 \pgfextract@process\pgf@nfold@arrowintersect{\pgfpointtransformed{\pgf@nfold@arrowintersect}}
441 \global\let\pgf@nfold@startofextension\pgf@nfold@startofextension
442 \global\let\pgf@nfold@arrowintersect\pgf@nfold@arrowintersect
443 \endgroup
444 \if#1s
445 \pgfpathmoveto{\pgf@nfold@arrowintersect}
446 \pgfpathlineto{\pgf@nfold@startofextension}
447 \else\if#1e
448 \pgfpathlineto{\pgf@nfold@arrowintersect}
449 \else
450 \pgfutil@packageerror{tikz-nfold}{Invalid argument to \string\pgf@nfold@extendtotip: \meaning#1}{}
451 \fi\fi
452 \pgftransformreset
453 \fi%
454 \fi%
455 }
456
457
458 \def\pgf@nfold@start@arrowcode{0}
459 \def\pgf@nfold@end@arrowcode{0}
460
461 \def\pgf@nfold@parsearrows{
462 \ifpgfutil@tempswa%
463 \expandafter\pgf@nfold@parsearrowmacro\pgf@start@tip@sequence\relax
464 \let\pgf@nfold@start@arrowcode\pgf@nfold@detectedarrow
465 \expandafter\pgf@nfold@parsearrowmacro\pgf@end@tip@sequence\relax
466 \let\pgf@nfold@end@arrowcode\pgf@nfold@detectedarrow
467 \else
468 \def\pgf@nfold@start@arrowcode{0}
469 \def\pgf@nfold@end@arrowcode{0}
470 \fi
471 }
472
473 \def\pgf@nfold@parsearrowmacro#1{%
474 \def\pgf@nfold@detectedarrow{0}
475 \ifx#1\relax
476 \let\pgf@next\relax
477 \else
478 \ifx#1\pgf@arrow@handle
479 \let\pgf@next\pgf@nfold@parse@arrow@handle
480 \else
481 \ifx#1\pgf@arrow@handle@shorthand@empty
482 \let\pgf@next\pgf@nfold@parse@shorthandempty
483 \else
484 \let\pgf@next\pgfutil@gobble@until@relax
485 \fi
486 \fi
487 \fi
488 \pgf@next
489 }
490
491 \def\pgf@nfold@param@Implies{Implies}
492
493 \def\pgf@nfold@parse@arrow@handle#1{%
494 \def\pgf@tmp{#1}
495 \ifx\pgf@tmp\pgf@nfold@param@Implies
496 \def\pgf@nfold@detectedarrow{1}
497 \fi
498 \pgfutil@gobble@until@relax
499 }
500
501 \def\pgf@nfold@parse@shorthandempty#1{
502 \expandafter\def\expandafter\pgf@tmp\expandafter{#1}
503 \expandafter\pgf@nfold@parsearrowmacro\pgf@tmp\relax
504 \pgfutil@gobble@until@relax
505 }
506
507
508
509 \newcount\pgf@nfold@order
510 \pgf@nfold@order=1
511
512 \def\pgf@nfold@preparenfoldpath{%
513 \ifnum\pgf@nfold@order>1\relax
514 \ifdim\pgfinnerlinewidth>0pt\relax
515 \pgfsyssoftpath@getcurrentpath\pgf@nfold@cachedpath%
516 \pgfsyssoftpath@setcurrentpath\pgfutil@empty%
517 \else
518 \pgfutil@packageerror{tikz-nfold}{Must set \string\pgfinnerlinewidth\space to use nfold, e.g. by setting /tikz/double distance}{}
519 \fi
520 \fi
521 }
522
523 \let\pgf@nfold@old@path@check@proper\pgf@path@check@proper
524 \def\pgf@path@check@proper{%
525 \pgf@nfold@old@path@check@proper%
526 \ifpgfutil@tempswa\else%
527 \pgf@nfold@preparenfoldpath%
528 \fi%
529 }
530
531 \let\pgf@nfold@old@prepare@start@of@path\pgf@prepare@start@of@path
532 \def\pgf@prepare@start@of@path{%
533 \pgf@nfold@old@prepare@start@of@path%
534 \pgf@nfold@preparenfoldpath%
535 }
536
537 \let\pgf@nfold@old@stroke@inner@line\pgf@stroke@inner@line
538 \def\pgf@stroke@inner@line{%
539 \ifnum\pgf@nfold@order>1\relax%
540 \pgf@nfold@render@cached@softpath%
541 \else%
542 \pgf@nfold@old@stroke@inner@line%
543 \fi%
544 }
545
546
547
548
549 \def\pgf@nfold@parsemoveto#1#2{%
550 \ifx\pgf@cur@conn@subpath\pgfutil@empty%
551 \def\pgf@nfold@parser@last@moveto{{#1}{#2}}%
552 \def\pgf@cur@conn@subpath{\relax}%
553 \else%
554 \def\pgf@nfold@macrotoadd{\pgf@nfold@processmoveto{#1}{#2}}%
555 \pgf@nfold@addmacro\pgf@cur@conn@subpath%
556 \pgf@nfold@lastconnsubpathfalse%
557 \pgf@nfold@process@conn@subpath%
558 \let\pgf@nfold@last@closepath@from\pgfutil@empty%
559 \let\pgf@cur@conn@subpath\pgfutil@empty%
560 \pgf@nfold@parser@setupfirst%
561 \def\pgf@nfold@parser@last@moveto{{#1}{#2}}%
562 \fi%
563 \pgf@nfold@parsesoftpath@finish{#1}{#2}%
564 }
565
566 \def\pgf@nfold@parselineto#1#2{%
567 \def\pgf@nfold@macrotoadd{\pgf@nfold@processlineto{#1}{#2}}%
568 \pgf@nfold@addmacro\pgf@cur@conn@subpath%
569 \pgf@nfold@parsesoftpath@finish{#1}{#2}%
570 }
571
572 \def\pgf@nfold@parseclosepath#1#2{%
573 \let\pgf@nfold@last@closepath@from\pgf@nfold@parser@previous@pt%
574 \def\pgf@nfold@macrotoadd{\pgf@nfold@processclosepath{#1}{#2}}%
575 \pgf@nfold@addmacro\pgf@cur@conn@subpath%
576 \pgf@nfold@parsesoftpath@finish{#1}{#2}%
577 }
578
579 \def\pgf@nfold@parsecurveto#1#2{%
580 \edef\pgf@nfold@macrotoadd{\noexpand\pgf@nfold@processcurveto\pgf@nfold@parser@supporta\pgf@nfold@parser@supportb{#1}{#2}}%
581 \pgf@nfold@addmacro\pgf@cur@conn@subpath%
582 \pgf@nfold@parsesoftpath@finish{#1}{#2}%
583 }
584
585 \def\pgf@nfold@parserect#1#2#3#4{%
586 \pgf@nfold@parsemoveto{#1}{#2}%
587 \pgf@xc=#1\relax
588 \pgf@yc=#2\relax
589 \pgf@xd=#3\relax
590 \pgf@yd=#4\relax
591 \advance\pgf@yc\pgf@yd%
592 \edef\pgf@temp{{\the\pgf@xc}{\the\pgf@yc}}%
593 \expandafter\pgf@nfold@parselineto\pgf@temp%
594 \advance\pgf@xc\pgf@xd%
595 \edef\pgf@temp{{\the\pgf@xc}{\the\pgf@yc}}%
596 \expandafter\pgf@nfold@parselineto\pgf@temp%
597 \advance\pgf@yc-\pgf@yd%
598 \edef\pgf@temp{{\the\pgf@xc}{\the\pgf@yc}}%
599 \expandafter\pgf@nfold@parselineto\pgf@temp%
600 \advance\pgf@xc-\pgf@xd%
601 \edef\pgf@temp{{\the\pgf@xc}{\the\pgf@yc}}%
602 \expandafter\pgf@nfold@parseclosepath\pgf@temp%
603 \pgf@nfold@parsemoveto{#1}{#2}%
604 }
605
606
607 \def\pgf@nfold@parsesoftpath#1#2{%
608 \let\pgf@cur@conn@subpath\pgfutil@empty%
609 \let\pgf@all@parsed@subpaths\pgfutil@empty%
610 \edef\pgf@nfold@parser@last@moveto{{\the\pgf@path@lastx}{\the\pgf@path@lasty}}%
611 \let\pgf@nfold@last@closepath@from\pgfutil@empty%
612 \pgf@nfold@parser@setupfirst%
613 \expandafter\pgf@nfold@@parsesoftpath#1\pgf@stop{}{}%
614 \let#2\pgf@all@parsed@subpaths%
615 }%
616
617 \def\pgf@nfold@@parsesoftpath#1#2#3{%
618 \let\pgf@next\pgf@nfold@@parsesoftpath%
619 \ifx#1\pgf@stop%
620 \def\pgf@nfold@macrotoadd{\pgf@nfold@processlast}%
621 \pgf@nfold@addmacro\pgf@cur@conn@subpath%
622 \pgf@nfold@lastconnsubpathtrue%
623 \pgf@nfold@process@conn@subpath%
624 \let\pgf@next\relax%
625 \else%
626 \ifx#1\pgfsyssoftpath@movetotoken%
627 \pgf@nfold@parsemoveto{#2}{#3}%
628 \else%
629 \ifx#1\pgfsyssoftpath@linetotoken%
630 \pgf@nfold@parselineto{#2}{#3}%
631 \else%
632 \ifx#1\pgfsyssoftpath@curvetosupportatoken%
633 \def\pgf@nfold@parser@supporta{{#2}{#3}}%
634 \else%
635 \ifx#1\pgfsyssoftpath@curvetosupportbtoken%
636 \def\pgf@nfold@parser@supportb{{#2}{#3}}%
637 \else%
638 \ifx#1\pgfsyssoftpath@curvetotoken%
639 \pgf@nfold@parsecurveto{#2}{#3}%
640 \else%
641 \ifx#1\pgfsyssoftpath@closepathtoken%
642 \pgf@nfold@parseclosepath{#2}{#3}%
643 \else%
644 \ifx#1\pgfsyssoftpath@rectcornertoken%
645 \def\pgf@nfold@parser@rectcorner{{#2}{#3}}%
646 \else%
647 \ifx#1\pgfsyssoftpath@rectsizetoken%
648 \expandafter\pgf@nfold@parserect\pgf@nfold@parser@rectcorner{#2}{#3}%
649 \else%
650 \pgfutil@packageerror{tikz-nfold}{Unrecognised soft path token `#1'}{}%
651 \fi%
652 \fi%
653 \fi%
654 \fi%
655 \fi%
656 \fi%
657 \fi%
658 \fi%
659 \fi%
660 \pgf@next%
661 }%
662
663 \def\pgf@nfold@parsesoftpath@finish#1#2{%
664 \def\pgf@nfold@parser@previous@pt{{#1}{#2}}%
665 \let\pgf@nfold@sectolast@segment\pgf@nfold@last@segment%
666 \let\pgf@nfold@last@segment\pgf@nfold@macrotoadd%
667 }
668
669 \def\pgf@nfold@process@conn@subpath{%
670 \let\pgf@parsed@cur@conn@seg\pgfutil@empty%
671 \ifx\pgf@nfold@last@closepath@from\pgfutil@empty%
672 \expandafter\pgf@nfold@processmoveto\pgf@nfold@parser@last@moveto%
673 \else%
674 \expandafter\pgf@nfold@processmoveto\pgf@nfold@last@closepath@from%
675 \expandafter\pgf@nfold@processinvisibleline\pgf@nfold@parser@last@moveto%
676 \fi%
677 \pgf@cur@conn@subpath%
678 \let\pgf@nfold@macrotoadd\pgf@parsed@cur@conn@seg%
679 \pgf@nfold@addmacro\pgf@all@parsed@subpaths%
680 }
681
682
683 \def\pgf@nfold@processmoveto#1#2{%
684 \pgf@nfold@process@moveup%
685 \let\pgf@nfold@next@type=m%
686 \let\pgf@nfold@next@visible=0%
687 \edef\pgf@nfold@next@last{\pgf@x#1\pgf@y#2}%
688 \pgf@nfold@process@segment%
689 }%
690
691 \def\pgf@nfold@process@line@common#1#2#3{%
692 \pgf@nfold@process@moveup%
693 \pgfextract@process\pgf@tmp@tang@i{\pgfpointnormalised{}\global\let\pgf@nfold@tmp\pgf@tmp}
694 \let\pgf@nfold@next@type=#3%
695 \let\pgf@nfold@next@visible=1%
696 \let\pgf@nfold@next@tang@i\pgf@tmp@tang@i
697 \let\pgf@nfold@next@tang@ii\pgf@tmp@tang@i
698 \let\pgf@nfold@next@angle@i\pgf@nfold@tmp
699 \let\pgf@nfold@next@angle@ii\pgf@nfold@tmp
700 \let\pgf@nfold@next@first\pgf@nfold@cur@last
701 \def\pgf@nfold@next@last{\pgf@x#1\pgf@y#2}%
702 \pgf@nfold@process@segment%
703 }
704
705 \def\pgf@nfold@processlineto#1#2{%
706 \pgf@process{\pgfpointdiff{\pgf@nfold@next@last}{\pgf@x#1\pgf@y#2}}%
707 \pgfpointtaxicabnorm\pgf@xa%
708 \ifdim\pgf@xa>.1pt\relax%
709 \pgf@nfold@process@line@common{#1}{#2}{l}%
710 \fi%
711 }%
712
713 \def\pgf@nfold@processcurveto#1#2#3#4#5#6{%
714 \pgf@nfold@process@moveup%
715 \pgf@offset@compute@tangents{\pgf@nfold@cur@last}{\pgf@x#1\pgf@y#2}{\pgf@x#3\pgf@y#4}{\pgf@x#5\pgf@y#6}%
716 \let\pgf@nfold@next@type=c%
717 \let\pgf@nfold@next@visible=1%
718 \let\pgf@nfold@next@tang@i=\pgf@tmp@tang@i
719 \let\pgf@nfold@next@tang@ii=\pgf@tmp@tang@ii
720 \let\pgf@nfold@next@angle@i\pgf@tmp@angle@i
721 \let\pgf@nfold@next@angle@ii\pgf@tmp@angle@ii
722 \let\pgf@nfold@next@first\pgf@nfold@cur@last
723 \def\pgf@nfold@next@supporta{\pgf@x#1\pgf@y#2}
724 \def\pgf@nfold@next@supportb{\pgf@x#3\pgf@y#4}
725 \def\pgf@nfold@next@last{\pgf@x#5\pgf@y#6}
726 \pgf@nfold@process@segment%
727 }%
728
729 \def\pgf@nfold@processclosepath#1#2{%
730 \pgf@process{\pgfpointdiff{\pgf@nfold@next@last}{\pgf@x#1\pgf@y#2}}%
731 \pgfpointtaxicabnorm\pgf@xa%
732 \ifdim\pgf@xa<0.1pt\relax%
733 \pgf@nfold@process@closepath@zerolength{#1}{#2}%
734 \else%
735 \pgf@nfold@process@line@common{#1}{#2}{o}%
736 \fi%
737 }%
738
739 \def\pgf@nfold@process@closepath@zerolength#1#2{%
740 \pgf@nfold@process@moveup%
741 \let\pgf@nfold@next@type=z%
742 \let\pgf@nfold@next@visible=1%
743 \let\pgf@nfold@next@tang@i\pgf@nfold@connsubpath@tang@i
744 \let\pgf@nfold@next@tang@ii\pgf@nfold@connsubpath@tang@i
745 \let\pgf@nfold@next@angle@i\pgf@nfold@connsubpath@angle@i
746 \let\pgf@nfold@next@angle@ii\pgf@nfold@connsubpath@angle@i
747 \let\pgf@nfold@next@first\pgf@nfold@cur@last
748 \def\pgf@nfold@next@last{\pgf@x#1\pgf@y#2}%
749 \pgf@nfold@process@segment%
750 }
751
752 \def\pgf@nfold@processinvisibleline#1#2{%
753 \pgf@process{\pgfpointdiff{\pgf@nfold@next@last}{\pgf@x#1\pgf@y#2}}%
754 \pgfpointtaxicabnorm\pgf@xa%
755 \ifdim\pgf@xa>.1pt\relax%
756 \pgf@nfold@process@line@common{#1}{#2}{i}%
757 \else%
758 \begingroup%
759 \let\pgf@nfold@process@segment\relax%
760 \pgf@nfold@sectolast@segment%
761 \global\let\pgf@nfold@tmp\pgf@nfold@next@tang@ii%
762 \endgroup%
763 \pgfextract@process\pgf@nfold@next@first{\pgfpointdiff{\pgf@nfold@tmp}{\pgfqpoint{#1}{#2}}}%
764 \pgf@nfold@tmp%
765 \pgf@nfold@process@line@common{#1}{#2}{i}%
766 \fi%
767 }%
768
769 \def\pgf@nfold@processlast{%
770 \pgf@nfold@process@moveup%
771 \let\pgf@nfold@next@type=t%
772 \let\pgf@nfold@next@visible=0%
773 \pgf@nfold@process@segment%
774 }
775
776 \def\pgf@nfold@addmacro#1{%
777 \expandafter\expandafter\expandafter\gdef%
778 \expandafter\expandafter\expandafter#1%
779 \expandafter\expandafter\expandafter{%
780 \expandafter#1\pgf@nfold@macrotoadd}%
781 }
782
783
784
785 \def\pgf@nfold@token@lineto#1#2#3{%
786 \pgfoffsetline@{#1}{#2}{\pgf@nfold@shiftamount}{#3}%
787 }
788
789 \def\pgf@nfold@token@lineto@continue#1#2#3{%
790 \pgfoffsetlinenomove@{#1}{#2}{\pgf@nfold@shiftamount}{#3}%
791 }
792
793 \def\pgf@nfold@token@invisibleline#1#2#3{%
794 \pgfqpointscale{\pgf@nfold@shiftamount}{#3}%
795 \pgf@xc=-\pgf@y%
796 \pgf@y=\pgf@x%
797 \pgf@x=\pgf@xc%
798 \pgfpathmoveto{\pgfpointadd{}{#2}}%
799 }
800
801 \def\pgf@nfold@token@curveto#1#2#3#4#5#6{%
802 \def\pgf@tmp@tang@i{#5}%
803 \def\pgf@tmp@tang@ii{#6}%
804 \pgf@offset@bezier@segment@{#1}{#2}{#3}{#4}{\pgf@nfold@shiftamount}%
805 \pgfpathmoveto{\pgf@bezier@offset@i}%
806 \pgfpathcurveto{\pgf@bezier@offset@ii}{\pgf@bezier@offset@iii}{\pgf@bezier@offset@iv}%
807 }
808
809 \def\pgf@nfold@token@curveto@continue#1#2#3#4#5#6{%
810 \def\pgf@tmp@tang@i{#5}%
811 \def\pgf@tmp@tang@ii{#6}%
812 \pgf@offset@bezier@segment@{#1}{#2}{#3}{#4}{\pgf@nfold@shiftamount}%
813 \pgfpathcurveto{\pgf@bezier@offset@ii}{\pgf@bezier@offset@iii}{\pgf@bezier@offset@iv}%
814 }
815
816 \def\pgf@nfold@token@closepath{%
817 \pgfpathclose%
818 }
819
820 \def\pgf@nfold@token@edgecase@movetostart#1#2{%
821 \pgfpathmoveto{\pgfpointadd%
822 {#1}{\pgfpointpolar{#2+90}{\pgf@nfold@shiftamount}}}%
823 }
824
825
826 \def\pgf@nfold@parser@setupfirst{%
827 \let\pgf@nfold@next@type=f%
828 \let\pgf@nfold@next@visible=0%
829 \edef\pgf@nfold@next@last{\pgf@x\the\pgf@path@lastx\pgf@y\the\pgf@path@lasty}%
830 }
831
832 \def\pgf@nfold@clampangle{
833 \ifdim\pgfmathresult pt<-180pt\relax
834 \pgfutil@tempdima=\pgfmathresult pt
835 \advance\pgfutil@tempdima by 360pt
836 \edef\pgfmathresult{\pgf@sys@tonumber\pgfutil@tempdima}
837 \else\ifdim\pgfmathresult pt>180pt\relax
838 \pgfutil@tempdima=\pgfmathresult pt
839 \advance\pgfutil@tempdima by -360pt
840 \edef\pgfmathresult{\pgf@sys@tonumber\pgfutil@tempdima}
841 \fi\fi
842 }
843
844
845 \def\pgf@nfold@process@moveup{%
846 \let\pgf@nfold@prev@type\pgf@nfold@cur@type%
847 \let\pgf@nfold@prev@visible\pgf@nfold@cur@visible%
848 \let\pgf@nfold@prev@tang@i\pgf@nfold@cur@tang@i%
849 \let\pgf@nfold@prev@tang@ii\pgf@nfold@cur@tang@ii%
850 \let\pgf@nfold@prev@angle@i\pgf@nfold@cur@angle@i%
851 \let\pgf@nfold@prev@angle@ii\pgf@nfold@cur@angle@ii%
852 \let\pgf@nfold@prev@first\pgf@nfold@cur@first%
853 \let\pgf@nfold@prev@supporta\pgf@nfold@cur@supporta%
854 \let\pgf@nfold@prev@supportb\pgf@nfold@cur@supportb%
855 \let\pgf@nfold@prev@last\pgf@nfold@cur@last%
856 \let\pgf@nfold@cur@type\pgf@nfold@next@type%
857 \let\pgf@nfold@cur@visible\pgf@nfold@next@visible%
858 \let\pgf@nfold@cur@tang@i\pgf@nfold@next@tang@i%
859 \let\pgf@nfold@cur@tang@ii\pgf@nfold@next@tang@ii%
860 \let\pgf@nfold@cur@angle@i\pgf@nfold@next@angle@i%
861 \let\pgf@nfold@cur@angle@ii\pgf@nfold@next@angle@ii
862 \let\pgf@nfold@cur@first\pgf@nfold@next@first%
863 \let\pgf@nfold@cur@supporta\pgf@nfold@next@supporta%
864 \let\pgf@nfold@cur@supportb\pgf@nfold@next@supportb%
865 \let\pgf@nfold@cur@last\pgf@nfold@next@last%
866 }
867
868
869 \def\pgfoffsetpath#1#2{%
870 \begingroup
871 \pgfmathsetlengthmacro\pgf@nfold@parsed@hwidth{#2}
872 \pgf@x=\pgf@nfold@parsed@hwidth\relax
873 \ifdim\pgf@x<0pt\relax
874 \pgf@x=-\pgf@x
875 \def\pgf@nfold@shift@fraction{-1}
876 \else
877 \def\pgf@nfold@shift@fraction{1}
878 \fi
879 \edef\pgf@nfold@parsed@hwidth{\the\pgf@x}
880 \pgfoffsetpathqfraction{#1}{\pgf@nfold@parsed@hwidth}{\pgf@nfold@shift@fraction}
881 \endgroup
882 }
883
884 \def\pgfoffsetpathfraction#1#2#3{%
885 \begingroup
886 \pgfmathsetlengthmacro\pgf@nfold@parsed@hwidth{#2}
887 \pgfmathsetmacro\pgf@nfold@shift@fraction{#3}
888 \pgfoffsetpathqfraction{#1}{\pgf@nfold@parsed@hwidth}{\pgf@nfold@shift@fraction}
889 \endgroup
890 }
891
892 \def\pgfoffsetpathindex#1#2#3#4{%
893 \begingroup
894 \pgfmathsetmacro\pgf@nfold@shift@fraction{-1+2*(#3-1)/(#4-1)}
895 \pgfoffsetpathqfraction{#1}{#2}{\pgf@nfold@shift@fraction}
896 \endgroup
897 }
898
899 \def\pgfoffsetpathqfraction#1#2#3{%
900 \begingroup
901 \pgf@x=#2\relax
902 \edef\pgf@nfold@hwidth{\the\pgf@x}
903 \edef\pgf@nfold@shift@fraction{#3}
904 \pgf@x=\pgf@nfold@shift@fraction\pgf@x\relax
905 \edef\pgf@nfold@shiftamount{\pgf@sys@tonumber\pgf@x}
906 \pgfprocessround{#1}{\pgf@nfold@cachedpath}%
907 \pgf@nfold@parsesoftpath{\pgf@nfold@cachedpath}{\parsedpath}%
908 \pgftransformreset%
909 \parsedpath%
910 \endgroup
911 }
912
913 \endinput