Debian Codegraph @

texmf-dist/doc/latex/sa-tikz/pgfmanual-en-macros.tex

raw
1 % Copyright 2006 by Till Tantau
2 %
3 % This file may be distributed and/or modified
4 %
5 % 1. under the LaTeX Project Public License and/or
6 % 2. under the GNU Free Documentation License.
7 %
8 % See the file doc/generic/pgf/licenses/LICENSE for more details.
9
10 % $Header: /cvsroot/pgf/pgf/doc/generic/pgf/macros/pgfmanual-en-macros.tex,v 1.79 2013/12/20 15:22:35 tantau Exp $
11
12
13 \providecommand\href[2]{\texttt{#1}}
14 \providecommand\hypertarget[2]{\texttt{#1}}
15 \providecommand\hyperlink[2]{\texttt{#1}}
16
17
18 \colorlet{examplefill}{yellow!80!black}
19 \definecolor{graphicbackground}{rgb}{0.96,0.96,0.8}
20 \definecolor{codebackground}{rgb}{0.9,0.9,1}
21
22 \newenvironment{pgfmanualentry}{\list{}{\leftmargin=2em\itemindent-\leftmargin\def\makelabel##1{\hss##1}}}{\endlist}
23 \newcommand\pgfmanualentryheadline[1]{\itemsep=0pt\parskip=0pt{\raggedright\item\strut{#1}\par}\topsep=0pt}
24 \newcommand\pgfmanualbody{\parskip3pt}
25
26 \let\origtexttt=\texttt
27 \def\texttt#1{{\def\textunderscore{\char`\_}\def\textbraceleft{\char`\{}\def\textbraceright{\char`\}}\origtexttt{#1}}}
28 \def\exclamationmarktext{!}
29 \def\atmarktext{@}
30
31 {
32 \catcode`\|=12
33 \gdef\pgfmanualnormalbar{|}
34 \catcode`\|=13
35 \AtBeginDocument{\gdef|{\ifmmode\pgfmanualnormalbar\else\expandafter\verb\expandafter|\fi}}
36 }
37
38
39
40 \newenvironment{pgflayout}[1]{
41 \begin{pgfmanualentry}
42 \pgfmanualentryheadline{%
43 \pgfmanualpdflabel{#1}{}%
44 \texttt{\string\pgfpagesuselayout\char`\{\declare{#1}\char`\}}\oarg{options}%
45 }
46 \index{#1@\protect\texttt{#1} layout}%
47 \index{Page layouts!#1@\protect\texttt{#1}}%
48 \pgfmanualbody
49 }
50 {
51 \end{pgfmanualentry}
52 }
53
54
55 \newenvironment{command}[1]{
56 \begin{pgfmanualentry}
57 \extractcommand#1\@@
58 \pgfmanualbody
59 }
60 {
61 \end{pgfmanualentry}
62 }
63
64 \makeatletter
65
66 \def\includeluadocumentationof#1{
67 \directlua{require 'pgf.manual.DocumentParser'}
68 \directlua{pgf.manual.DocumentParser.include '#1'}
69 }
70
71 \newenvironment{luageneric}[4]{
72 \pgfmanualentry
73 \pgfmanualentryheadline{#4 \texttt{#1\declare{#2}}#3}
74 \index{#2@\protect\texttt{#2} (Lua)}%
75 \def\temp{#1}
76 \ifx\temp\pgfutil@empty\else
77 \index{#1@\protect\texttt{#1}!#2@\protect\texttt{#2} (Lua)}%
78 \fi
79 \pgfmanualbody
80 }{\endpgfmanualentry}
81
82 \newenvironment{luatable}[3]{
83 \medskip
84 \luageneric{#1}{#2}{ (declared in \texttt{#3})}{\textbf{Lua table}}
85 }{\endluageneric}
86
87 \newenvironment{luafield}[1]{
88 \pgfmanualentry
89 \pgfmanualentryheadline{Field \texttt{\declare{#1}}}
90 \pgfmanualbody
91 }{\endpgfmanualentry}
92
93
94 \newenvironment{lualibrary}[1]{
95 \pgfmanualentry
96 \pgfmanualentryheadline{%
97 \pgfmanualpdflabel{#1}{}%
98 \textbf{Graph Drawing Library} \texttt{\declare{#1}}%
99 }
100 \index{#1@\protect\texttt{#1} graph drawing library}%
101 \index{Libraries!#1@\protect\texttt{#1}}%
102 \index{Graph drawing libraries!#1@\protect\texttt{#1}}%
103 \vskip.25em
104 {\ttfamily\char`\\usegdlibrary\char`\{\declare{#1}\char`\}\space\space \char`\%\space\space \LaTeX\space and plain \TeX}\\
105 {\ttfamily\char`\\usegdlibrary[\declare{#1}]\space \char`\%\space\space Con\TeX t}\smallskip\par
106 \pgfmanualbody
107 }{\endpgfmanualentry}
108
109 \newenvironment{luadeclare}[4]{
110 \pgfmanualentry
111 \def\manual@temp@default{#3}%
112 \def\manual@temp@initial{#4}%
113 \def\manual@temp@{#3#4}%
114 \pgfmanualentryheadline{%
115 \pgfmanualpdflabel{#1}{}%
116 {\ttfamily/graph
117 drawing/\declare{#1}\opt{=}}\opt{#2}\hfill%
118 \ifx\manual@temp@\pgfutil@empty\else%
119 (\ifx\manual@temp@default\pgfutil@empty\else%
120 default {\ttfamily #3}\ifx\manual@temp@initial\pgfutil@empty\else, \fi%
121 \fi%
122 \ifx\manual@temp@initial\pgfutil@empty\else%
123 initially {\ttfamily #4}%
124 \fi%
125 )\fi%
126 }%
127 \index{#1@\protect\texttt{#1} key}%
128 \pgfmanualbody
129 \gdef\myname{#1}%
130 % \keyalias{tikz}
131 % \keyalias{tikz/graphs}
132 }{\endpgfmanualentry}
133
134 \newenvironment{luadeclarestyle}[4]{
135 \pgfmanualentry
136 \def\manual@temp@para{#2}%
137 \def\manual@temp@default{#3}%
138 \def\manual@temp@initial{#4}%
139 \def\manual@temp@{#3#4}%
140 \pgfmanualentryheadline{%
141 \pgfmanualpdflabel{#1}{}%
142 {\ttfamily/graph drawing/\declare{#1}}\ifx\manual@temp@para\pgfutil@empty\else\opt{\texttt=}\opt{#2}\fi\hfill%
143 (style\ifx\manual@temp@\pgfutil@empty\else, %
144 \ifx\manual@temp@default\pgfutil@empty\else%
145 default {\ttfamily #3}\ifx\manual@temp@initial\pgfutil@empty\else, \fi%
146 \fi%
147 \ifx\manual@temp@initial\pgfutil@empty\else%
148 initially {\ttfamily #4}%
149 \fi%
150 \fi)%
151 }%
152 \index{#1@\protect\texttt{#1} key}%
153 \pgfmanualbody%
154 \gdef\myname{#1}%
155 % \keyalias{tikz}
156 % \keyalias{tikz/graphs}
157 }{\endpgfmanualentry}
158
159 \newenvironment{luanamespace}[2]{
160 \luageneric{#1}{#2}{}{\textbf{Lua namespace}}
161 }{\endluageneric}
162
163 \newenvironment{luafiledescription}[1]{}{}
164
165 \newenvironment{luacommand}[4]{
166 \hypertarget{pgf/lua/#1}{\luageneric{#2}{#3}{\texttt{(#4)}}{\texttt{function}}}
167 }{\endluageneric}
168
169 \newenvironment{luaparameters}{\par\emph{Parameters:}%
170 \parametercount=0\relax%
171 \let\item=\parameteritem%
172 \let\list=\restorelist%
173 }
174 {\par
175 }
176
177 \newenvironment{luareturns}{\par\emph{Returns:}%
178 \parametercount=0\relax%
179 \let\item=\parameteritem%
180 \let\list=\restorelist%
181 }
182 {\par
183 }
184
185 \newcount\parametercount
186
187 \newenvironment{parameterdescription}{\unskip%
188 \parametercount=0\relax%
189 \let\item=\parameteritem%
190 \let\list=\restorelist%
191 }
192 {\par
193 }
194 \let\saveditemcommand=\item
195 \let\savedlistcommand=\list
196 \def\denselist#1#2{\savedlistcommand{#1}{#2}\parskip0pt\itemsep0pt}
197 \def\restorelist{\let\item=\saveditemcommand\denselist}
198 \def\parameteritem{\pgfutil@ifnextchar[\parameteritem@{}}%}
199 \def\parameteritem@[#1]{\advance\parametercount by1\relax\hskip0.15em plus 1em\emph{\the\parametercount.}\kern1ex\def\test{#1}\ifx\test\pgfutil@empty\else#1\kern.5em\fi}
200
201 \newenvironment{commandlist}[1]{%
202 \begin{pgfmanualentry}
203 \foreach \xx in {#1} {%
204 \expandafter\extractcommand\xx\@@
205 }%
206 \pgfmanualbody
207 }{%
208 \end{pgfmanualentry}
209 }%
210
211 % \begin{internallist}[register]{\pgf@xa}
212 % \end{internallist}
213 %
214 % \begin{internallist}[register]{\pgf@xa,\pgf@xb}
215 % \end{internallist}
216 \newenvironment{internallist}[2][register]{%
217 \begin{pgfmanualentry}
218 \foreach \xx in {#2} {%
219 \expandafter\extractinternalcommand\expandafter{\xx}{#1}%
220 }%
221 \pgfmanualbody
222 }{%
223 \end{pgfmanualentry}
224 }%
225 \def\extractinternalcommand#1#2{%
226 \removeats{#1}%
227 \pgfmanualentryheadline{%
228 \pgfmanualpdflabel{\textbackslash\strippedat}{}%
229 Internal #2 \declare{\texttt{\string#1}}}%
230 \index{Internals!\strippedat @\protect\myprintocmmand{\strippedat}}%
231 \index{\strippedat @\protect\myprintocmmand{\strippedat}}%
232 }
233
234 %% MW: START MATH MACROS
235 \def\mvar#1{{\ifmmode\textrm{\textit{#1}}\else\rmfamily\textit{#1}\fi}}
236
237 \makeatletter
238
239 \def\extractmathfunctionname#1{\extractmathfunctionname@#1(,)\tmpa\tmpb}
240 \def\extractmathfunctionname@#1(#2)#3\tmpb{\def\mathname{#1}}
241
242 \makeatother
243
244 \newenvironment{math-function}[1]{
245 \def\mathdefaultname{#1}
246 \extractmathfunctionname{#1}
247 \edef\mathurl{{math:\mathname}}\expandafter\hypertarget\expandafter{\mathurl}{}%
248 \begin{pgfmanualentry}
249 \pgfmanualentryheadline{\texttt{#1}}%
250 \index{\mathname @\protect\texttt{\mathname} math function}%
251 \index{Math functions!\mathname @\protect\texttt{\mathname}}%
252 \pgfmanualbody
253 }
254 {
255 \end{pgfmanualentry}
256 }
257
258 \def\pgfmanualemptytext{}
259 \def\pgfmanualvbarvbar{\char`\|\char`\|}
260
261 \newenvironment{math-operator}[4][]{%
262 \begin{pgfmanualentry}
263 \csname math#3operator\endcsname{#2}{#4}
264 \def\mathtest{#4}%
265 \ifx\mathtest\pgfmanualemptytext%
266 \def\mathtype{(#3 operator)}
267 \else%
268 \def\mathtype{(#3 operator; uses the \texttt{#4} function)}
269 \fi%
270 \pgfmanualentryheadline{\mathexample\hfill\mathtype}%
271 \def\mathtest{#1}%
272 \ifx\mathtest\pgfmanualemptytext%
273 \index{#2@\protect\texttt{#2} #3 math operator}%
274 \index{Math operators!#2@\protect\texttt{#2}}%
275 \fi%
276 \pgfmanualbody
277 }
278 {\end{pgfmanualentry}}
279
280 \newenvironment{math-operators}[5][]{%
281 \begin{pgfmanualentry}
282 \csname math#4operator\endcsname{#2}{#3}
283 \def\mathtest{#5}%
284 \ifx\mathtest\pgfmanualemptytext%
285 \def\mathtype{(#4 operators)}
286 \else%
287 \def\mathtype{(#4 operators; use the \texttt{#5} function)}
288 \fi%
289 \pgfmanualentryheadline{\mathexample\hfill\mathtype}%
290 \def\mathtest{#1}%
291 \ifx\mathtest\pgfmanualemptytext%
292 \index{#2#3@\protect\texttt{#2\protect\ #3} #4 math operators}%
293 \index{Math operators!#2#3@\protect\texttt{#2\protect\ #3}}%
294 \fi%
295 \pgfmanualbody
296 }
297 {\end{pgfmanualentry}}
298
299 \def\mathinfixoperator#1#2{%
300 \def\mathoperator{\texttt{#1}}%
301 \def\mathexample{\mvar{x}\space\texttt{#1}\space\mvar{y}}%
302 }
303
304 \def\mathprefixoperator#1#2{%
305 \def\mathoperator{\texttt{#1}}%
306 \def\mathexample{\texttt{#1}\mvar{x}}%
307 }
308
309 \def\mathpostfixoperator#1#2{%
310 \def\mathoperator{\texttt{#1}}
311 \def\mathexample{\mvar{x}\texttt{#1}}%
312 }
313
314 \def\mathgroupoperator#1#2{%
315 \def\mathoperator{\texttt{#1\ #2}}%
316 \def\mathexample{\texttt{#1}\mvar{x}\texttt{#2}}%
317 }
318
319 \expandafter\let\csname matharray accessoperator\endcsname=\mathgroupoperator
320 \expandafter\let\csname matharrayoperator\endcsname=\mathgroupoperator
321
322 \def\mathconditionaloperator#1#2{%
323 \def\mathoperator{#1\space#2}
324 \def\mathexample{\mvar{x}\ \texttt{#1}\ \mvar{y}\ {\texttt{#2}}\ \mvar{z}}
325 }
326
327 \newcommand\mathcommand[1][\mathdefaultname]{%
328 \expandafter\makemathcommand#1(\empty)\stop%
329 \expandafter\extractcommand\mathcommandname\@@%
330 \medskip
331 }
332 \makeatletter
333
334 \def\makemathcommand#1(#2)#3\stop{%
335 \expandafter\def\expandafter\mathcommandname\expandafter{\csname pgfmath#1\endcsname}%
336 \ifx#2\empty%
337 \else%
338 \@makemathcommand#2,\stop,
339 \fi}
340 \def\@makemathcommand#1,{%
341 \ifx#1\stop%
342 \else%
343 \expandafter\def\expandafter\mathcommandname\expandafter{\mathcommandname{\ttfamily\char`\{#1\char`\}}}%
344 \expandafter\@makemathcommand%
345 \fi}
346 \makeatother
347
348 \def\calcname{\textsc{calc}}
349
350 \newenvironment{math-keyword}[1]{
351 \extracttikzmathkeyword#1@
352 \begin{pgfmanualentry}
353 \pgfmanualentryheadline{\texttt{\color{red}\mathname}\mathrest}%
354 \index{\mathname @\protect\texttt{\mathname} tikz math function}%
355 \index{TikZ math functions!\mathname @\protect\texttt{\mathname}}%
356 \pgfmanualbody
357 }
358 {
359 \end{pgfmanualentry}
360 }
361
362 \def\extracttikzmathkeyword#1#2@{%
363 \def\mathname{#1}%
364 \def\mathrest{#2}%
365 }
366
367 %% MW: END MATH MACROS
368
369
370 \def\extractcommand#1#2\@@{%
371 \removeats{#1}%
372 \pgfmanualentryheadline{%
373 \pgfmanualpdflabel{\textbackslash\strippedat}{}%
374 \declare{\texttt{\string#1}}#2%
375 }%
376 \index{\strippedat @\protect\myprintocmmand{\strippedat}}
377 }
378
379 \def\luaextractcommand#1#2\relax{%
380 \declare{\texttt{\string#1}}#2\par%
381 % \removeats{#1}%
382 % \index{\strippedat @\protect\myprintocmmand{\strippedat}}
383 % \pgfmanualpdflabel{\textbackslash\strippedat}{}%
384 }
385
386
387 % \begin{environment}{{name}\marg{arguments}}
388 \renewenvironment{environment}[1]{
389 \begin{pgfmanualentry}
390 \extractenvironement#1\@@
391 \pgfmanualbody
392 }
393 {
394 \end{pgfmanualentry}
395 }
396
397 \def\extractenvironement#1#2\@@{%
398 \pgfmanualentryheadline{%
399 \pgfmanualpdflabel{#1}{}%
400 {\ttfamily\char`\\begin\char`\{\declare{#1}\char`\}}#2%
401 }%
402 \pgfmanualentryheadline{{\ttfamily\ \ }\meta{environment contents}}%
403 \pgfmanualentryheadline{{\ttfamily\char`\\end\char`\{\declare{#1}\char`\}}}%
404 \index{#1@\protect\texttt{#1} environment}%
405 \index{Environments!#1@\protect\texttt{#1}}
406 }
407
408
409 \newenvironment{plainenvironment}[1]{
410 \begin{pgfmanualentry}
411 \extractplainenvironement#1\@@
412 \pgfmanualbody
413 }
414 {
415 \end{pgfmanualentry}
416 }
417
418 \def\extractplainenvironement#1#2\@@{%
419 \pgfmanualentryheadline{{\ttfamily\declare{\char`\\#1}}#2}%
420 \pgfmanualentryheadline{{\ttfamily\ \ }\meta{environment contents}}%
421 \pgfmanualentryheadline{{\ttfamily\declare{\char`\\end#1}}}%
422 \index{#1@\protect\texttt{#1} environment}%
423 \index{Environments!#1@\protect\texttt{#1}}%
424 }
425
426
427 \newenvironment{contextenvironment}[1]{
428 \begin{pgfmanualentry}
429 \extractcontextenvironement#1\@@
430 \pgfmanualbody
431 }
432 {
433 \end{pgfmanualentry}
434 }
435
436 \def\extractcontextenvironement#1#2\@@{%
437 \pgfmanualentryheadline{{\ttfamily\declare{\char`\\start#1}}#2}%
438 \pgfmanualentryheadline{{\ttfamily\ \ }\meta{environment contents}}%
439 \pgfmanualentryheadline{{\ttfamily\declare{\char`\\stop#1}}}%
440 \index{#1@\protect\texttt{#1} environment}%
441 \index{Environments!#1@\protect\texttt{#1}}}
442
443
444 \newenvironment{shape}[1]{
445 \begin{pgfmanualentry}
446 \pgfmanualentryheadline{%
447 \pgfmanualpdflabel{#1}{}%
448 \textbf{Shape} {\ttfamily\declare{#1}}%
449 }%
450 \index{#1@\protect\texttt{#1} shape}%
451 \index{Shapes!#1@\protect\texttt{#1}}
452 \pgfmanualbody
453 }
454 {
455 \end{pgfmanualentry}
456 }
457
458 \newenvironment{pictype}[2]{
459 \begin{pgfmanualentry}
460 \pgfmanualentryheadline{%
461 \pgfmanualpdflabel{#1}{}%
462 \textbf{Pic type} {\ttfamily\declare{#1}#2}%
463 }%
464 \index{#1@\protect\texttt{#1} pic type}%
465 \index{Pic Types!#1@\protect\texttt{#1}}
466 \pgfmanualbody
467 }
468 {
469 \end{pgfmanualentry}
470 }
471
472 \newenvironment{shading}[1]{
473 \begin{pgfmanualentry}
474 \pgfmanualentryheadline{%
475 \pgfmanualpdflabel{#1}{}%
476 \textbf{Shading} {\ttfamily\declare{#1}}}%
477 \index{#1@\protect\texttt{#1} shading}%
478 \index{Shadings!#1@\protect\texttt{#1}}
479 \pgfmanualbody
480 }
481 {
482 \end{pgfmanualentry}
483 }
484
485
486 \newenvironment{graph}[1]{
487 \begin{pgfmanualentry}
488 \pgfmanualentryheadline{%
489 \pgfmanualpdflabel{#1}{}%
490 \textbf{Graph} {\ttfamily\declare{#1}}}%
491 \index{#1@\protect\texttt{#1} graph}%
492 \index{Graphs!#1@\protect\texttt{#1}}
493 \pgfmanualbody
494 }
495 {
496 \end{pgfmanualentry}
497 }
498
499 \newenvironment{gdalgorithm}[2]{
500 \begin{pgfmanualentry}
501 \pgfmanualentryheadline{%
502 \pgfmanualpdflabel{#1}{}%
503 \textbf{Layout} {\ttfamily/graph drawing/\declare{#1}\opt{=}}\opt{\meta{options}}}%
504 \index{#1@\protect\texttt{#1} layout}%
505 \index{Layouts!#1@\protect\texttt{#1}}%
506 \foreach \algo in {#2}
507 {\edef\marshal{\noexpand\index{#2@\noexpand\protect\noexpand\texttt{#2} algorithm}}\marshal}%
508 \index{Graph drawing layouts!#1@\protect\texttt{#1}}
509 \item{\small alias {\ttfamily/tikz/#1}}\par
510 \item{\small alias {\ttfamily/tikz/graphs/#1}}\par
511 \item{\small Employs {\ttfamily algorithm=#2}}\par
512 \pgfmanualbody
513 }
514 {
515 \end{pgfmanualentry}
516 }
517
518 \newenvironment{dataformat}[1]{
519 \begin{pgfmanualentry}
520 \pgfmanualentryheadline{%
521 \pgfmanualpdflabel{#1}{}%
522 \textbf{Format} {\ttfamily\declare{#1}}}%
523 \index{#1@\protect\texttt{#1} format}%
524 \index{Formats!#1@\protect\texttt{#1}}
525 \pgfmanualbody
526 }
527 {
528 \end{pgfmanualentry}
529 }
530
531 \newenvironment{stylesheet}[1]{
532 \begin{pgfmanualentry}
533 \pgfmanualentryheadline{%
534 \pgfmanualpdflabel{#1}{}%
535 \textbf{Style sheet} {\ttfamily\declare{#1}}}%
536 \index{#1@\protect\texttt{#1} style sheet}%
537 \index{Style sheets!#1@\protect\texttt{#1}}
538 \pgfmanualbody
539 }
540 {
541 \end{pgfmanualentry}
542 }
543
544 \newenvironment{handler}[1]{
545 \begin{pgfmanualentry}
546 \extracthandler#1\@nil%
547 \pgfmanualbody
548 }
549 {
550 \end{pgfmanualentry}
551 }
552
553 \def\gobble#1{}
554 \def\extracthandler#1#2\@nil{%
555 \pgfmanualentryheadline{%
556 \pgfmanualpdflabel{/handlers/#1}{}%
557 \textbf{Key handler} \meta{key}{\ttfamily/\declare{#1}}#2}%
558 \index{\gobble#1@\protect\texttt{#1} handler}%
559 \index{Key handlers!#1@\protect\texttt{#1}}
560 }
561
562
563 \makeatletter
564
565
566 \newenvironment{stylekey}[1]{
567 \begin{pgfmanualentry}
568 \def\extrakeytext{style, }
569 \extractkey#1\@nil%
570 \pgfmanualbody
571 }
572 {
573 \end{pgfmanualentry}
574 }
575
576 \def\choicesep{$\vert$}%
577 \def\choicearg#1{\texttt{#1}}
578
579 \newif\iffirstchoice
580
581 % \mchoice{choice1,choice2,choice3}
582 \newcommand\mchoice[1]{%
583 \begingroup
584 \firstchoicetrue
585 \foreach \mchoice@ in {#1} {%
586 \iffirstchoice
587 \global\firstchoicefalse
588 \else
589 \choicesep
590 \fi
591 \choicearg{\mchoice@}%
592 }%
593 \endgroup
594 }%
595
596 % \begin{key}{/path/x=value}
597 % \begin{key}{/path/x=value (initially XXX)}
598 % \begin{key}{/path/x=value (default XXX)}
599 \newenvironment{key}[1]{
600 \begin{pgfmanualentry}
601 \def\extrakeytext{}
602 %\def\altpath{\emph{\color{gray}or}}%
603 \extractkey#1\@nil%
604 \pgfmanualbody
605 }
606 {
607 \end{pgfmanualentry}
608 }
609
610 % \insertpathifneeded{a key}{/pgf} -> assign mykey={/pgf/a key}
611 % \insertpathifneeded{/tikz/a key}{/pgf} -> assign mykey={/tikz/a key}
612 %
613 % #1: the key
614 % #2: a default path (or empty)
615 \def\insertpathifneeded#1#2{%
616 \def\insertpathifneeded@@{#2}%
617 \ifx\insertpathifneeded@@\empty
618 \def\mykey{#1}%
619 \else
620 \insertpathifneeded@#2\@nil
621 \ifpgfutil@in@
622 \def\mykey{#2/#1}%
623 \else
624 \def\mykey{#1}%
625 \fi
626 \fi
627 }%
628 \def\insertpathifneeded@#1#2\@nil{%
629 \def\insertpathifneeded@@{#1}%
630 \def\insertpathifneeded@@@{/}%
631 \ifx\insertpathifneeded@@\insertpathifneeded@@@
632 \pgfutil@in@true
633 \else
634 \pgfutil@in@false
635 \fi
636 }%
637
638 % \begin{keylist}[default path]
639 % {/path/option 1=value,/path/option 2=value2}
640 % \end{keylist}
641 \newenvironment{keylist}[2][]{%
642 \begin{pgfmanualentry}
643 \def\extrakeytext{}%
644 \foreach \xx in {#2} {%
645 \expandafter\insertpathifneeded\expandafter{\xx}{#1}%
646 \expandafter\extractkey\mykey\@nil%
647 }%
648 \pgfmanualbody
649 }{%
650 \end{pgfmanualentry}
651 }%
652
653 \def\extractkey#1\@nil{%
654 \pgfutil@in@={#1}%
655 \ifpgfutil@in@%
656 \extractkeyequal#1\@nil
657 \else%
658 \pgfutil@in@{(initial}{#1}%
659 \ifpgfutil@in@%
660 \extractequalinitial#1\@nil%
661 \else
662 \pgfmanualentryheadline{%
663 \def\mykey{#1}%
664 \def\mypath{}%
665 \gdef\myname{}%
666 \firsttimetrue%
667 \pgfmanualdecomposecount=0\relax%
668 \decompose#1/\nil%
669 {\ttfamily\declare{#1}}\hfill(\extrakeytext no value)}%
670 \fi
671 \fi%
672 }
673
674 \def\extractkeyequal#1=#2\@nil{%
675 \pgfutil@in@{(default}{#2}%
676 \ifpgfutil@in@%
677 \extractdefault{#1}#2\@nil%
678 \else%
679 \pgfutil@in@{(initial}{#2}%
680 \ifpgfutil@in@%
681 \extractinitial{#1}#2\@nil%
682 \else
683 \pgfmanualentryheadline{%
684 \def\mykey{#1}%
685 \def\mypath{}%
686 \gdef\myname{}%
687 \firsttimetrue%
688 \pgfmanualdecomposecount=0\relax%
689 \decompose#1/\nil%
690 {\ttfamily\declare{#1}=}#2\hfill(\extrakeytext no default)}%
691 \fi%
692 \fi%
693 }
694
695 \def\extractdefault#1#2(default #3)\@nil{%
696 \pgfmanualentryheadline{%
697 \def\mykey{#1}%
698 \def\mypath{}%
699 \gdef\myname{}%
700 \firsttimetrue%
701 \pgfmanualdecomposecount=0\relax%
702 \decompose#1/\nil%
703 {\ttfamily\declare{#1}\opt{=}}\opt{#2}\hfill (\extrakeytext default {\ttfamily#3})}%
704 }
705
706 \def\extractinitial#1#2(initially #3)\@nil{%
707 \pgfmanualentryheadline{%
708 \def\mykey{#1}%
709 \def\mypath{}%
710 \gdef\myname{}%
711 \firsttimetrue%
712 \pgfmanualdecomposecount=0\relax%
713 \decompose#1/\nil%
714 {\ttfamily\declare{#1}=}#2\hfill (\extrakeytext no default, initially {\ttfamily#3})}%
715 }
716
717 \def\extractequalinitial#1 (initially #2)\@nil{%
718 \pgfmanualentryheadline{%
719 \def\mykey{#1}%
720 \def\mypath{}%
721 \gdef\myname{}%
722 \firsttimetrue%
723 \pgfmanualdecomposecount=0\relax%
724 \decompose#1/\nil%
725 {\ttfamily\declare{#1}}\hfill (\extrakeytext initially {\ttfamily#2})}%
726 }
727
728 % Introduces a key alias '/#1/<name of current key>'
729 % to be used inside of \begin{key} ... \end{key}
730 \def\keyalias#1{\vspace{-3pt}\item{\small alias {\ttfamily/#1/\myname}}\vspace{-2pt}\par
731 \pgfmanualpdflabel{/#1/\myname}{}%
732 }
733
734 \newif\iffirsttime
735 \newcount\pgfmanualdecomposecount
736
737 \makeatother
738
739 \def\decompose/#1/#2\nil{%
740 \def\test{#2}%
741 \ifx\test\empty%
742 % aha.
743 \index{#1@\protect\texttt{#1} key}%
744 \index{\mypath#1@\protect\texttt{#1}}%
745 \gdef\myname{#1}%
746 \pgfmanualpdflabel{#1}{}
747 \else%
748 \advance\pgfmanualdecomposecount by1\relax%
749 \ifnum\pgfmanualdecomposecount>2\relax%
750 \decomposetoodeep#1/#2\nil%
751 \else%
752 \iffirsttime%
753 \begingroup%
754 % also make a pdf link anchor with full key path.
755 \def\hyperlabelwithoutslash##1/\nil{%
756 \pgfmanualpdflabel{##1}{}%
757 }%
758 \hyperlabelwithoutslash/#1/#2\nil%
759 \endgroup%
760 \def\mypath{#1@\protect\texttt{/#1/}!}%
761 \firsttimefalse%
762 \else%
763 \expandafter\def\expandafter\mypath\expandafter{\mypath#1@\protect\texttt{#1/}!}%
764 \fi%
765 \def\firsttime{}%
766 \decompose/#2\nil%
767 \fi%
768 \fi%
769 }
770
771 \def\decomposetoodeep#1/#2/\nil{%
772 % avoid too-deep nesting in index
773 \index{#1/#2@\protect\texttt{#1/#2} key}%
774 \index{\mypath#1/#2@\protect\texttt{#1/#2}}%
775 \decomposefindlast/#1/#2/\nil%
776 }
777 \makeatletter
778 \def\decomposefindlast/#1/#2\nil{%
779 \def\test{#2}%
780 \ifx\test\pgfutil@empty%
781 \gdef\myname{#1}%
782 \else%
783 \decomposefindlast/#2\nil%
784 \fi%
785 }
786 \makeatother
787 \def\indexkey#1{%
788 \def\mypath{}%
789 \decompose#1/\nil%
790 }
791
792 \newenvironment{predefinedmethod}[1]{
793 \begin{pgfmanualentry}
794 \extractpredefinedmethod#1\@nil
795 \pgfmanualbody
796 }
797 {
798 \end{pgfmanualentry}
799 }
800 \def\extractpredefinedmethod#1(#2)\@nil{%
801 \pgfmanualentryheadline{%
802 \pgfmanualpdflabel{#1}{}%
803 Method \declare{\ttfamily #1}\texttt(#2\texttt) \hfill(predefined for all classes)}
804 \index{#1@\protect\texttt{#1} method}%
805 \index{Methods!#1@\protect\texttt{#1}}
806 }
807
808
809 \newenvironment{ooclass}[1]{
810 \begin{pgfmanualentry}
811 \def\currentclass{#1}
812 \pgfmanualentryheadline{%
813 \pgfmanualpdflabel{#1}{}%
814 \textbf{Class} \declare{\texttt{#1}}}
815 \index{#1@\protect\texttt{#1} class}%
816 \index{Class #1@Class \protect\texttt{#1}}%
817 \index{Classes!#1@\protect\texttt{#1}}
818 \pgfmanualbody
819 }
820 {
821 \end{pgfmanualentry}
822 }
823
824 \newenvironment{method}[1]{
825 \begin{pgfmanualentry}
826 \extractmethod#1\@nil
827 \pgfmanualbody
828 }
829 {
830 \end{pgfmanualentry}
831 }
832 \def\extractmethod#1(#2)\@nil{%
833 \def\test{#1}
834 \ifx\test\currentclass
835 \pgfmanualentryheadline{%
836 \pgfmanualpdflabel{#1}{}%
837 Constructor \declare{\ttfamily #1}\texttt(#2\texttt)}
838 \else
839 \pgfmanualentryheadline{%
840 \pgfmanualpdflabel{#1}{}%
841 Method \declare{\ttfamily #1}\texttt(#2\texttt)}
842 \fi
843 \index{#1@\protect\texttt{#1} method}%
844 \index{Methods!#1@\protect\texttt{#1}}
845 \index{Class \currentclass!#1@\protect\texttt{#1}}%
846 }
847
848 \newenvironment{attribute}[1]{
849 \begin{pgfmanualentry}
850 \extractattribute#1\@nil
851 \pgfmanualbody
852 }
853 {
854 \end{pgfmanualentry}
855 }
856 \def\extractattribute#1=#2;\@nil{%
857 \def\test{#2}%
858 \ifx\test\@empty
859 \pgfmanualentryheadline{%
860 \pgfmanualpdflabel{#1}{}%
861 Private attribute \declare{\ttfamily #1} \hfill (initially empty)}
862 \else
863 \pgfmanualentryheadline{%
864 \pgfmanualpdflabel{#1}{}%
865 Private attribute \declare{\ttfamily #1} \hfill (initially {\ttfamily #2})}
866 \fi
867 \index{#1@\protect\texttt{#1} attribute}%
868 \index{Attributes!#1@\protect\texttt{#1}}
869 \index{Class \currentclass!#1@\protect\texttt{#1}}%
870 }
871
872
873
874 \newenvironment{predefinednode}[1]{
875 \begin{pgfmanualentry}
876 \pgfmanualentryheadline{%
877 \pgfmanualpdflabel{#1}{}%
878 \textbf{Predefined node} {\ttfamily\declare{#1}}}%
879 \index{#1@\protect\texttt{#1} node}%
880 \index{Predefined node!#1@\protect\texttt{#1}}
881 \pgfmanualbody
882 }
883 {
884 \end{pgfmanualentry}
885 }
886
887 \newenvironment{coordinatesystem}[1]{
888 \begin{pgfmanualentry}
889 \pgfmanualentryheadline{%
890 \pgfmanualpdflabel{#1}{}%
891 \textbf{Coordinate system} {\ttfamily\declare{#1}}}%
892 \index{#1@\protect\texttt{#1} coordinate system}%
893 \index{Coordinate systems!#1@\protect\texttt{#1}}
894 \pgfmanualbody
895 }
896 {
897 \end{pgfmanualentry}
898 }
899
900 \newenvironment{snake}[1]{
901 \begin{pgfmanualentry}
902 \pgfmanualentryheadline{\textbf{Snake} {\ttfamily\declare{#1}}}%
903 \index{#1@\protect\texttt{#1} snake}%
904 \index{Snakes!#1@\protect\texttt{#1}}
905 \pgfmanualbody
906 }
907 {
908 \end{pgfmanualentry}
909 }
910
911 \newenvironment{decoration}[1]{
912 \begin{pgfmanualentry}
913 \pgfmanualentryheadline{\textbf{Decoration} {\ttfamily\declare{#1}}}%
914 \index{#1@\protect\texttt{#1} decoration}%
915 \index{Decorations!#1@\protect\texttt{#1}}
916 \pgfmanualbody
917 }
918 {
919 \end{pgfmanualentry}
920 }
921
922
923 \def\pgfmanualbar{\char`\|}
924 \makeatletter
925 \newenvironment{pathoperation}[3][]{
926 \begin{pgfmanualentry}
927 \def\pgfmanualtest{#1}%
928 \pgfmanualentryheadline{%
929 \ifx\pgfmanualtest\@empty%
930 \pgfmanualpdflabel{#2}{}%
931 \fi%
932 \textcolor{gray}{{\ttfamily\char`\\path}\
933 \ \dots}
934 \declare{\texttt{#2}}#3\ \textcolor{gray}{\dots\texttt{;}}}%
935 \ifx\pgfmanualtest\@empty%
936 \index{#2@\protect\texttt{#2} path operation}%
937 \index{Path operations!#2@\protect\texttt{#2}}%
938 \fi%
939 \pgfmanualbody
940 }
941 {
942 \end{pgfmanualentry}
943 }
944 \newenvironment{datavisualizationoperation}[3][]{
945 \begin{pgfmanualentry}
946 \def\pgfmanualtest{#1}%
947 \pgfmanualentryheadline{%
948 \ifx\pgfmanualtest\@empty%
949 \pgfmanualpdflabel{#2}{}%
950 \fi%
951 \textcolor{gray}{{\ttfamily\char`\\datavisualization}\
952 \ \dots}
953 \declare{\texttt{#2}}#3\ \textcolor{gray}{\dots\texttt{;}}}%
954 \ifx\pgfmanualtest\@empty%
955 \index{#2@\protect\texttt{#2} (data visualization)}%
956 \index{Data visualization!#2@\protect\texttt{#2}}%
957 \fi%
958 \pgfmanualbody
959 }
960 {
961 \end{pgfmanualentry}
962 }
963 \makeatother
964
965 \def\doublebs{\texttt{\char`\\\char`\\}}
966
967
968 \newenvironment{package}[1]{
969 \begin{pgfmanualentry}
970 \pgfmanualentryheadline{%
971 \pgfmanualpdflabel{#1}{}%
972 {\ttfamily\char`\\usepackage\char`\{\declare{#1}\char`\}\space\space \char`\%\space\space \LaTeX}}
973 \index{#1@\protect\texttt{#1} package}%
974 \index{Packages and files!#1@\protect\texttt{#1}}%
975 \pgfmanualentryheadline{{\ttfamily\char`\\input \declare{#1}.tex\space\space\space \char`\%\space\space plain \TeX}}
976 \pgfmanualentryheadline{{\ttfamily\char`\\usemodule[\declare{#1}]\space\space \char`\%\space\space Con\TeX t}}
977 \pgfmanualbody
978 }
979 {
980 \end{pgfmanualentry}
981 }
982
983
984 \newenvironment{pgfmodule}[1]{
985 \begin{pgfmanualentry}
986 \pgfmanualentryheadline{%
987 \pgfmanualpdflabel{#1}{}%
988 {\ttfamily\char`\\usepgfmodule\char`\{\declare{#1}\char`\}\space\space\space
989 \char`\%\space\space \LaTeX\space and plain \TeX\space and pure pgf}}
990 \index{#1@\protect\texttt{#1} module}%
991 \index{Modules!#1@\protect\texttt{#1}}%
992 \pgfmanualentryheadline{{\ttfamily\char`\\usepgfmodule[\declare{#1}]\space\space \char`\%\space\space Con\TeX t\space and pure pgf}}
993 \pgfmanualbody
994 }
995 {
996 \end{pgfmanualentry}
997 }
998
999 \newenvironment{pgflibrary}[1]{
1000 \begin{pgfmanualentry}
1001 \pgfmanualentryheadline{%
1002 \pgfmanualpdflabel{#1}{}%
1003 \textbf{\tikzname\ Library} \texttt{\declare{#1}}}
1004 \index{#1@\protect\texttt{#1} library}%
1005 \index{Libraries!#1@\protect\texttt{#1}}%
1006 \vskip.25em%
1007 {{\ttfamily\char`\\usepgflibrary\char`\{\declare{#1}\char`\}\space\space\space
1008 \char`\%\space\space \LaTeX\space and plain \TeX\space and pure pgf}}\\
1009 {{\ttfamily\char`\\usepgflibrary[\declare{#1}]\space\space \char`\%\space\space Con\TeX t\space and pure pgf}}\\
1010 {{\ttfamily\char`\\usetikzlibrary\char`\{\declare{#1}\char`\}\space\space
1011 \char`\%\space\space \LaTeX\space and plain \TeX\space when using \tikzname}}\\
1012 {{\ttfamily\char`\\usetikzlibrary[\declare{#1}]\space
1013 \char`\%\space\space Con\TeX t\space when using \tikzname}}\\[.5em]
1014 \pgfmanualbody
1015 }
1016 {
1017 \end{pgfmanualentry}
1018 }
1019
1020 \newenvironment{purepgflibrary}[1]{
1021 \begin{pgfmanualentry}
1022 \pgfmanualentryheadline{%
1023 \pgfmanualpdflabel{#1}{}%
1024 \textbf{{\small PGF} Library} \texttt{\declare{#1}}}
1025 \index{#1@\protect\texttt{#1} library}%
1026 \index{Libraries!#1@\protect\texttt{#1}}%
1027 \vskip.25em%
1028 {{\ttfamily\char`\\usepgflibrary\char`\{\declare{#1}\char`\}\space\space\space
1029 \char`\%\space\space \LaTeX\space and plain \TeX}}\\
1030 {{\ttfamily\char`\\usepgflibrary[\declare{#1}]\space\space \char`\%\space\space Con\TeX t}}\\[.5em]
1031 \pgfmanualbody
1032 }
1033 {
1034 \end{pgfmanualentry}
1035 }
1036
1037 \newenvironment{tikzlibrary}[1]{
1038 \begin{pgfmanualentry}
1039 \pgfmanualentryheadline{%
1040 \pgfmanualpdflabel{#1}{}%
1041 \textbf{\tikzname\ Library} \texttt{\declare{#1}}}
1042 \index{#1@\protect\texttt{#1} library}%
1043 \index{Libraries!#1@\protect\texttt{#1}}%
1044 \vskip.25em%
1045 {{\ttfamily\char`\\usetikzlibrary\char`\{\declare{#1}\char`\}\space\space \char`\%\space\space \LaTeX\space and plain \TeX}}\\
1046 {{\ttfamily\char`\\usetikzlibrary[\declare{#1}]\space \char`\%\space\space Con\TeX t}}\\[.5em]
1047 \pgfmanualbody
1048 }
1049 {
1050 \end{pgfmanualentry}
1051 }
1052
1053
1054
1055 \newenvironment{filedescription}[1]{
1056 \begin{pgfmanualentry}
1057 \pgfmanualentryheadline{File {\ttfamily\declare{#1}}}%
1058 \index{#1@\protect\texttt{#1} file}%
1059 \index{Packages and files!#1@\protect\texttt{#1}}%
1060 \pgfmanualbody
1061 }
1062 {
1063 \end{pgfmanualentry}
1064 }
1065
1066
1067 \newenvironment{packageoption}[1]{
1068 \begin{pgfmanualentry}
1069 \pgfmanualentryheadline{{\ttfamily\char`\\usepackage[\declare{#1}]\char`\{pgf\char`\}}}
1070 \index{#1@\protect\texttt{#1} package option}%
1071 \index{Package options for \textsc{pgf}!#1@\protect\texttt{#1}}%
1072 \pgfmanualbody
1073 }
1074 {
1075 \end{pgfmanualentry}
1076 }
1077
1078
1079
1080 \newcommand\opt[1]{{\color{black!50!green}#1}}
1081 \newcommand\ooarg[1]{{\ttfamily[}\meta{#1}{\ttfamily]}}
1082
1083 \def\opt{\afterassignment\pgfmanualopt\let\next=}
1084 \def\pgfmanualopt{\ifx\next\bgroup\bgroup\color{black!50!green}\else{\color{black!50!green}\next}\fi}
1085
1086
1087
1088 \def\beamer{\textsc{beamer}}
1089 \def\pdf{\textsc{pdf}}
1090 \def\eps{\texttt{eps}}
1091 \def\pgfname{\textsc{pgf}}
1092 \def\tikzname{Ti\emph{k}Z}
1093 \def\pstricks{\textsc{pstricks}}
1094 \def\prosper{\textsc{prosper}}
1095 \def\seminar{\textsc{seminar}}
1096 \def\texpower{\textsc{texpower}}
1097 \def\foils{\textsc{foils}}
1098
1099 {
1100 \makeatletter
1101 \global\let\myempty=\@empty
1102 \global\let\mygobble=\@gobble
1103 \catcode`\@=12
1104 \gdef\getridofats#1@#2\relax{%
1105 \def\getridtest{#2}%
1106 \ifx\getridtest\myempty%
1107 \expandafter\def\expandafter\strippedat\expandafter{\strippedat#1}
1108 \else%
1109 \expandafter\def\expandafter\strippedat\expandafter{\strippedat#1\protect\printanat}
1110 \getridofats#2\relax%
1111 \fi%
1112 }
1113
1114 \gdef\removeats#1{%
1115 \let\strippedat\myempty%
1116 \edef\strippedtext{\stripcommand#1}%
1117 \expandafter\getridofats\strippedtext @\relax%
1118 }
1119
1120 \gdef\stripcommand#1{\expandafter\mygobble\string#1}
1121 }
1122
1123 \def\printanat{\char`\@}
1124
1125 \def\declare{\afterassignment\pgfmanualdeclare\let\next=}
1126 \def\pgfmanualdeclare{\ifx\next\bgroup\bgroup\color{red!75!black}\else{\color{red!75!black}\next}\fi}
1127
1128
1129 \let\textoken=\command
1130 \let\endtextoken=\endcommand
1131
1132 \def\myprintocmmand#1{\texttt{\char`\\#1}}
1133
1134 \def\example{\par\smallskip\noindent\textit{Example: }}
1135 \def\themeauthor{\par\smallskip\noindent\textit{Theme author: }}
1136
1137
1138 \def\indexoption#1{%
1139 \index{#1@\protect\texttt{#1} option}%
1140 \index{Graphic options and styles!#1@\protect\texttt{#1}}%
1141 }
1142
1143 \def\itemcalendaroption#1{\item \declare{\texttt{#1}}%
1144 \index{#1@\protect\texttt{#1} date test}%
1145 \index{Date tests!#1@\protect\texttt{#1}}%
1146 }
1147
1148
1149
1150 \def\class#1{\list{}{\leftmargin=2em\itemindent-\leftmargin\def\makelabel##1{\hss##1}}%
1151 \extractclass#1@\par\topsep=0pt}
1152 \def\endclass{\endlist}
1153 \def\extractclass#1#2@{%
1154 \item{{{\ttfamily\char`\\documentclass}#2{\ttfamily\char`\{\declare{#1}\char`\}}}}%
1155 \index{#1@\protect\texttt{#1} class}%
1156 \index{Classes!#1@\protect\texttt{#1}}}
1157
1158 \def\partname{Part}
1159
1160 \makeatletter
1161 \def\index@prologue{\section*{Index}\addcontentsline{toc}{section}{Index}
1162 This index only contains automatically generated entries. A good
1163 index should also contain carefully selected keywords. This index is
1164 not a good index.
1165 \bigskip
1166 }
1167 \c@IndexColumns=2
1168 \def\theindex{\@restonecoltrue
1169 \columnseprule \z@ \columnsep 29\p@
1170 \twocolumn[\index@prologue]%
1171 \parindent -30pt
1172 \columnsep 15pt
1173 \parskip 0pt plus 1pt
1174 \leftskip 30pt
1175 \rightskip 0pt plus 2cm
1176 \small
1177 \def\@idxitem{\par}%
1178 \let\item\@idxitem \ignorespaces}
1179 \def\endtheindex{\onecolumn}
1180 \def\noindexing{\let\index=\@gobble}
1181
1182
1183 \newenvironment{arrowtipsimple}[1]{
1184 \begin{pgfmanualentry}
1185 \pgfmanualentryheadline{\textbf{Arrow Tip Kind} {\ttfamily#1}}
1186 \index{#1@\protect\texttt{#1} arrow tip}%
1187 \index{Arrow tips!#1@\protect\texttt{#1}}%
1188 \def\currentarrowtype{#1}
1189 \pgfmanualbody}
1190 {
1191 \end{pgfmanualentry}
1192 }
1193
1194 \newenvironment{arrowtip}[4]{
1195 \begin{pgfmanualentry}
1196 \pgfmanualentryheadline{\textbf{Arrow Tip Kind} {\ttfamily#1}}
1197 \index{#1@\protect\texttt{#1} arrow tip}%
1198 \index{Arrow tips!#1@\protect\texttt{#1}}%
1199 \pgfmanualbody
1200 \def\currentarrowtype{#1}
1201 \begin{minipage}[t]{10.25cm}
1202 #2
1203 \end{minipage}\hskip5mm\begin{minipage}[t]{4.75cm}
1204 \leavevmode\vskip-2em
1205 \tikz{
1206 \draw [black!50,line width=5mm,-{#1[#3,color=black]}] (-4,0) -- (0,0);
1207 \foreach \action in {#4}
1208 { \expandafter\processaction\action\relax }
1209 }
1210 \end{minipage}\par\smallskip
1211 }
1212 {
1213 \end{pgfmanualentry}
1214 }
1215
1216 \newenvironment{arrowcap}[5]{
1217 \begin{pgfmanualentry}
1218 \pgfmanualentryheadline{\textbf{Arrow Tip Kind} {\ttfamily#1}}
1219 \index{#1@\protect\texttt{#1} arrow tip}%
1220 \index{Arrow tips!#1@\protect\texttt{#1}}%
1221 \pgfmanualbody
1222 \def\currentarrowtype{#1}
1223 \begin{minipage}[t]{10.25cm}
1224 #2
1225 \end{minipage}\hskip5mm\begin{minipage}[t]{4.75cm}
1226 \leavevmode\vskip-2em
1227 \tikz{
1228 \path [tips, line width=10mm,-{#1[#3,color=black]}] (-4,0) -- (0,0);
1229 \draw [line width=10mm,black!50] (-3,0) -- (#5,0);
1230 \foreach \action in {#4}
1231 { \expandafter\processaction\action\relax }
1232 }
1233 \end{minipage}\par\smallskip
1234 }
1235 {
1236 \end{pgfmanualentry}
1237 }
1238
1239 \def\processaction#1=#2\relax{
1240 \expandafter\let\expandafter\pgf@temp\csname manual@action@#1\endcsname
1241 \ifx\pgf@temp\relax\else
1242 \pgf@temp#2/0/\relax
1243 \fi
1244 }
1245 \def\manual@action@length#1/#2/#3\relax{%
1246 \draw [red,|<->|,semithick,xshift=#2] ([yshift=4pt]current bounding
1247 box.north -| -#1,0) coordinate (last length) -- node
1248 [above=-2pt] {|length|} ++(#1,0);
1249 }
1250 \def\manual@action@width#1/#2/#3\relax{%
1251 \draw [overlay, red,|<->|,semithick] (.5,-#1/2) -- node [below,sloped] {|width|} (.5,#1/2);
1252 }
1253 \def\manual@action@inset#1/#2/#3\relax{%
1254 \draw [red,|<->|,semithick,xshift=#2] ([yshift=-4pt]current bounding
1255 box.south -| last length) -- node [below] {|inset|} ++(#1,0);
1256 }
1257
1258 \newenvironment{arrowexamples}
1259 {\begin{tabbing}
1260 \hbox to \dimexpr\linewidth-5.5cm\relax{\emph{Appearance of the below at line width} \hfil} \=
1261 \hbox to 1.9cm{\emph{0.4pt}\hfil} \= \hbox to 2cm{\emph{0.8pt}\hfil} \= \emph{1.6pt} \\
1262 }
1263 {\end{tabbing}\vskip-1em}
1264
1265 \newenvironment{arrowcapexamples}
1266 {\begin{tabbing}
1267 \hbox to \dimexpr\linewidth-5.5cm\relax{\emph{Appearance of the below at line width} \hfil} \=
1268 \hbox to 1.9cm{\emph{1ex}\hfil} \= \hbox to 2cm{\emph{1em}\hfil} \\
1269 }
1270 {\end{tabbing}\vskip-1em}
1271
1272 \def\arrowcapexample#1[#2]{\def\temp{#1}\ifx\temp\pgfutil@empty\arrowcapexample@\currentarrowtype[{#2}]\else\arrowcapexample@#1[{#2}]\fi}
1273 \def\arrowcapexample@#1[#2]{%
1274 {\sfcode`\.1000\small\texttt{#1[#2]}} \>
1275 \kern-.5ex\tikz [baseline,>={#1[#2]}] \draw [line
1276 width=1ex,->] (0,.5ex) -- (2em,.5ex); \>
1277 \kern-.5em\tikz [baseline,>={#1[#2]}] \draw [line
1278 width=1em,->] (0,.5ex) -- (2em,.5ex); \\
1279 }
1280
1281 \def\arrowexample#1[#2]{\def\temp{#1}\ifx\temp\pgfutil@empty\arrowexample@\currentarrowtype[{#2}]\else\arrowexample@#1[{#2}]\fi}
1282 \def\arrowexample@#1[#2]{%
1283 {\sfcode`\.1000\small\texttt{#1[#2]}} \>
1284 \tikz [baseline,>={#1[#2]}] \draw [line
1285 width=0.4pt,->] (0,.5ex) -- (2em,.5ex); thin \>
1286 \tikz [baseline,>={#1[#2]}] \draw [line
1287 width=0.8pt,->] (0,.5ex) -- (2em,.5ex); \textbf{thick} \>
1288 \tikz [baseline,>={#1[#2]}] \draw [line
1289 width=1.6pt,->] (0,.5ex) -- (3em,.5ex); \\
1290 }
1291 \def\arrowexampledup[#1]{\arrowexample[{#1] \currentarrowtype[}]}
1292 \def\arrowexampledupdot[#1]{\arrowexample[{#1] . \currentarrowtype[}]}
1293
1294 \def\arrowexampledouble#1[#2]{\def\temp{#1}\ifx\temp\pgfutil@empty\arrowexampledouble@\currentarrowtype[{#2}]\else\arrowexampledouble@#1[{#2}]\fi}
1295 \def\arrowexampledouble@#1[#2]{%
1296 {\sfcode`\.1000\small\texttt{#1[#2]} on double line} \>
1297 \tikz [baseline,>={#1[#2]}]
1298 \draw [double equal sign distance,line width=0.4pt,->] (0,.5ex) -- (2em,.5ex); thin \>
1299 \tikz [baseline,>={#1[#2]}]
1300 \draw [double equal sign distance,line width=0.8pt,->] (0,.5ex) -- (2em,.5ex); \textbf{thick} \>
1301 \tikz [baseline,>={#1[#2]}]
1302 \draw [double equal sign distance, line width=1.6pt,->] (0,.5ex) -- (3em,.5ex); \\
1303 }
1304
1305
1306
1307 \newcommand\symarrow[1]{%
1308 \index{#1@\protect\texttt{#1} arrow tip}%
1309 \index{Arrow tips!#1@\protect\texttt{#1}}%
1310 \texttt{#1}& yields thick
1311 \begin{tikzpicture}[arrows={#1-#1},thick,baseline]
1312 \useasboundingbox (-1mm,-0.5ex) rectangle (1.1cm,2ex);
1313 \fill [black!15] (1cm,-.5ex) rectangle (1.1cm,1.5ex) (-1mm,-.5ex) rectangle (0mm,1.5ex) ;
1314 \draw (0pt,.5ex) -- (1cm,.5ex);
1315 \end{tikzpicture} and thin
1316 \begin{tikzpicture}[arrows={#1-#1},thin,baseline]
1317 \useasboundingbox (-1mm,-0.5ex) rectangle (1.1cm,2ex);
1318 \fill [black!15] (1cm,-.5ex) rectangle (1.1cm,1.5ex) (-1mm,-.5ex) rectangle (0mm,1.5ex) ;
1319 \draw (0pt,.5ex) -- (1cm,.5ex);
1320 \end{tikzpicture}
1321 }
1322 \newcommand\symarrowdouble[1]{%
1323 \index{#1@\protect\texttt{#1} arrow tip}%
1324 \index{Arrow tips!#1@\protect\texttt{#1}}%
1325 \texttt{#1}& yields thick
1326 \begin{tikzpicture}[arrows={#1-#1},thick,baseline]
1327 \useasboundingbox (-1mm,-0.5ex) rectangle (1.1cm,2ex);
1328 \fill [black!15] (1cm,-.5ex) rectangle (1.1cm,1.5ex) (-1mm,-.5ex) rectangle (0mm,1.5ex) ;
1329 \draw (0pt,.5ex) -- (1cm,.5ex);
1330 \end{tikzpicture}
1331 and thin
1332 \begin{tikzpicture}[arrows={#1-#1},thin,baseline]
1333 \useasboundingbox (-1mm,-0.5ex) rectangle (1.1cm,2ex);
1334 \fill [black!15] (1cm,-.5ex) rectangle (1.1cm,1.5ex) (-1mm,-.5ex) rectangle (0mm,1.5ex) ;
1335 \draw (0pt,.5ex) -- (1cm,.5ex);
1336 \end{tikzpicture}, double
1337 \begin{tikzpicture}[arrows={#1-#1},thick,baseline]
1338 \useasboundingbox (-1mm,-0.5ex) rectangle (1.1cm,2ex);
1339 \fill [black!15] (1cm,-.5ex) rectangle (1.1cm,1.5ex) (-1mm,-.5ex) rectangle (0mm,1.5ex) ;
1340 \draw[double,double equal sign distance] (0pt,.5ex) -- (1cm,.5ex);
1341 \end{tikzpicture} and
1342 \begin{tikzpicture}[arrows={#1-#1},thin,baseline]
1343 \useasboundingbox (-1mm,-0.5ex) rectangle (1.1cm,2ex);
1344 \fill [black!15] (1cm,-.5ex) rectangle (1.1cm,1.5ex) (-1mm,-.5ex) rectangle (0mm,1.5ex) ;
1345 \draw[double,double equal sign distance] (0pt,.5ex) -- (1cm,.5ex);
1346 \end{tikzpicture}
1347 }
1348
1349 \newcommand\sarrow[2]{%
1350 \index{#1@\protect\texttt{#1} arrow tip}%
1351 \index{Arrow tips!#1@\protect\texttt{#1}}%
1352 \index{#2@\protect\texttt{#2} arrow tip}%
1353 \index{Arrow tips!#2@\protect\texttt{#2}}%
1354 \texttt{#1-#2}& yields thick
1355 \begin{tikzpicture}[arrows={#1-#2},thick,baseline]
1356 \useasboundingbox (-1mm,-0.5ex) rectangle (1.1cm,2ex);
1357 \fill [black!15] (1cm,-.5ex) rectangle (1.1cm,1.5ex) (-1mm,-.5ex) rectangle (0mm,1.5ex) ;
1358 \draw (0pt,.5ex) -- (1cm,.5ex);
1359 \end{tikzpicture} and thin
1360 \begin{tikzpicture}[arrows={#1-#2},thin,baseline]
1361 \useasboundingbox (-1mm,-0.5ex) rectangle (1.1cm,2ex);
1362 \fill [black!15] (1cm,-.5ex) rectangle (1.1cm,1.5ex) (-1mm,-.5ex) rectangle (0mm,1.5ex) ;
1363 \draw (0pt,.5ex) -- (1cm,.5ex);
1364 \end{tikzpicture}
1365 }
1366
1367 \newcommand\sarrowdouble[2]{%
1368 \index{#1@\protect\texttt{#1} arrow tip}%
1369 \index{Arrow tips!#1@\protect\texttt{#1}}%
1370 \index{#2@\protect\texttt{#2} arrow tip}%
1371 \index{Arrow tips!#2@\protect\texttt{#2}}%
1372 \texttt{#1-#2}& yields thick
1373 \begin{tikzpicture}[arrows={#1-#2},thick,baseline]
1374 \useasboundingbox (-1mm,-0.5ex) rectangle (1.1cm,2ex);
1375 \fill [black!15] (1cm,-.5ex) rectangle (1.1cm,1.5ex) (-1mm,-.5ex) rectangle (0mm,1.5ex) ;
1376 \draw (0pt,.5ex) -- (1cm,.5ex);
1377 \end{tikzpicture} and thin
1378 \begin{tikzpicture}[arrows={#1-#2},thin,baseline]
1379 \useasboundingbox (-1mm,-0.5ex) rectangle (1.1cm,2ex);
1380 \fill [black!15] (1cm,-.5ex) rectangle (1.1cm,1.5ex) (-1mm,-.5ex) rectangle (0mm,1.5ex) ;
1381 \draw (0pt,.5ex) -- (1cm,.5ex);
1382 \end{tikzpicture}, double
1383 \begin{tikzpicture}[arrows={#1-#2},thick,baseline]
1384 \useasboundingbox (-1mm,-0.5ex) rectangle (1.1cm,2ex);
1385 \fill [black!15] (1cm,-.5ex) rectangle (1.1cm,1.5ex) (-1mm,-.5ex) rectangle (0mm,1.5ex) ;
1386 \draw[double,double equal sign distance] (0pt,.5ex) -- (1cm,.5ex);
1387 \end{tikzpicture} and
1388 \begin{tikzpicture}[arrows={#1-#2},thin,baseline]
1389 \useasboundingbox (-1mm,-0.5ex) rectangle (1.1cm,2ex);
1390 \fill [black!15] (1cm,-.5ex) rectangle (1.1cm,1.5ex) (-1mm,-.5ex) rectangle (0mm,1.5ex) ;
1391 \draw[double,double equal sign distance] (0pt,.5ex) -- (1cm,.5ex);
1392 \end{tikzpicture}
1393 }
1394
1395 \newcommand\carrow[1]{%
1396 \index{#1@\protect\texttt{#1} arrow tip}%
1397 \index{Arrow tips!#1@\protect\texttt{#1}}%
1398 \texttt{#1}& yields for line width 1ex
1399 \begin{tikzpicture}[arrows={#1-#1},line width=1ex,baseline]
1400 \useasboundingbox (-1mm,-0.5ex) rectangle (1.6cm,2ex);
1401 \fill [black!15] (1.5cm,-.5ex) rectangle (1.6cm,1.5ex) (-1mm,-.5ex) rectangle (0mm,1.5ex) ;
1402 \draw (0pt,.5ex) -- (1.5cm,.5ex);
1403 \end{tikzpicture}
1404 }
1405 \def\myvbar{\char`\|}
1406 \newcommand\plotmarkentry[1]{%
1407 \index{#1@\protect\texttt{#1} plot mark}%
1408 \index{Plot marks!#1@\protect\texttt{#1}}
1409 \texttt{\char`\\pgfuseplotmark\char`\{\declare{#1}\char`\}} &
1410 \tikz\draw[color=black!25] plot[mark=#1,mark options={fill=examplefill,draw=black}] coordinates{(0,0) (.5,0.2) (1,0) (1.5,0.2)};\\
1411 }
1412 \newcommand\plotmarkentrytikz[1]{%
1413 \index{#1@\protect\texttt{#1} plot mark}%
1414 \index{Plot marks!#1@\protect\texttt{#1}}
1415 \texttt{mark=\declare{#1}} & \tikz\draw[color=black!25]
1416 plot[mark=#1,mark options={fill=examplefill,draw=black}]
1417 coordinates {(0,0) (.5,0.2) (1,0) (1.5,0.2)};\\
1418 }
1419
1420
1421
1422 \ifx\scantokens\@undefined
1423 \PackageError{pgfmanual-macros}{You need to use extended latex
1424 (elatex) or (pdfelatex) to process this document}{}
1425 \fi
1426
1427 \begingroup
1428 \catcode`|=0
1429 \catcode`[= 1
1430 \catcode`]=2
1431 \catcode`\{=12
1432 \catcode `\}=12
1433 \catcode`\\=12 |gdef|find@example#1\end{codeexample}[|endofcodeexample[#1]]
1434 |endgroup
1435
1436 % define \returntospace.
1437 %
1438 % It should define NEWLINE as {}, spaces and tabs as \space.
1439 \begingroup
1440 \catcode`\^=7
1441 \catcode`\^^M=13
1442 \catcode`\^^I=13
1443 \catcode`\ =13%
1444 \gdef\returntospace{\catcode`\ =13\def {\space}\catcode`\^^I=13\def^^I{\space}}
1445 \gdef\showreturn{\show^^M}
1446 \endgroup
1447
1448 \begingroup
1449 \catcode`\%=13
1450 \catcode`\^^M=13
1451 \gdef\commenthandler{\catcode`\%=13\def%{\@gobble@till@return}}
1452 \gdef\@gobble@till@return#1^^M{}
1453 \gdef\@gobble@till@return@ignore#1^^M{\ignorespaces}
1454 \gdef\typesetcomment{\catcode`\%=13\def%{\@typeset@till@return}}
1455 \gdef\@typeset@till@return#1^^M{{\def%{\char`\%}\textsl{\char`\%#1}}\par}
1456 \endgroup
1457
1458 % Define tab-implementation functions
1459 % \codeexample@tabinit@replacementchars@
1460 % and
1461 % \codeexample@tabinit@catcode@
1462 %
1463 % They should ONLY be used in case that tab replacement is active.
1464 %
1465 % This here is merely a preparation step.
1466 %
1467 % Idea:
1468 % \codeexample@tabinit@catcode@ will make TAB active
1469 % and
1470 % \codeexample@tabinit@replacementchars@ will insert as many spaces as
1471 % /codeexample/tabsize contains.
1472 {
1473 \catcode`\^^I=13
1474 % ATTENTION: do NOT use tabs in these definitions!!
1475 \gdef\codeexample@tabinit@replacementchars@{%
1476 \begingroup
1477 \count0=\pgfkeysvalueof{/codeexample/tabsize}\relax
1478 \toks0={}%
1479 \loop
1480 \ifnum\count0>0
1481 \advance\count0 by-1
1482 \toks0=\expandafter{\the\toks0\ }%
1483 \repeat
1484 \xdef\codeexample@tabinit@replacementchars@@{\the\toks0}%
1485 \endgroup
1486 \let^^I=\codeexample@tabinit@replacementchars@@
1487 }%
1488 \gdef\codeexample@tabinit@catcode@{\catcode`\^^I=13}%
1489 }%
1490
1491 % Called after any options have been set. It assigns
1492 % \codeexample@tabinit@catcode
1493 % and
1494 % \codeexample@tabinit@replacementchars
1495 % which are used inside of
1496 %\begin{codeexample}
1497 % ...
1498 %\end{codeexample}
1499 %
1500 % \codeexample@tabinit@catcode is either \relax or it makes tab
1501 % active.
1502 %
1503 % \codeexample@tabinit@replacementchars is either \relax or it inserts
1504 % a proper replacement sequence for tabs (as many spaces as
1505 % configured)
1506 \def\codeexample@tabinit{%
1507 \ifnum\pgfkeysvalueof{/codeexample/tabsize}=0\relax
1508 \let\codeexample@tabinit@replacementchars=\relax
1509 \let\codeexample@tabinit@catcode=\relax
1510 \else
1511 \let\codeexample@tabinit@catcode=\codeexample@tabinit@catcode@
1512 \let\codeexample@tabinit@replacementchars=\codeexample@tabinit@replacementchars@
1513 \fi
1514 }
1515
1516 \newif\ifpgfmanualtikzsyntaxhilighting
1517
1518 \pgfqkeys{/codeexample}{%
1519 width/.code= {\setlength\codeexamplewidth{#1}},
1520 graphic/.code= {\colorlet{graphicbackground}{#1}},
1521 code/.code= {\colorlet{codebackground}{#1}},
1522 execute code/.is if=code@execute,
1523 code only/.code= {\code@executefalse},
1524 pre/.store in=\code@pre,
1525 post/.store in=\code@post,
1526 % #1 is the *complete* environment contents as it shall be
1527 % typeset. In particular, the catcodes are NOT the normal ones.
1528 typeset listing/.code= {#1},
1529 render instead/.store in=\code@render,
1530 vbox/.code= {\def\code@pre{\vbox\bgroup\setlength{\hsize}{\linewidth-6pt}}\def\code@post{\egroup}},
1531 ignorespaces/.code= {\let\@gobble@till@return=\@gobble@till@return@ignore},
1532 leave comments/.code= {\def\code@catcode@hook{\catcode`\%=12}\let\commenthandler=\relax\let\typesetcomment=\relax},
1533 tabsize/.initial=0,% FIXME : this here is merely used for indentation. It is just a TAB REPLACEMENT.
1534 every codeexample/.style={width=4cm+7pt, tikz syntax=true},
1535 from file/.code={\codeexamplefromfiletrue\def\codeexamplesource{#1}},
1536 tikz syntax/.is if=pgfmanualtikzsyntaxhilighting,
1537 }
1538
1539
1540 \newread\examplesource
1541
1542
1543 % Opening, reading and closing the results file
1544
1545 \def\opensource#1{
1546 \immediate\openin\examplesource=#1
1547 }
1548 \def\do@codeexamplefromfile{%
1549 \immediate\openin\examplesource\expandafter{\codeexamplesource}%
1550 \def\examplelines{}%
1551 \readexamplelines
1552 \closein\examplesource
1553 \expandafter\endofcodeexample\expandafter{\examplelines}%
1554 }
1555
1556 \def\readexamplelines{
1557 \ifeof\examplesource%
1558 \else
1559 \immediate\read\examplesource to \exampleline
1560 \expandafter\expandafter\expandafter\def\expandafter\expandafter\expandafter\examplelines\expandafter\expandafter\expandafter{\expandafter\examplelines\exampleline}
1561 \expandafter\readexamplelines%
1562 \fi
1563 }
1564
1565 \let\code@pre\pgfutil@empty
1566 \let\code@post\pgfutil@empty
1567 \let\code@render\pgfutil@empty
1568 \def\code@catcode@hook{}
1569
1570 \newif\ifcodeexamplefromfile
1571 \newdimen\codeexamplewidth
1572 \newif\ifcode@execute
1573 \newbox\codeexamplebox
1574 \def\codeexample[#1]{%
1575 \begingroup%
1576 \code@executetrue
1577 \pgfqkeys{/codeexample}{every codeexample,#1}%
1578 \ifpgfmanualtikzsyntaxhilighting%
1579 \pgfkeys{/codeexample/syntax hilighting}%
1580 \fi%
1581 \ifcodeexamplefromfile\begingroup\fi
1582 \codeexample@tabinit% assigns \codeexample@tabinit@[catcode,replacementchars]
1583 \parindent0pt
1584 \begingroup%
1585 \par%
1586 \medskip%
1587 \let\do\@makeother%
1588 \dospecials%
1589 \obeylines%
1590 \@vobeyspaces%
1591 \catcode`\%=13%
1592 \catcode`\^^M=13%
1593 \code@catcode@hook%
1594 \codeexample@tabinit@catcode
1595 \relax%
1596 \ifcodeexamplefromfile%
1597 \expandafter\do@codeexamplefromfile%
1598 \else%
1599 \expandafter\find@example%
1600 \fi}
1601 \def\endofcodeexample#1{%
1602 \endgroup%
1603 \ifcode@execute%
1604 \setbox\codeexamplebox=\hbox{%
1605 \ifx\code@render\pgfutil@empty%
1606 {%
1607 {%
1608 \returntospace%
1609 \commenthandler%
1610 \xdef\code@temp{#1}% removes returns and comments
1611 }%
1612 \catcode`\^^M=9%
1613 \colorbox{graphicbackground}{\color{black}\ignorespaces%
1614 \code@pre\expandafter\scantokens\expandafter{\code@temp\ignorespaces}\code@post\ignorespaces}%
1615 }%
1616 \else%
1617 \colorbox{graphicbackground}{\color{black}\ignorespaces%
1618 \code@render}%
1619 \fi%
1620 }%
1621 \ifdim\wd\codeexamplebox>\codeexamplewidth%
1622 \def\code@start{\par}%
1623 \def\code@flushstart{}\def\code@flushend{}%
1624 \def\code@mid{\parskip2pt\par\noindent}%
1625 \def\code@width{\linewidth-6pt}%
1626 \def\code@end{}%
1627 \else%
1628 \def\code@start{%
1629 \linewidth=\textwidth%
1630 \parshape \@ne 0pt \linewidth
1631 \leavevmode%
1632 \hbox\bgroup}%
1633 \def\code@flushstart{\hfill}%
1634 \def\code@flushend{\hbox{}}%
1635 \def\code@mid{\hskip6pt}%
1636 \def\code@width{\linewidth-12pt-\codeexamplewidth}%
1637 \def\code@end{\egroup}%
1638 \fi%
1639 \code@start%
1640 \noindent%
1641 \begin{minipage}[t]{\codeexamplewidth}\raggedright
1642 \hrule width0pt%
1643 \footnotesize\vskip-1em%
1644 \code@flushstart\box\codeexamplebox\code@flushend%
1645 \vskip-1ex
1646 \leavevmode%
1647 \end{minipage}%
1648 \else%
1649 \def\code@mid{\par}
1650 \def\code@width{\linewidth-6pt}
1651 \def\code@end{}
1652 \fi%
1653 \code@mid%
1654 \colorbox{codebackground}{%
1655 \pgfkeysvalueof{/codeexample/prettyprint/base color}%
1656 \begin{minipage}[t]{\code@width}%
1657 {%
1658 \let\do\@makeother
1659 \dospecials
1660 \frenchspacing\@vobeyspaces
1661 \normalfont\ttfamily\footnotesize
1662 \typesetcomment%
1663 \codeexample@tabinit@replacementchars
1664 \@tempswafalse
1665 \def\par{%
1666 \if@tempswa
1667 \leavevmode \null \@@par\penalty\interlinepenalty
1668 \else
1669 \@tempswatrue
1670 \ifhmode\@@par\penalty\interlinepenalty\fi
1671 \fi}%
1672 \obeylines
1673 \everypar \expandafter{\the\everypar \unpenalty}%
1674 \pgfkeysvalueof{/codeexample/typeset listing/.@cmd}{#1}\pgfeov
1675 }
1676 \end{minipage}}%
1677 \code@end%
1678 \par%
1679 \medskip
1680 \endcodeexample\endgroup
1681 }
1682
1683 \def\endcodeexample{\endgroup}
1684
1685
1686 \makeatother
1687
1688 \usepackage{pgfmanual}
1689
1690
1691 % autoxref is now always on
1692
1693 % \makeatletter
1694 % % \pgfautoxrefs will be defined by 'make dist'
1695 % \pgfutil@ifundefined{pgfautoxrefs}{%
1696 % \renewcommand\pgfmanualpdflabel[3][]{#3}% NO-OP
1697 % \def\pgfmanualpdfref#1#2{#2}%
1698 % \pgfkeys{
1699 % /pdflinks/codeexample links=false,% DISABLED.
1700 % }%
1701 % }{}
1702 % \makeatother
1703
1704 \newdimen\pgfmanualcslinkpreskip
1705
1706 % Styling of the pretty printer
1707 \pgfkeys{
1708 /codeexample/syntax hilighting/.style={
1709 /codeexample/prettyprint/key name/.code={\textcolor{green!50!black}{\pgfmanualpdfref{##1}{##1}}},
1710 /codeexample/prettyprint/key name with handler/.code 2 args={\textcolor{green!50!black}{\pgfmanualpdfref{##1}{##1}}/\textcolor{blue!70!black}{\pgfmanualpdfref{/handlers/##2}{##2}}},
1711 /codeexample/prettyprint/key value display only/.code={\textcolor{green!50!black}{{\itshape{\let\pgfmanualwordstartup\relax\pgfmanualprettyprintcode{##1}}}}},
1712 /codeexample/prettyprint/cs/.code={\textcolor{blue!70!black}{\pgfmanualcslinkpreskip4.25pt\pgfmanualpdfref{##1}{##1}}},
1713 /codeexample/prettyprint/cs with args/.code 2 args={\textcolor{black}{\pgfmanualcslinkpreskip4.25pt\pgfmanualpdfref{##1}{##1}}\{\textcolor{black}{\pgfmanualprettyprintcode{##2}}\pgfmanualclosebrace},
1714 /codeexample/prettyprint/cs arguments/pgfkeys/.initial=1,
1715 /codeexample/prettyprint/cs/pgfkeys/.code 2 args={\textcolor{black}{\pgfmanualcslinkpreskip4.25pt\pgfmanualpdfref{##1}{##1}}\{\textcolor{black}{\pgfmanualprettyprintpgfkeys{##2}}\pgfmanualclosebrace},
1716 /codeexample/prettyprint/cs arguments/begin/.initial=1,
1717 /codeexample/prettyprint/cs/begin/.code 2 args={\textcolor{black}{##1}\{\textcolor{blue!70!black}{\pgfmanualpdfref{##2}{##2}}\pgfmanualclosebrace},
1718 /codeexample/prettyprint/cs arguments/end/.initial=1,
1719 /codeexample/prettyprint/cs/end/.code 2 args={\textcolor{black}{##1}\{\textcolor{blue!70!black}{\pgfmanualpdfref{##2}{##2}}\pgfmanualclosebrace},
1720 /codeexample/prettyprint/word/.code={\pgfmanualwordstartup{\begingroup\pgfkeyssetvalue{/pdflinks/search key prefixes in}{}\pgfmanualpdfref{##1}{##1}\endgroup}},
1721 /codeexample/prettyprint/point/.code={\textcolor{violet}{##1}},%
1722 /codeexample/prettyprint/point with cs/.code 2 args={\textcolor{violet}{(\pgfmanualpdfref{##1}{##1}:##2}},%
1723 /codeexample/prettyprint/comment font=\itshape,
1724 /codeexample/prettyprint/base color/.initial=\color{black!55},
1725 /pdflinks/render hyperlink/.code={%
1726 {\setbox0=\hbox{##1}%
1727 \rlap{{\color{white}\dimen0\wd0\advance\dimen0by-\pgfmanualcslinkpreskip\hskip\pgfmanualcslinkpreskip\vrule width\dimen0 height-1pt depth1.6pt}}%
1728 \box0%
1729 }%
1730 }
1731 }
1732 }
1733
1734 \def\pgfmanualwordstartup{\textcolor{black}}
1735
1736
1737 %%% Local Variables:
1738 %%% mode: latex
1739 %%% TeX-master: "beameruserguide"
1740 %%% End: