Debian Codegraph @

texmf-dist/doc/latex/tikz-ext/tikz-ext-manual-en-main-preamble.tex

raw
1 % !TeX TS-program = lualatex
2 % !TeX spellcheck = <none>
3 % !TeX root = tikz-ext-manual.tex
4 % Copyright 2022 by Qrrbrbirlbel
5 %
6 % This file may be distributed and/or modified
7 %
8 % 1. under the LaTeX Project Public License and/or
9 % 2. under the GNU Free Documentation License.
10 %
11
12 \usepackage[version=latest]{pgf}
13
14 \usepackage{xkeyval,calc,listings,tikz,fp}
15
16 \usepackage{imakeidx}
17 \makeindex
18
19 %%% Bibliography
20 \usepackage{csquotes}
21 \usepackage[backend=biber,style=numeric,backref]{biblatex}
22 \addbibresource{tikz-ext-manual.bib}
23
24 \usepackage{hyperref}
25 \hypersetup{%
26 colorlinks=true, % use true to enable colors below:
27 linkcolor=blue,%red,
28 filecolor=blue,%magenta,
29 urlcolor=blue,%cyan,
30 citecolor=blue,
31 pdfborder=0 0 0,
32 }
33
34 \usepackage[a4paper,left=2.25cm,right=2.25cm,top=2.5cm,bottom=2.5cm,nohead,columnsep=1cm]{geometry}
35 \usepackage{amsmath,amssymb}
36 \usepackage{xxcolor}
37 \usepackage{pifont}
38
39 \usepackage[T1]{fontenc}
40 % Promote `Missing character` reports to full errors
41 % require texlive 2021 or above
42 \tracinglostchars=3
43
44 \input{pgfmanual-en-macros}
45 \usepackage[no-math]{fontspec}
46 %\usepackage{unicode-math}
47 %\setmathfont[Scale=MatchUppercase]{libertinusmath-regular.otf}
48 \usepackage[ttscale=.85]{libertine}
49 \setmonofont[Scale=0.8]{Bitstream Vera Sans Mono}
50 \let\arrowvert\relax
51 \usepackage[libertine,liby]{newtxmath}
52 \makeatletter
53 \renewcommand*\l@section[2]{%
54 \ifnum \c@tocdepth >\z@
55 \addpenalty\@secpenalty
56 \addvspace{1.0em \@plus\p@}%
57 \setlength\@tempdima{2.5em}%
58 \begingroup
59 \parindent \z@ \rightskip \@pnumwidth
60 \parfillskip -\@pnumwidth
61 \leavevmode \bfseries
62 \advance\leftskip\@tempdima
63 \hskip -\leftskip
64 #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par
65 \endgroup
66 \fi}
67 \renewcommand*\l@subsection{\@dottedtocline{2}{2.5em}{3.3em}}
68 \renewcommand*\l@subsubsection{\@dottedtocline{3}{5.8em}{4.2em}}
69 \def\@pnumwidth{2.2em}
70 \makeatother
71
72 % Global styles:
73 \tikzset{
74 every plot/.style={prefix=plots/pgf-},
75 shape example/.style={
76 color=black!30,
77 draw,
78 fill=yellow!30,
79 line width=.5cm,
80 inner xsep=2.5cm,
81 inner ysep=0.5cm}
82 }
83
84 % Detect changed labels
85 % by David Carlisle https://tex.stackexchange.com/a/169245
86 \makeatletter
87 \def\@testdef#1#2#3{%
88 \def\reserved@a{#3}%
89 \expandafter\ifx\csname #1@#2\endcsname\reserved@a\else
90 \typeout{^^JLabel `#2' changed:^^J\meaning\reserved@a^^J\expandafter\meaning\csname #1@#2\endcsname^^J}%
91 \@tempswatrue
92 \fi}
93 \makeatother
94 \usepgfkeyslibrary{ext.pgfkeys-plus}
95 \usetikzlibrary{
96 decorations.markings,
97 ext.arrows,
98 ext.arrows-plus,
99 ext.calendar-plus,
100 ext.layers,
101 ext.misc,
102 ext.node-families,
103 ext.node-families.shapes.geometric,
104 ext.nodes,
105 ext.paths.arcto,
106 ext.paths.ortho,
107 ext.paths.timer,
108 ext.patterns.images,
109 ext.positioning-plus,
110 ext.scalepicture,
111 ext.shapes.heatmark,
112 ext.shapes.circlearrow,
113 ext.shapes.circlecrosssplit,
114 ext.shapes.rectangleroundedcorners,
115 ext.shapes.superellipse,
116 ext.shapes.uncenteredrectangle,
117 ext.topaths.arcthrough,
118 ext.topaths.autobend,
119 ext.transformations.mirror,
120 %
121 bending,
122 calc,
123 cd,
124 fit,
125 intersections,
126 matrix,
127 shapes.geometric,
128 spath3,
129 through,
130 trees,
131 }
132 \tikzextset{compat=0.6}
133 \usepackage{pgffor-ext}
134 %% needs Lua!
135 \usetikzlibrary{graphs,graphdrawing}
136 \usegdlibrary{force}
137
138 \makeatletter
139 \def\endofcodeexample#1{% original from tex/latex/pgf/doc/pgfmanual-en-macros.tex by Till Tantau et al
140 \endgroup%
141 \ifpgfmanual@setup@code%
142 \gdef\pgfmanual@do@this{%
143 {%
144 \returntospace%
145 \commenthandler%
146 \xdef\code@temp{#1}% removes returns and comments
147 }%
148 \edef\pgfmanualmcatcode{\the\catcode`\^^M}%
149 \catcode`\^^M=9\relax%
150 \expandafter\scantokens\expandafter{\code@temp}%
151 \catcode`\^^M=\pgfmanualmcatcode%
152 }%
153 \fi%
154 \ifcode@hidden\else
155 \ifcode@execute%
156 \setbox\codeexamplebox=\hbox{%
157 \ifx\code@render\pgfutil@empty%
158 {%
159 {%
160 \returntospace%
161 \commenthandler%
162 \xdef\code@temp{#1}% removes returns and comments
163 }%
164 \catcode`\^^M=9%
165 \colorbox{graphicbackground}{\color{black}\ignorespaces%
166 \code@pre\expandafter\scantokens\expandafter{\code@temp\ignorespaces}\code@post\ignorespaces}%
167 }%
168 \else%
169 \global\let\code@temp\code@render%
170 \colorbox{graphicbackground}{\color{black}\ignorespaces%
171 \code@render}%
172 \fi%
173 }%
174 \ifx\code@animation@list\pgfutil@empty%
175 \else%
176 \setbox\codeexampleboxanim=\vbox{%
177 \rightskip0pt\leftskip0pt plus1filll%
178 \ifdim\wd\codeexamplebox>\codeexamplewidth%
179 \else%
180 \hsize\codeexamplewidth%
181 \advance\hsize by2cm%
182 \fi%
183 \leavevmode\catcode`\^^M=9%
184 \foreach \pgfmanualtime/\pgfmanualtimehow in\code@animation@list{%
185 \setbox\codeexampleboxanim=\hbox{\colorbox{animationgraphicbackground}{%
186 \tikzset{make snapshot of=\pgfmanualtime}%
187 \scalebox{\pgfmanualanimscale}{\color{black}\ignorespaces%
188 \code@animation@pre\expandafter\scantokens\expandafter{\code@temp\ignorespaces}\code@animation@post\ignorespaces}%
189 }}%
190 \space\raise4pt\hbox to0pt{\vrule width0pt height1em\hbox
191 to\wd\codeexampleboxanim{\hfil\scriptsize$t{=}\pgfmanualtimehow \mathrm s$\hfil}\hss}%
192 \lower\ht\codeexampleboxanim\box\codeexampleboxanim\hfil\penalty0\hskip0ptplus-1fil%
193 }%
194 }%
195 \setbox\codeexampleboxanim=\hbox{\hbox{}\hskip-2cm\box\codeexampleboxanim}%
196 \fi%
197 \ifdim\wd\codeexamplebox>\codeexamplewidth%
198 \def\code@start{\par}%
199 \def\code@flushstart{}\def\code@flushend{}%
200 \def\code@mid{\parskip2pt\par\noindent}%
201 \def\code@width{\linewidth-6pt}%
202 \def\code@end{}%
203 \else%
204 \def\code@start{%
205 % \linewidth=\textwidth% removed this line
206 \parshape \@ne 0pt \linewidth
207 \leavevmode%
208 \hbox\bgroup}%
209 \def\code@flushstart{\hfill}%
210 \def\code@flushend{\hbox{}}%
211 \def\code@mid{\hskip6pt}%
212 \def\code@width{\linewidth-12pt-\codeexamplewidth}%
213 \def\code@end{\egroup}%
214 \fi%
215 \code@start%
216 \noindent%
217 \begin{minipage}[t]{\codeexamplewidth}\raggedright
218 \hrule width0pt%
219 \footnotesize\vskip-1em%
220 \code@flushstart\box\codeexamplebox\code@flushend%
221 \vskip0pt%
222 \leavevmode%
223 \box\codeexampleboxanim%
224 \vskip-1ex
225 \leavevmode%
226 \end{minipage}%
227 \else%
228 \def\code@mid{\par}
229 \def\code@width{\linewidth-6pt}
230 \def\code@end{}
231 \fi%
232 \code@mid%
233 \ifpgfmanual@multipage@code%
234 {%
235 \pgfkeysvalueof{/codeexample/prettyprint/base color}%
236 \pgfmanualdolisting{#1}%
237 }%
238 \else%
239 \colorbox{codebackground}{%
240 \pgfkeysvalueof{/codeexample/prettyprint/base color}%
241 \begin{minipage}[t]{\code@width}%
242 \pgfmanualdolisting{#1}%
243 \end{minipage}}%
244 \fi%
245 \code@end%
246 \par%
247 \medskip
248 \fi
249 \endcodeexample\endgroup%
250 }
251
252 \newenvironment{pathoperation'}[3][]{
253 \begin{pgfmanualentry}
254 \def\pgfmanualtest{#1}%
255 \pgfmanualentryheadline{%
256 \ifx\pgfmanualtest\@empty%
257 \pgfmanualpdflabel{#2}{}%
258 \fi%
259 %\textcolor{gray}{{\ttfamily\char`\\path}\ \ \dots}
260 %\declare{\texttt{\noligs{#2}}}#3\ \textcolor{gray}{\dots\texttt{;}}
261 }%
262 \ifx\pgfmanualtest\@empty%
263 \index{#2@\protect\texttt{#2} path operation}%
264 \index{Path operations!#2@\protect\texttt{#2}}%
265 \fi%
266 \pgfmanualbody
267 }
268 {
269 \end{pgfmanualentry}
270 }
271 \makeatother
272
273 \usepackage{paracol}
274
275 %% normal references
276 \newcommand*{\indexLibrary}[1]{%
277 \index{#1@\protect\texttt{#1} library}%
278 \index{Libraries!#1@\protect\texttt{#1}}%
279 }
280 \newcommand*{\indexMathFunction}[1]{%
281 \index{#1@\protect\texttt{#1} math function}%
282 \index{Math functions!#1@\protect\texttt{#1}}%
283 }
284 \newcommand*{\indexShape}[1]{%
285 \index{#1@\protect\texttt{#1} shape}%
286 \index{Shapes!#1@\protect\texttt{#1}}%
287 }
288 \newcommand*{\indexHandler}[1]{%
289 \index{\gobble#1@\protect\texttt{#1} handler}%
290 \index{Key handlers!#1@\protect\texttt{#1}}
291 }
292 \newcommand*{\indexKey}[2][/tikz/]{%
293 \begingroup
294 \def\mykey{#1#2}%
295 \def\mypath{}%
296 \gdef\myname{}%
297 \firsttimetrue
298 \decompose#1#2/\nil
299 \endgroup
300 }
301 \newcommand*{\indexPathOperation}[1]{%
302 \index{#1@\protect\texttt{#1} path operation}%
303 \index{Path operations!#1@\protect\texttt{#1}}%
304 }
305
306 \newcommand*{\indexPackage}[1]{%
307 \index{#1@\protect\texttt{#1} package}%
308 \index{Packages and files!#1@\protect\texttt{#1}}%
309 }
310 \newcommand*{\indexPackageO}[1]{%
311 \index{#1@\originalprefix\protect\texttt{\original{#1}} package\originalsuffix}%
312 \index{Packages and files!#1@\originalprefix\protect\texttt{\original{#1}}\originalsuffix}%
313 }
314
315 %% references to original
316 \newcommand*{\indexLibraryO}[1]{%
317 \index{#1@\originalprefix\protect\texttt{\original{#1}} library\originalsuffix}%
318 \index{Libraries!#1@\originalprefix\protect\texttt{\original{#1}}\originalsuffix}%
319 }
320 \newcommand*{\indexMathFunctionO}[1]{%
321 \index{#1@\protect\texttt{\original{#1}} math function\originalsuffix}%
322 \index{Math functions!#1@\protect\texttt{\original{#1}}\originalsuffix}%
323 }
324 \newcommand*{\indexShapeO}[1]{%
325 \index{#1@\originalprefix\protect\texttt{\original{#1}} shape\originalsuffix}%
326 \index{Shapes!#1@\originalprefix\protect\texttt{\original{#1}}\originalsuffix}%
327 }
328 \newcommand*{\indexHandlerO}[1]{%
329 \index{\gobble#1@\originalprefix\protect\texttt{\original{#1}} handler\originalsuffix}%
330 \index{Key handlers!#1@\originalprefix\protect\texttt{\original{#1}}\originalsuffix}
331 }
332 \newcommand*{\indexKeyO}[2][/tikz/]{%TODO
333 \begingroup\let\decomposetoodeep\decomposetoodeepO
334 \def\mykey{#1#2}%
335 \def\mypath{}%
336 \gdef\myname{}%
337 \firsttimetrue
338 \decomposeO#1#2/\nil
339 \endgroup
340 }
341 \def\decomposetoodeepO#1/#2/\nil{%
342 % avoid too-deep nesting in index
343 \index{#1/#2@\originalprefix\protect\texttt{\original{#1/#2}} key\originalsuffix}%
344 \index{\mypath#1/#2@\originalprefix\protect\texttt{\original{#1/#2}}\originalsuffix}%
345 \decomposefindlast/#1/#2/\nil%
346 }
347 \def\decomposeO/#1/#2\nil{%
348 \def\test{#2}%
349 \ifx\test\empty%
350 % aha.
351 \index{#1@\originalprefix\protect\texttt{\original{#1}} key\originalsuffix}%
352 \index{\mypath#1@\originalprefix\protect\texttt{\original{#1}}\originalsuffix}%
353 \gdef\myname{#1}%
354 \pgfmanualpdflabel{#1}{}%
355 \else%
356 \advance\pgfmanualdecomposecount by1\relax%
357 \ifnum\pgfmanualdecomposecount>2\relax%
358 \decomposetoodeepO#1/#2\nil%
359 \else%
360 \iffirsttime%
361 \begingroup%
362 % also make a pdf link anchor with full key path.
363 \def\hyperlabelwithoutslash##1/\nil{%
364 \pgfmanualpdflabel{##1}{}%
365 }%
366 \hyperlabelwithoutslash/#1/#2\nil%
367 \endgroup%
368 \def\mypath{#1@\protect\texttt{/#1/}!}%
369 \firsttimefalse%
370 \else%
371 \expandafter\def\expandafter\mypath\expandafter{\mypath#1@\protect\texttt{#1/}!}%
372 \fi%
373 \def\firsttime{}%
374 \decomposeO/#2\nil%
375 \fi%
376 \fi%
377 }
378 \newcommand*{\indexPathOperationO}[1]{%
379 \index{#1@\originalprefix\protect\texttt{\original{#1}} path operation\originalsuffix}%
380 \index{Path operations!#1@\originalprefix\protect\texttt{\original{#1}}\originalsuffix}%
381 }
382
383 \newcommand*{\indexCommand}[1]{%
384 \removeats{#1}%
385 \index{\strippedat @\protect\texttt{\protect\string\protect#1}}%
386 }
387 \newcommand*{\indexCommandO}[1]{%
388 \removeats{#1}%
389 \index{\strippedat @\originalprefix\protect\texttt{\original{\protect\string\protect#1}}\originalsuffix}%
390 }
391
392 \newcommand*{\indexDecorationO}[1]{%
393 \index{#1@\originalprefix\protect\texttt{\original{#1}} decoration\originalsuffix}%
394 \index{Decorations!#1@\originalprefix\protect\texttt{\original{#1}}\originalsuffix}%
395 }
396
397 \newcommand*{\indexEnvironment}[1]{%
398 \index{#1@\protect\texttt{#1} environment}%
399 \index{Environments!#1@\protect\texttt{#1}}%
400 }
401 \newcommand*{\indexEnvironmentO}[1]{%
402 \index{#1@\originalprefix\protect\texttt{\original{#1}} environment\originalsuffix}%
403 \index{Environments!#1@\originalprefix\protect\texttt{\original{#1}}\originalsuffix}%
404 }
405
406 \newcommand*{\indexArrowtipO}[1]{%
407 \index{#1@\originalprefix\protect\texttt{\original{#1}} arrow tip\originalsuffix}%
408 \index{Arrow tips!#1@\originalprefix\protect\texttt{\original{#1}}\originalsuffix}%
409 }
410 \newcommand*{\referenceArrowtipandIndexO}[1]{\texttt{#1}\indexArrowtipO{#1}}
411 \newcommand*{\referenceEnvironmentandIndexO}[1]{\texttt{#1}\indexEnvironmentO{#1}}
412 \newcommand*{\referenceDecorationandIndexO}[1]{\texttt{#1}\indexDecorationO{#1}}
413 \newcommand*{\referenceKeyandIndexO}[2][/tikz/]{\texttt{#1#2}\indexKeyO[#1]{#2}}
414 \newcommand*{\referenceKeyandIndex}[2][/tikz/]{\texttt{#1#2}\indexKey[#1]{#2}}
415 \newcommand*{\referenceShapeandIndex}[1]{\texttt{#1}\indexShape{#1}}
416 \newcommand*{\referenceShapeandIndexO}[1]{\texttt{#1}\indexShapeO{#1}}
417 \newcommand*{\referenceLibraryandIndexO}[1]{\texttt{#1}\indexLibraryO{#1}}
418 \newcommand*{\referenceLibraryandIndexExt}[1]{\texttt{#1}\indexLibraryExt{#1}}
419 \newcommand*{\referenceLibraryandIndex}[1]{\texttt{#1}\indexLibrary{#1}}
420 \newcommand*{\referencePackageandIndex}[1]{\texttt{#1}\indexPackage{#1}}
421 \newcommand*{\referencePackageandIndexO}[1]{\texttt{#1}\indexPackageO{#1}}
422 \newcommand*{\referencePackageandIndeXExt}[1]{\texttt{#1}\indexPackageExt{#1}}
423 \newcommand*{\referencePathOperationandIndex}[1]{\texttt{#1}\indexPathOperation{#1}}
424 \newcommand*{\referencePathOperationandIndexO}[1]{\texttt{#1}\indexPathOperationO{#1}}
425 \newcommand*{\referenceCommandandIndex}[1]{\texttt{\string#1}\indexCommand{#1}}
426 \newcommand*{\referenceCommandandIndexO}[1]{\texttt{\string#1}\indexCommandO{#1}}
427 \newcommand*{\referenceCommandandIndexExt}[1]{\texttt{\string#1}\indexCommandExt{#1}}
428 \colorlet{originalindex}{gray}
429 \newcommand*{\original}[1]{\textcolor{originalindex}{#1}}%
430 \newcommand*{\originalsuffix}{}%\textsuperscript{\textdagger}}%\normalsize
431 \newcommand*{\originalprefix}{}%\footnotesize
432
433 \newcommand*{\indexPackageExt}[1]{%
434 \begingroup
435 % \originalExternals
436 \index{#1@\originalExternals{\protect\texttt{\original{#1}} package}}%
437 \index{Packages and files!#1@\originalExternals{\protect\texttt{\original{#1}}}}%
438 \endgroup
439 }
440 \newcommand*{\indexLibraryExt}[1]{%
441 \index{#1@\originalExternals{\protect\texttt{\original{#1}} library}}%
442 \index{Libraries!#1@\originalExternals{\protect\texttt{\original{#1}}}}%
443 }
444 \newcommand*{\indexCommandExt}[1]{%
445 \removeats{#1}%
446 \index{\strippedat @\originalExternals{\protect\texttt{\original{\protect\string\protect#1}}}}%
447 }
448 \DeclareRobustCommand*{\originalExternals}[1]{%
449 \begingroup
450 \colorlet{originalindex}{blue!50!gray}%
451 % \renewcommand*{\original}[1]{\textcolor{originalindex}{##1}}%
452 #1%
453 \endgroup
454 }
455
456 \newcommand*{\filetype}[1]{\textsc{#1}}
457
458 \makeatletter
459 \def\index@prologue{\section*{Index}\addcontentsline{toc}{section}{Index}
460 This index contains automatically generated entries as well as {\originalprefix\original{references}\originalsuffix} to
461 original functionalities of \pgfname/\tikzname\space
462 and \originalExternals{\originalprefix\original{references}\originalsuffix} to functionalities outside of \pgfname/\tikzname.
463 \bigskip
464 }
465 \makeatother
466
467 \DeclareMathOperator{\sgn}{sgn}
468
469 \newenvironment{implementation}{%
470 \noindent\rule[.5ex]{\linewidth}{.4pt}\par
471 \paragraph*{Notes on Implementation:}\par%
472 \small
473 \begin{quotation}%
474 }{\end{quotation}}
475
476 \newcommand*{\inspiration}[2]{%
477 \par\textbf{Q\,\&\,A:} \cite{#1} \& \cite{#2}\par
478 }
479 \newcommand*\inspirationQ[1]{\par\textbf{Q:} \cite{#1}}
480
481 \newenvironment{texpackage}[1]{% no context
482 \begin{pgfmanualentry}
483 \pgfmanualentryheadline{%
484 \pgfmanualpdflabel{#1}{}%
485 {\ttfamily\char`\\usepackage\char`\{\declare{#1}\char`\}\space\space \char`\%\space\space \LaTeX}}
486 \index{#1@\protect\texttt{#1} package}%
487 \index{Packages and files!#1@\protect\texttt{#1}}%
488 \pgfmanualentryheadline{{\ttfamily\char`\\input \declare{#1}.tex\space\space\space \char`\%\space\space plain \TeX}}
489 % \pgfmanualentryheadline{{\ttfamily\char`\\usemodule[\declare{#1}]\space\space \char`\%\space\space Con\TeX t}}
490 \pgfmanualbody
491 }
492 {
493 \end{pgfmanualentry}
494 }
495 \newenvironment{latexpackage}[1]{
496 \begin{pgfmanualentry}
497 \pgfmanualentryheadline{%
498 \pgfmanualpdflabel{#1}{}%
499 {\ttfamily\char`\\usepackage\char`\{\declare{#1}\char`\}\space\space \char`\%\space\space \LaTeX}}
500 \index{#1@\protect\texttt{#1} package}%
501 \index{Packages and files!#1@\protect\texttt{#1}}%
502 % \pgfmanualentryheadline{{\ttfamily\char`\\input \declare{#1}.tex\space\space\space \char`\%\space\space plain \TeX}}
503 % \pgfmanualentryheadline{{\ttfamily\char`\\usemodule[\declare{#1}]\space\space \char`\%\space\space Con\TeX t}}
504 \pgfmanualbody
505 }
506 {
507 \end{pgfmanualentry}
508 }
509
510 \usepackage{booktabs}
511
512 \renewenvironment{arrowtip}[4]{
513 \begin{pgfmanualentry}
514 \pgfmanualentryheadline{\textbf{Arrow Tip Kind} {\ttfamily#1}}
515 \index{#1@\protect\texttt{#1} arrow tip}%
516 \index{Arrow tips!#1@\protect\texttt{#1}}%
517 \pgfmanualbody
518 \def\currentarrowtype{#1}
519 \begin{minipage}[t]{\dimexpr\linewidth-5cm\relax}
520 #2
521 \end{minipage}\hskip5mm\begin{minipage}[t]{4.75cm}
522 \leavevmode\vskip-2em
523 \tikz{
524 \draw [black!50,line width=5mm,-{#1[#3,color=black]}] (-4,0) -- (0,0);
525 \foreach \action in {#4}
526 { \expandafter\processaction\action\relax }
527 }
528 \end{minipage}\par\smallskip
529 }
530 {
531 \end{pgfmanualentry}
532 }
533 \makeatletter
534 \def\arrowexample@#1[#2]{%
535 {\sfcode`\.1000\scriptsize\texttt{#1[#2]}} \>
536 \tikz [baseline,>={#1[#2]}] \draw [line
537 width=0.4pt,->] (0,.5ex) -- (2em,.5ex); thin \>
538 \tikz [baseline,>={#1[#2]}] \draw [line
539 width=0.8pt,->] (0,.5ex) -- (2em,.5ex); \textbf{thick} \>
540 \tikz [baseline,>={#1[#2]}] \draw [line
541 width=1.6pt,->] (0,.5ex) -- (3em,.5ex); \\
542 }
543 \def\manual@action@length#1/#2/#3\relax{%
544 % \draw[help lines, overlay] (current bounding box.south west) rectangle (current bounding box.north east);
545 \draw [red,|<->|,semithick,xshift=#2]
546 ([yshift=4pt]current bounding box.north -| -#1,0) coordinate (last length)
547 -- node[above=-2pt] {|length|} ++(#1,0);
548 }
549 \def\manual@action@radius#1/#2/#3\relax{%
550 % \draw[red] (0,#2)
551 % -- node[above, sloped]{\texttt{radius}}
552 % +(30:#1);
553 \draw [red, ->|, semithick]
554 ([xshift=-#1, yshift=-#1]0,#2) %-- ++(left:#2) -- ++(down:#1);
555 -- node[below, sloped]{\texttt{inset}} +(30:#1);
556 % \draw [red,|<->|,semithick] ([xshift=-#1,yshift=2*#1]current bounding
557 % box.north east) -- node [above, overlay] {\texttt{radius}} ++(-#1,0);
558 }
559 \makeatother
560 \newcommand*\listcompat[2][pre~0.6]{%
561 \vspace{-6pt}\item{\color{gray}\small\sffamily#1\kern.5em{#2}}\vspace{-2pt}\par
562 }
563 \newcommand*\keylistcompat[2][pre~0.6]{%
564 \vspace{-6pt}\item{\color{gray}\small\sffamily #1\kern.5em{\ttfamily/#2/\myname}}\vspace{-2pt}\par
565 \pgfmanualpdflabel{/#2/\myname}{}%
566 }
567 \newcommand*\keycompat[2][pre~0.6]{%
568 \vspace{-3pt}\item{\color{gray}\small\sffamily #1\kern.5em{\ttfamily/#2/\myname}}\vspace{-2pt}\par
569 \pgfmanualpdflabel{/#2/\myname}{}%
570 }
571 \newcommand*\cmdcompat[2][pre~0.6]{%
572 \vspace{-3pt}\item{\color{gray}\small\sffamily #1\kern.5em{\ttfamily\string#2}}\vspace{-2pt}\par
573 % \pgfmanualpdflabel{\string#2}{}%
574 }
575 \newcommand*\tipcompat[1][pre~0.6]{%
576 \vspace{-3pt}\item{\color{gray}\small\sffamily #1\kern.5em{\ttfamily\expandafter\tipcompatstrip\currentarrowtype\tipstop}}\vspace{-2pt}\par
577 % \pgfmanualpdflabel{/#2/\myname}{}%
578 }
579 \newcommand*\tipCompat[2][pre~0.6]{
580 \vspace{-8pt}\item{\color{gray}\small\sffamily #1\kern.5em{\ttfamily#2}}\vspace{2pt}\par
581 % \pgfmanualpdflabel{/#2/\myname}{}%
582 }
583 \def\tipcompatstrip ext#1#2\tipstop{#2}%
584 \newcommand*\handlercompat[2][pre~0.6]{%
585 \vspace{-3pt}\item{\color{gray}\small\sffamily #1\kern.5em{\ttfamily#2}}\vspace{-2pt}\par
586 \pgfmanualpdflabel{#2}{}%
587 }
588 \newcommand*\mathcompat[2][pre~0.6]{%
589 \vspace{-3pt}\item{\color{gray}\small\sffamily #1\kern.5em{\ttfamily#2}}\vspace{-2pt}\par
590 % \pgfmanualpdflabel{/#2/\myname}{}%
591 }
592 \usepackage{array}
593 \newcommand*\tikzext{tikz/ext}
594 \newcommand*\pgfext{pgf/ext}
595 \newcommand*\pgfforeachext{pgf/foreach/ext}
596 \newcommand*\utilsext{utils/ext}
597
598 \def\decomposetoodeep#1/#2/\nil{%
599 % avoid too-deep nesting in index
600 \ifx\CurrentLibrary\empty
601 \index{#1/#2@\protect\texttt{#1/#2}}%
602 \index{\mypath#1/#2@\protect\texttt{#1/#2}}%
603 \fi
604 \index{#1/#2@\protect\texttt{#1/#2} (\CurrentLibrary)}%
605 \index{\mypath#1/#2@\protect\texttt{#1/#2} (\CurrentLibrary)}%
606 \fi
607 \decomposefindlast/#1/#2/\nil%
608 }
609 \def\decompose/#1/#2\nil{%
610 \def\test{#2}%
611 \ifx\test\empty%
612 % aha.
613 \ifx\CurrentLibrary\empty
614 \index{#1@\protect\texttt{#1} key}%
615 \index{\mypath#1@\protect\texttt{#1}}%
616 \else
617 \index{#1@\protect\texttt{#1} key (\CurrentLibrary)}%
618 \index{\mypath#1@\protect\texttt{#1} (\CurrentLibrary)}%
619 \fi
620 \gdef\myname{#1}%
621 \pgfmanualpdflabel{#1}{}
622 \else%
623 \advance\pgfmanualdecomposecount by1\relax%
624 \ifnum\pgfmanualdecomposecount>2\relax%
625 \decomposetoodeep#1/#2\nil%
626 \else%
627 \iffirsttime%
628 \begingroup%
629 % also make a pdf link anchor with full key path.
630 \def\hyperlabelwithoutslash##1/\nil{%
631 \pgfmanualpdflabel{##1}{}%
632 }%
633 \hyperlabelwithoutslash/#1/#2\nil%
634 \endgroup%
635 \def\mypath{#1@\protect\texttt{/#1/}!}%
636 \firsttimefalse%
637 \else%
638 \expandafter\def\expandafter\mypath\expandafter{\mypath#1@\protect\texttt{#1/}!}%
639 \fi%
640 \def\firsttime{}%
641 \decompose/#2\nil%
642 \fi%
643 \fi%
644 }
645 \def\empty{}
646 \newcommand*\noLibrary{\gdef\CurrentLibrary{}}
647 \newcommand*\currentLibrary[1]{\gdef\CurrentLibrary{{\small ext.}#1}}
648 \noLibrary
649
650 \newenvironment{ext_shape}[1]{
651 \begin{pgfmanualentry}
652 \pgfmanualentryheadline{%
653 \pgfmanualpdflabel{ext_#1}{}%
654 \textbf{Shape} {\ttfamily\declare{ext\textunderscore#1}}%
655 }%
656 \index{ext\textunderscore#1@\protect\texttt{ext\textunderscore#1} shape}%
657 \index{Shapes!ext\textunderscore#1@\protect\texttt{ext\textunderscore#1}}
658 \pgfmanualbody
659 }
660 {
661 \end{pgfmanualentry}
662 }
663
664 %\newenvironment{ext_math-function}[1]{
665 % \def\mathdefaultname{ext\textunderscore#1}
666 % \extractmathfunctionname{ext#1}
667 % \edef\mathurl{{math:\mathname}}\expandafter\hypertarget\expandafter{\mathurl}{}%
668 % \begin{pgfmanualentry}
669 % \pgfmanualentryheadline{\texttt{#1}}%
670 % \index{\mathname @\protect\texttt{\mathname} math function}%
671 % \index{Math functions!\mathname @\protect\texttt\mathname}}%
672 % \pgfmanualbody
673 %}
674 %{
675 % \end{pgfmanualentry}
676 %}
677
678 \makeatletter
679 \newenvironment{ext_handler}[1]{
680 \begin{pgfmanualentry}
681 \extextracthandler#1\@nil%
682 \pgfmanualbody
683 }
684 {
685 \end{pgfmanualentry}
686 }
687
688 \def\extextracthandler#1#2\@nil{%
689 \pgfmanualentryheadline{%
690 \pgfmanualpdflabel{/handlers/.ext_#1}{}%
691 \textbf{Key handler} \meta{key}{\ttfamily/\declare{.ext\textunderscore#1}}#2}%
692 \index{ext\textunderscore#1@\protect\texttt{.ext\textunderscore#1} handler}%
693 \index{Key handlers!.ext\textunderscore#1@\protect\texttt{.ext\textunderscore#1}}
694 }
695 \makeatother
696
697 \newcommand*\Beamer{\textsc{Beamer}}