| 1 |
% Copyright 2019 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 Public License. |
| 7 |
% |
| 8 |
% See the file doc/generic/pgf/licenses/LICENSE for more details. |
| 9 |
|
| 10 |
|
| 11 |
% The files pgfkeys.code.tex and pgfkeysfiltered.code.tex are |
| 12 |
% perfectly self-contained, except that the catcode of @ |
| 13 |
% should be made a letter. |
| 14 |
|
| 15 |
|
| 16 |
% Guard against reading twice |
| 17 |
\ifx\pgfkeysloaded\undefined |
| 18 |
\let\pgfkeysloaded=\relax |
| 19 |
\else |
| 20 |
\expandafter\endinput |
| 21 |
\fi |
| 22 |
|
| 23 |
% The purpose of this file is to provide a general settings engine that |
| 24 |
% works with all TeX formats and has no save-stack impact |
| 25 |
|
| 26 |
\def\pgfkeys@empty{} |
| 27 |
\long\def\pgfkeys@firstoftwo#1#2{#1} |
| 28 |
\long\def\pgfkeys@secondoftwo#1#2{#2} |
| 29 |
\long\def\pgfkeys@ifcsname#1{% |
| 30 |
\ifcsname#1\endcsname |
| 31 |
\expandafter\pgfkeys@firstoftwo |
| 32 |
\else |
| 33 |
\expandafter\pgfkeys@secondoftwo |
| 34 |
\fi |
| 35 |
} |
| 36 |
|
| 37 |
% This is useful: |
| 38 |
|
| 39 |
\ifx\PackageError\undefined |
| 40 |
\def\pgfkeys@error#1{\errmessage{Package pgfkeys Error: #1}}% |
| 41 |
\else |
| 42 |
\def\pgfkeys@error#1{\PackageError{pgfkeys}{#1}{}}% |
| 43 |
\fi |
| 44 |
|
| 45 |
\ifx\eTeXrevision\undefined% |
| 46 |
\pgfkeys@error{PGF requires etex in extended mode}% |
| 47 |
\csname @@end\expandafter\endcsname\expandafter\end% |
| 48 |
\fi |
| 49 |
|
| 50 |
\ifnum\eTeXversion<2 |
| 51 |
\pgfkeys@error{PGF requires etex version 2}% |
| 52 |
\csname @@end\expandafter\endcsname\expandafter\end% |
| 53 |
\fi |
| 54 |
|
| 55 |
% e-TeX primitives and beyond |
| 56 |
|
| 57 |
\ifx\contextversion\undefined |
| 58 |
\let\pgfkeys@expanded \expanded |
| 59 |
\let\pgfkeys@unexpanded \unexpanded |
| 60 |
\else |
| 61 |
\let\pgfkeys@expanded \normalexpanded |
| 62 |
\let\pgfkeys@unexpanded \normalunexpanded |
| 63 |
\fi |
| 64 |
|
| 65 |
\begingroup |
| 66 |
\edef\pgfkeys@tmpa{\string\expanded} |
| 67 |
\edef\pgfkeys@tmpb{\meaning\pgfkeys@expanded} |
| 68 |
\expandafter |
| 69 |
\endgroup |
| 70 |
\ifx\pgfkeys@tmpa\pgfkeys@tmpb |
| 71 |
\else |
| 72 |
\pgfkeys@error{PGF requires the \noexpand\expanded primitive} |
| 73 |
\csname @@end\expandafter\endcsname\expandafter\end% |
| 74 |
\fi |
| 75 |
|
| 76 |
|
| 77 |
% Set a key to a value |
| 78 |
% |
| 79 |
% #1 = key |
| 80 |
% #2 = tokens |
| 81 |
% |
| 82 |
% Description: |
| 83 |
% |
| 84 |
% This command sets the key to the given tokens. The tokens are stored as |
| 85 |
% is and can even contain things like #9. |
| 86 |
% |
| 87 |
% Keys are organized hierarchically using something similar to Unix |
| 88 |
% paths. Thus, a typically key might be called "/tikz/length" or |
| 89 |
% "/tikz/length dimension/.@cmd". Some keys starting with a dot are |
| 90 |
% special, so they should not be used as normal key names (they are |
| 91 |
% similar to Unix files starting with a dot -- you can use them, but |
| 92 |
% be careful). |
| 93 |
% |
| 94 |
% Keys are always local to the current TeX group. |
| 95 |
% |
| 96 |
% Example: |
| 97 |
% |
| 98 |
% \pgfkeyssetvalue{/tikz/length}{2cm-3cm} |
| 99 |
% \pgfkeyssetvalue{/algo/swap}{{#2}{#1}} |
| 100 |
|
| 101 |
\long\def\pgfkeyssetvalue#1#2{% |
| 102 |
\pgfkeys@temptoks{#2}\expandafter\edef\csname pgfk@#1\endcsname{\the\pgfkeys@temptoks}% |
| 103 |
} |
| 104 |
|
| 105 |
\long\def\pgfkeyssetevalue#1#2{% |
| 106 |
\expandafter\edef\csname pgfk@#1\endcsname |
| 107 |
{\pgfkeys@unexpanded\expandafter{\pgfkeys@expanded{#2}}}% |
| 108 |
} |
| 109 |
|
| 110 |
% Add text to a key at the end |
| 111 |
% |
| 112 |
% #1 = key |
| 113 |
% #2 = a value to be added at the beginning |
| 114 |
% #3 = a value to be added at the end |
| 115 |
% |
| 116 |
% Description: |
| 117 |
% |
| 118 |
% This command adds #2 to the definition of the key. The key should |
| 119 |
% have been set previously using \pgfkeyssetvalue. |
| 120 |
% |
| 121 |
% Example: |
| 122 |
% |
| 123 |
% \pgfkeysaddvalue{/tikz/length}{}{-3cm} |
| 124 |
|
| 125 |
\long\def\pgfkeysaddvalue#1#2#3{% |
| 126 |
{% |
| 127 |
\toks0{#2}% |
| 128 |
\pgfkeysifdefined{#1} |
| 129 |
{\pgfkeys@temptoks\expandafter\expandafter\expandafter{\csname pgfk@#1\endcsname}}% |
| 130 |
{\pgfkeys@temptoks{}}% |
| 131 |
\toks1{#3}% |
| 132 |
\xdef\pgfkeys@global@temp{\the\toks0 \the\pgfkeys@temptoks \the\toks1}% believe or don't: the spaces are important |
| 133 |
}% |
| 134 |
\pgfkeyslet{#1}\pgfkeys@global@temp% |
| 135 |
} |
| 136 |
|
| 137 |
|
| 138 |
|
| 139 |
% Makes a key equal a given code |
| 140 |
% |
| 141 |
% #1 = key |
| 142 |
% #2 = a code name |
| 143 |
% |
| 144 |
% Description: |
| 145 |
% |
| 146 |
% This command executes a \let command so that a key gets the same |
| 147 |
% value as the parameter #2. |
| 148 |
% |
| 149 |
% Keys are always local to the current TeX group. |
| 150 |
% |
| 151 |
% Example: |
| 152 |
% |
| 153 |
% \pgfkeyslet{/algo/swap}{\myswap} |
| 154 |
|
| 155 |
\long\def\pgfkeyslet#1#2{% |
| 156 |
\expandafter\let\csname pgfk@#1\endcsname#2% |
| 157 |
} |
| 158 |
|
| 159 |
|
| 160 |
% Retrieve the code stored in a key into a code |
| 161 |
% |
| 162 |
% #1 = key |
| 163 |
% #2 = code |
| 164 |
% |
| 165 |
% Description: |
| 166 |
% |
| 167 |
% This command will set #2 to "point" to the value stored in the key. |
| 168 |
% |
| 169 |
% Example: |
| 170 |
% |
| 171 |
% \pgfkeysgetvalue{/tikz/swap}{\myswap} |
| 172 |
|
| 173 |
\long\def\pgfkeysgetvalue#1#2{% |
| 174 |
\pgfkeys@ifcsname{pgfk@#1}% |
| 175 |
{\expandafter\let\expandafter#2\csname pgfk@#1\endcsname}% |
| 176 |
{\let#2\relax}} |
| 177 |
|
| 178 |
|
| 179 |
|
| 180 |
% Retrieve the value stored in a key |
| 181 |
% |
| 182 |
% #1 = key |
| 183 |
% |
| 184 |
% Description: |
| 185 |
% |
| 186 |
% This command will expand to the value stored in the key. The key |
| 187 |
% should previously have been set using \pgfkeyasetkey or \pgfkeyslet. |
| 188 |
% |
| 189 |
% Example: |
| 190 |
% |
| 191 |
% The length is \pgfkeysvalue{/tikz/length}. |
| 192 |
|
| 193 |
\let\pgfkeys@relax\relax |
| 194 |
\long\def\pgfkeysvalueof#1{\csname\pgfkeys@ifcsname{pgfk@#1}{pgfk@#1}{pgfkeys@relax}\endcsname} |
| 195 |
|
| 196 |
|
| 197 |
|
| 198 |
% If for testing whether a key exists |
| 199 |
% |
| 200 |
% #1 = key |
| 201 |
% #2 = if-case |
| 202 |
% #3 = else-case |
| 203 |
% |
| 204 |
% Description: |
| 205 |
% |
| 206 |
% This if will be executed if the key exists. In eTeX mode this works |
| 207 |
% like a normal if, in normal TeX mode you need to provide an \else. |
| 208 |
% |
| 209 |
% Example: |
| 210 |
% |
| 211 |
% \pgfkeysifdefined{/tikz/length}{key exists}{does not exist} |
| 212 |
|
| 213 |
\long\def\pgfkeysifdefined#1{% |
| 214 |
\ifcsname pgfk@#1\endcsname |
| 215 |
\expandafter\pgfkeys@firstoftwo |
| 216 |
\else |
| 217 |
\expandafter\pgfkeys@secondoftwo |
| 218 |
\fi |
| 219 |
} |
| 220 |
|
| 221 |
% Tests whether a key is assignable. For standard keys which just |
| 222 |
% store their value, this is identical to \pgfkeysifdefined. |
| 223 |
% |
| 224 |
% But \pgfkeysifassignable is true for command keys as well (but not |
| 225 |
% for handled keys). |
| 226 |
\long\def\pgfkeysifassignable#1#2#3{% |
| 227 |
\pgfkeysifdefined{#1}% |
| 228 |
{#2} |
| 229 |
{\pgfkeysifdefined{#1/.@cmd}% |
| 230 |
{#2}% |
| 231 |
{#3}}% |
| 232 |
}% |
| 233 |
|
| 234 |
|
| 235 |
|
| 236 |
% Execute settings |
| 237 |
% |
| 238 |
% #1 = list of settings |
| 239 |
% |
| 240 |
% Description: |
| 241 |
% |
| 242 |
% The list of settings should contain comma-separated settings. Each |
| 243 |
% setting has the following form: |
| 244 |
% |
| 245 |
% /path/key=value |
| 246 |
% |
| 247 |
% The parts "/path/" and "=value" are optional. When the path is not |
| 248 |
% specified, the value of the token register "\pgfkeypath" is used. If |
| 249 |
% "=value" is missing, the value of the setting "/path/key/.@def" is used |
| 250 |
% instead. If this key is set to "\pgfvaluerequired", the key |
| 251 |
% "/errors/value required/.@cmd" is executed. This error handler, |
| 252 |
% like all other error handlers, will get the current key as its first |
| 253 |
% parameter (unexpanded) and the current value as its second value |
| 254 |
% (also unexpanded). |
| 255 |
% |
| 256 |
% Any spaces at the beginning and at the end and around the |
| 257 |
% equals-sign are removed. The key with the complete path is set to |
| 258 |
% the code \pgfcurrentkey. |
| 259 |
% |
| 260 |
% The setting is then processed according to the following rules: |
| 261 |
% |
| 262 |
% 1) If the key /path/key/.@cmd" is present, its code is executed |
| 263 |
% with the value computed above, followed by \pgfeov (end of |
| 264 |
% value). So, to handle |
| 265 |
% |
| 266 |
% "/stuff/height= 1.5 ," |
| 267 |
% |
| 268 |
% /stuff/height/.@cmd should be set to some code, that can |
| 269 |
% handle the parameter |
| 270 |
% |
| 271 |
% "1.5\pgfeov" |
| 272 |
% |
| 273 |
% For instance, saying |
| 274 |
% |
| 275 |
% \pgfkeys{/stuff/height/.@cmd}{#1\pgfeov}{\def\myheight{#1}} |
| 276 |
% |
| 277 |
% will do nicely. |
| 278 |
% |
| 279 |
% 2) Otherwise, if the key /path/key is present, this key is |
| 280 |
% set to the value computed above. |
| 281 |
% |
| 282 |
% 3) Otherwise, if the key /handlers/key/.@cmd is present, it is executed |
| 283 |
% with the same parameters as in 1). Additionally, the |
| 284 |
% token register \pgfcurrentkeypath will be set to "/path/" and the |
| 285 |
% macro \pgfcurrentkeywithoutpath to "key". So, in the above |
| 286 |
% example if neither "/stuff/height/.@cmd" nor |
| 287 |
% "/stuff/height" is present, but "/handlers/height" is, |
| 288 |
% then "/handlers/height" is executed with the parameters: |
| 289 |
% |
| 290 |
% "1.5\pgfeov" |
| 291 |
% |
| 292 |
% and \pgfcurrentkey is set to "/stuff/height" and \pgfcurrentkeypath |
| 293 |
% is set to "/stuff/" and \pgfcurrentkeywithoutpath to "height". |
| 294 |
% |
| 295 |
% 4) Otherwise, if the key "/path/.unknown/.@cmd" is present, its code is |
| 296 |
% executed with the same parameters as in 3). |
| 297 |
% |
| 298 |
% 5) Otherwise, the key "/handlers/.unknown/.@cmd" is executed with the same |
| 299 |
% parameters as in 1). |
| 300 |
% |
| 301 |
% After all settings have been processed, the value of the token |
| 302 |
% register \pgfdefaultkeypath is set to its original value. Thus, any local |
| 303 |
% change of this token register has no effect outside the call. |
| 304 |
% |
| 305 |
% Example: |
| 306 |
% |
| 307 |
% \pgfkeys{/tikz/.is family} |
| 308 |
% \pgfkeys{/tikz/line width/.cd, |
| 309 |
% .def=\pgfsetlinewidth{##1}, |
| 310 |
% .set default=.4pt} |
| 311 |
% \pgfkeys{tikz,line width=1pt} |
| 312 |
|
| 313 |
\newtoks\pgfkeys@pathtoks |
| 314 |
\def\pgfkeyscurrentpath{\the\pgfkeys@pathtoks} |
| 315 |
\newtoks\pgfkeys@temptoks |
| 316 |
|
| 317 |
\def\pgfkeys@root{/} |
| 318 |
\let\pgfkeysdefaultpath\pgfkeys@root |
| 319 |
|
| 320 |
\def\pgfkeys{\expandafter\pgfkeys@@set\expandafter{\pgfkeysdefaultpath}}% |
| 321 |
\long\def\pgfkeys@@set#1#2{% |
| 322 |
\let\pgfkeysdefaultpath\pgfkeys@root% |
| 323 |
\pgfkeys@parse#2,\pgfkeys@mainstop% |
| 324 |
\def\pgfkeysdefaultpath{#1}} |
| 325 |
|
| 326 |
\def\pgfkeys@parse{\futurelet\pgfkeys@possiblerelax\pgfkeys@parse@main} |
| 327 |
\def\pgfkeys@parse@main{% |
| 328 |
\ifx\pgfkeys@possiblerelax\pgfkeys@mainstop% |
| 329 |
\expandafter\pgfkeys@cleanup% |
| 330 |
\else% |
| 331 |
\expandafter\pgfkeys@normal% |
| 332 |
\fi% |
| 333 |
} |
| 334 |
\newif\ifpgfkeys@syntax@handlers |
| 335 |
\def\pgfkeys@normal{% |
| 336 |
\ifpgfkeys@syntax@handlers% |
| 337 |
\expandafter\pgfkeys@syntax@handlers% |
| 338 |
\else% |
| 339 |
\expandafter\pgfkeys@@normal% |
| 340 |
\fi% |
| 341 |
} |
| 342 |
\def\pgfkeys@syntax@handlers{\pgf@keys@utilifnextchar\relax\pgfkeys@syntax@@handlers\pgfkeys@syntax@@handlers}%get rid of spaces |
| 343 |
\def\pgfkeys@syntax@@handlers{\futurelet\pgfkeys@first@char\pgfkeys@syntax@handlers@test} |
| 344 |
\def\pgfkeys@syntax@handlers@test{% |
| 345 |
\pgfkeysgetvalue{/handlers/first char syntax/\meaning\pgfkeys@first@char}\pgfkeys@the@handler% |
| 346 |
\ifx\pgfkeys@the@handler\relax% |
| 347 |
\expandafter\pgfkeys@@normal% |
| 348 |
\else% |
| 349 |
\expandafter\pgfkeys@use@handler% |
| 350 |
\fi% |
| 351 |
} |
| 352 |
\long\def\pgfkeys@use@handler#1,{% |
| 353 |
\pgfkeys@the@handler{#1}% |
| 354 |
\pgfkeys@parse% |
| 355 |
} |
| 356 |
|
| 357 |
\long\def\pgfkeys@@normal#1,{% |
| 358 |
\pgfkeys@unpack#1=\pgfkeysnovalue=\pgfkeys@stop% |
| 359 |
\pgfkeys@parse% |
| 360 |
} |
| 361 |
\def\pgfkeys@cleanup\pgfkeys@mainstop{} |
| 362 |
|
| 363 |
\def\pgfkeys@mainstop{\pgfkeys@mainstop} % equals only itself |
| 364 |
\def\pgfkeys@novalue{} |
| 365 |
\def\pgfkeysnovalue{\pgfkeys@novalue} % equals only itself |
| 366 |
\def\pgfkeysnovalue@text{\pgfkeysnovalue} |
| 367 |
\def\pgfkeysvaluerequired{\pgfkeysvaluerequired} % equals only itself |
| 368 |
|
| 369 |
\long\def\pgfkeys@unpack#1=#2=#3\pgfkeys@stop{% |
| 370 |
\pgfkeys@spdef\pgfkeyscurrentkey{#1}% |
| 371 |
\edef\pgfkeyscurrentkey{\pgfkeyscurrentkey}% |
| 372 |
\ifx\pgfkeyscurrentkey\pgfkeys@empty% |
| 373 |
% Skip |
| 374 |
\else% |
| 375 |
\pgfkeys@add@path@as@needed% |
| 376 |
\pgfkeys@spdef\pgfkeyscurrentvalue{#2}% |
| 377 |
\ifx\pgfkeyscurrentvalue\pgfkeysnovalue@text% Hmm... no value |
| 378 |
\pgfkeysifdefined{\pgfkeyscurrentkey/.@def}% |
| 379 |
{\pgfkeysgetvalue{\pgfkeyscurrentkey/.@def}{\pgfkeyscurrentvalue}} |
| 380 |
{}% no default, so leave it |
| 381 |
\fi% |
| 382 |
\ifx\pgfkeyscurrentvalue\pgfkeysvaluerequired% |
| 383 |
\def\pgf@marshal{\pgfkeysvalueof{/errors/value required/.@cmd}}% |
| 384 |
\expandafter\pgf@marshal\expandafter{\pgfkeyscurrentkey}{}\pgfeov% |
| 385 |
\else% |
| 386 |
\pgfkeys@case@one% |
| 387 |
\fi% |
| 388 |
\fi} |
| 389 |
|
| 390 |
\def\pgfkeys@case@one{% |
| 391 |
\pgfkeysifdefined{\pgfkeyscurrentkey/.@cmd}% |
| 392 |
{\pgfkeysgetvalue{\pgfkeyscurrentkey/.@cmd}{\pgfkeys@code}% |
| 393 |
\ifx\pgfkeys@code\relax\expandafter\pgfkeys@firstoftwo\else\expandafter\pgfkeys@secondoftwo\fi |
| 394 |
{\pgfkeys@unknown}% |
| 395 |
{\expandafter\pgfkeys@code\pgfkeyscurrentvalue\pgfeov}} |
| 396 |
{\pgfkeys@case@two}% |
| 397 |
} |
| 398 |
|
| 399 |
\def\pgfkeys@case@two{% |
| 400 |
\pgfkeysifdefined{\pgfkeyscurrentkey}% |
| 401 |
{\pgfkeys@case@two@extern}% |
| 402 |
{\pgfkeys@case@three}% |
| 403 |
} |
| 404 |
|
| 405 |
\def\pgfkeys@case@two@extern{% |
| 406 |
\ifx\pgfkeyscurrentvalue\pgfkeysnovalue@text% |
| 407 |
\pgfkeysvalueof{\pgfkeyscurrentkey}% |
| 408 |
\else% |
| 409 |
\pgfkeyslet{\pgfkeyscurrentkey}\pgfkeyscurrentvalue% |
| 410 |
\fi% |
| 411 |
} |
| 412 |
|
| 413 |
|
| 414 |
% either handled key or unknown. |
| 415 |
% |
| 416 |
% This macro will be replaced by the /handler config/handle only existing |
| 417 |
% configuration, see below. |
| 418 |
\def\pgfkeys@case@three{% |
| 419 |
\pgfkeys@split@path% |
| 420 |
\pgfkeysifdefined{/handlers/\pgfkeyscurrentname/.@cmd}% |
| 421 |
{\pgfkeysgetvalue{/handlers/\pgfkeyscurrentname/.@cmd}{\pgfkeys@code}% |
| 422 |
\expandafter\pgfkeys@code\pgfkeyscurrentvalue\pgfeov} |
| 423 |
{\pgfkeys@unknown}% |
| 424 |
} |
| 425 |
\let\pgfkeys@case@three@handleall=\pgfkeys@case@three |
| 426 |
\def\pgfkeys@case@three@handle@restricted{% |
| 427 |
\pgfkeys@split@path% |
| 428 |
\pgfkeysifdefined{/handlers/\pgfkeyscurrentname/.@cmd}{% |
| 429 |
\pgfkeys@ifexecutehandler{% |
| 430 |
\pgfkeysgetvalue{/handlers/\pgfkeyscurrentname/.@cmd}{\pgfkeys@code}% |
| 431 |
\expandafter\pgfkeys@code\pgfkeyscurrentvalue\pgfeov |
| 432 |
}{% |
| 433 |
% this here is necessary: /my search path/key/.code |
| 434 |
% won't be called, so \pgfkeyscurrentpath == '/my search path/key' |
| 435 |
% -> it should be one directory higher! We want to invoke the |
| 436 |
% .unknown handler in |
| 437 |
% '/my search path' |
| 438 |
% |
| 439 |
% Idea: |
| 440 |
% set |
| 441 |
% - path := '/my search path' |
| 442 |
% - name := 'key/.code' |
| 443 |
% - key = '/my search path/key/.code' |
| 444 |
\let\pgfkeys@tempa=\pgfkeyscurrentkey |
| 445 |
\let\pgfkeys@tempb=\pgfkeyscurrentname |
| 446 |
\edef\pgfkeyscurrentkey{\pgfkeyscurrentpath}% |
| 447 |
\pgfkeys@split@path% |
| 448 |
\let\pgfkeyscurrentkey=\pgfkeys@tempa |
| 449 |
\edef\pgfkeyscurrentname{\pgfkeyscurrentname/\pgfkeys@tempb}% |
| 450 |
\pgfkeys@unknown |
| 451 |
}% |
| 452 |
}{% |
| 453 |
\pgfkeys@unknown |
| 454 |
}% |
| 455 |
} |
| 456 |
|
| 457 |
% this macro is to implement the |handle only existing| key in key filtering: |
| 458 |
% #1: the code to invoke IF the key handler shall be executed |
| 459 |
% #2: the code to invoke if it shall not run. |
| 460 |
\def\pgfkeys@ifexecutehandler#1#2{#1}% |
| 461 |
\let\pgfkeys@ifexecutehandler@handleall=\pgfkeys@ifexecutehandler |
| 462 |
\def\pgfkeys@ifexecutehandler@handleonlyexisting#1#2{% |
| 463 |
\pgfkeys@ifcsname{pgfk@excpt@\pgfkeyscurrentname}{% |
| 464 |
#1% ok, this particular key handler is known and should be processed in any case (for example .try) |
| 465 |
}{% |
| 466 |
% implement the 'only existing' feature here: |
| 467 |
\pgfkeysifdefined{\pgfkeyscurrentpath}{#1}{% |
| 468 |
\pgfkeysifdefined{\pgfkeyscurrentpath/.@cmd}{#1}{#2}% |
| 469 |
}{}% |
| 470 |
}% |
| 471 |
}% |
| 472 |
\def\pgfkeys@ifexecutehandler@handlefullorexisting#1#2{% |
| 473 |
\ifpgfkeysaddeddefaultpath |
| 474 |
\pgfkeys@ifcsname{pgfk@excpt@\pgfkeyscurrentname}{% |
| 475 |
#1% ok, this particular key handler is known and be processed in any case (for example .try) |
| 476 |
}{% |
| 477 |
% implement the 'only existing' feature here: |
| 478 |
\pgfkeysifdefined{\pgfkeyscurrentpath}{% |
| 479 |
#1% |
| 480 |
}{% |
| 481 |
\pgfkeysifdefined{\pgfkeyscurrentpath/.@cmd}{% |
| 482 |
#1% |
| 483 |
}{% |
| 484 |
#2% |
| 485 |
}% |
| 486 |
}% |
| 487 |
}% |
| 488 |
\else |
| 489 |
#1% ok, always true if the USER explicitly provided the full key path. |
| 490 |
\fi |
| 491 |
}% |
| 492 |
\def\pgfkeysaddhandleonlyexistingexception#1{\expandafter\def\csname pgfk@excpt@#1\endcsname{1}}% |
| 493 |
|
| 494 |
\def\pgfkeys@unknown{% |
| 495 |
\pgfkeysifdefined{\pgfkeyscurrentpath/.unknown/.@cmd}% |
| 496 |
{% |
| 497 |
\pgfkeysgetvalue{\pgfkeyscurrentpath/.unknown/.@cmd}{\pgfkeys@code}% |
| 498 |
\expandafter\pgfkeys@code\pgfkeyscurrentvalue\pgfeov} |
| 499 |
{% |
| 500 |
\pgfkeysgetvalue{/handlers/.unknown/.@cmd}{\pgfkeys@code}% |
| 501 |
\expandafter\pgfkeys@code\pgfkeyscurrentvalue\pgfeov% |
| 502 |
}% |
| 503 |
} |
| 504 |
|
| 505 |
|
| 506 |
\long\def\pgfkey@argumentisspace#1{% |
| 507 |
\long\def\pgfkeys@spdef##1##2{% |
| 508 |
\futurelet\pgfkeys@possiblespace\pgfkeys@sp@a##2\pgfkeys@stop\pgfkeys@stop#1\pgfkeys@stop\relax##1}% |
| 509 |
\def\pgfkeys@sp@a{% |
| 510 |
\ifx\pgfkeys@possiblespace\pgfkeys@sptoken% |
| 511 |
\expandafter\pgfkeys@sp@b% |
| 512 |
\else% |
| 513 |
\expandafter\pgfkeys@sp@b\expandafter#1% |
| 514 |
\fi}% |
| 515 |
\long\def\pgfkeys@sp@b#1##1 \pgfkeys@stop{\pgfkeys@sp@c##1}% |
| 516 |
} |
| 517 |
\pgfkey@argumentisspace{ } |
| 518 |
\long\def\pgfkeys@sp@c#1\pgfkeys@stop#2\relax#3{\pgfkeys@temptoks{#1}\edef#3{\the\pgfkeys@temptoks}} |
| 519 |
{\def\:{\global\let\pgfkeys@sptoken= } \: } |
| 520 |
|
| 521 |
|
| 522 |
|
| 523 |
\def\pgfkeys@add@path@as@needed{% Should add the path if the |
| 524 |
% \pgfkeyscurrentkey does not start with / |
| 525 |
\expandafter\futurelet\expandafter\pgfkeys@possibleslash\expandafter\pgfkeys@check@slash\pgfkeyscurrentkey\relax% |
| 526 |
} |
| 527 |
\newif\ifpgfkeysaddeddefaultpath |
| 528 |
\def\pgfkeys@check@slash{% |
| 529 |
\ifx\pgfkeys@possibleslash/% |
| 530 |
\expandafter\pgfkeys@nevermind% |
| 531 |
\else% |
| 532 |
\expandafter\pgfkeys@addpath% |
| 533 |
\fi% |
| 534 |
} |
| 535 |
|
| 536 |
\def\pgfkeys@nevermind#1\relax{% |
| 537 |
\pgfkeysaddeddefaultpathfalse |
| 538 |
\let\pgfkeyscurrentkeyRAW\pgfkeyscurrentkey |
| 539 |
} |
| 540 |
\def\pgfkeys@addpath#1\relax{% |
| 541 |
\pgfkeysaddeddefaultpathtrue |
| 542 |
\def\pgfkeyscurrentkeyRAW{#1}% |
| 543 |
\edef\pgfkeyscurrentkey{\pgfkeysdefaultpath#1}% |
| 544 |
} |
| 545 |
|
| 546 |
|
| 547 |
\def\pgfkeys@split@path{% Should assign the two codes |
| 548 |
% \pgfkeyscurrentname and \pgfcurrentlkeypath |
| 549 |
\pgfkeys@pathtoks{}% |
| 550 |
\expandafter\pgfkeys@splitter\pgfkeyscurrentkey//% |
| 551 |
} |
| 552 |
\def\pgfkeys@splitter#1/#2/{% |
| 553 |
\def\pgfkeys@temp{#2}% |
| 554 |
\ifx\pgfkeys@temp\pgfkeys@empty% |
| 555 |
% Ah. done |
| 556 |
\def\pgfkeyscurrentname{#1}% |
| 557 |
\expandafter\pgfkeys@gobbletoslash% |
| 558 |
\else% |
| 559 |
\expandafter\pgfkeys@pathtoks\expandafter{\the\pgfkeys@pathtoks#1/}% |
| 560 |
\fi% |
| 561 |
\pgfkeys@splitter#2/% |
| 562 |
} |
| 563 |
\def\pgfkeys@gobbletoslash\pgfkeys@splitter/{% |
| 564 |
\if\relax\detokenize\expandafter{\the\pgfkeys@pathtoks}\relax\else |
| 565 |
\expandafter\pgfkeys@remove@slash\the\pgfkeys@pathtoks\relax |
| 566 |
\fi |
| 567 |
}% |
| 568 |
\def\pgfkeys@remove@slash#1/\relax{\pgfkeys@pathtoks{#1}} |
| 569 |
|
| 570 |
|
| 571 |
|
| 572 |
% Quickly set keys |
| 573 |
% |
| 574 |
% #1 = default path |
| 575 |
% #2 = key-value pairs |
| 576 |
% |
| 577 |
% Description: |
| 578 |
% |
| 579 |
% This command starts the execution with the default path set to |
| 580 |
% #1. This command should only be used when speed is important (like |
| 581 |
% in a heavily used macro like \tikzset). Normally, keys should be |
| 582 |
% used to set the path. Note that if #1 equals /, then \pgfkeys will |
| 583 |
% actually be quicker! |
| 584 |
% |
| 585 |
% Example: |
| 586 |
% |
| 587 |
% \pgfqkeys{/tikz}{myother length/.code=\def\myotherlength{#1}\pgfkeysalso{length={#1}}} |
| 588 |
|
| 589 |
\def\pgfqkeys{\expandafter\pgfkeys@@qset\expandafter{\pgfkeysdefaultpath}}% |
| 590 |
\long\def\pgfkeys@@qset#1#2#3{\def\pgfkeysdefaultpath{#2/}\pgfkeys@parse#3,\pgfkeys@mainstop\def\pgfkeysdefaultpath{#1}} |
| 591 |
|
| 592 |
|
| 593 |
% Sets keys while setting keys |
| 594 |
% |
| 595 |
% #1 = key-value pairs |
| 596 |
% |
| 597 |
% Description: |
| 598 |
% |
| 599 |
% This code may only be called inside the code that is executed for a |
| 600 |
% key. The #1 should be a list of settings pairs. They will be executed |
| 601 |
% as if they had been given as the argument to the \pgfkeys command. |
| 602 |
% |
| 603 |
% Example: |
| 604 |
% |
| 605 |
% \pgfkeys{tikz,myother length/.code=\def\myotherlength{#1}\pgfkeysalso{length={#1}}} |
| 606 |
|
| 607 |
\long\def\pgfkeysalso#1{\pgfkeys@parse#1,\pgfkeys@mainstop} |
| 608 |
|
| 609 |
|
| 610 |
|
| 611 |
% Quickly sets keys while setting keys |
| 612 |
% |
| 613 |
% #1 = default path |
| 614 |
% #2 = key-value pairs |
| 615 |
% |
| 616 |
% Description: |
| 617 |
% |
| 618 |
% This command executes #2 with the default path set to #1. This |
| 619 |
% command will cause chaos if used incorrectly. The only safe |
| 620 |
% place to use it instead of \pgfkeys is at the beginning of a TeX group. |
| 621 |
% |
| 622 |
% Example: |
| 623 |
% |
| 624 |
% \begingroup |
| 625 |
% \pgfqkeysalso{/tikz}{myother length/.code=\def\myotherlength{#1}\pgfkeysalso{length={#1}}} |
| 626 |
|
| 627 |
\long\def\pgfqkeysalso#1#2{\def\pgfkeysdefaultpath{#1/}\pgfkeys@parse#2,\pgfkeys@mainstop} |
| 628 |
|
| 629 |
|
| 630 |
|
| 631 |
|
| 632 |
% Now setup the default handlers and keys: |
| 633 |
|
| 634 |
% Define a key macro with one argument (\def or \edef) |
| 635 |
% |
| 636 |
% #1 = key |
| 637 |
% #2 = code |
| 638 |
% |
| 639 |
% Description: |
| 640 |
% |
| 641 |
% This command will setup things so the key/.@cmd contains a macro |
| 642 |
% that takes one parameter and has #2 as its code. |
| 643 |
% |
| 644 |
% Example: |
| 645 |
% |
| 646 |
% \pgfkeysdef{/my key}{\show#1} |
| 647 |
|
| 648 |
\long\def\pgfkeysdef#1#2{% |
| 649 |
\long\def\pgfkeys@temp##1\pgfeov{#2}% |
| 650 |
\pgfkeyslet{#1/.@cmd}{\pgfkeys@temp}% |
| 651 |
\pgfkeyssetvalue{#1/.@body}{#2}% |
| 652 |
} |
| 653 |
\long\def\pgfkeysedef#1#2{% |
| 654 |
\long\edef\pgfkeys@temp##1\pgfeov{#2}% |
| 655 |
\pgfkeyslet{#1/.@cmd}{\pgfkeys@temp}% |
| 656 |
\pgfkeyssetevalue{#1/.@body}{#2}% |
| 657 |
} |
| 658 |
|
| 659 |
|
| 660 |
% Define a key macro with multiple arguments (\def or \edef) |
| 661 |
% |
| 662 |
% #1 = key |
| 663 |
% #2 = argument pattern |
| 664 |
% #2 = code |
| 665 |
% |
| 666 |
% Description: |
| 667 |
% |
| 668 |
% This command will setup things so the key/.@cmd contains a macro |
| 669 |
% that takes #2 as its parameter pattern and has #3 as its code. |
| 670 |
% |
| 671 |
% Example: |
| 672 |
% |
| 673 |
% \pgfkeysdefargs{/swap}{#1#2}{#2#1} |
| 674 |
|
| 675 |
\long\def\pgfkeysdefargs#1#2#3{% |
| 676 |
\long\def\pgfkeys@temp#2\pgfeov{#3}% |
| 677 |
\pgfkeyslet{#1/.@cmd}{\pgfkeys@temp}% |
| 678 |
\pgfkeyssetvalue{#1/.@args}{#2\pgfeov}% |
| 679 |
\pgfkeyssetvalue{#1/.@body}{#3}% |
| 680 |
} |
| 681 |
|
| 682 |
\long\def\pgfkeysedefargs#1#2#3{% |
| 683 |
\long\edef\pgfkeys@temp#2\pgfeov{#3}% |
| 684 |
\pgfkeyslet{#1/.@cmd}{\pgfkeys@temp}% |
| 685 |
\pgfkeyssetvalue{#1/.@args}{#2\pgfeov}% |
| 686 |
\pgfkeyssetevalue{#1/.@body}{#3}% |
| 687 |
} |
| 688 |
|
| 689 |
% Like \pgfkeysdefargs, but `#2' is an integer denoting the expected |
| 690 |
% *number* of arguments. |
| 691 |
% |
| 692 |
% There is a subtle difference between the 'args' command, when it |
| 693 |
% comes to spaces: |
| 694 |
% a key defined with defargs{#1#2} must not have spaces between the |
| 695 |
% arguments when it is used. |
| 696 |
% |
| 697 |
% See this: |
| 698 |
% |
| 699 |
%-------------------------------------------------- |
| 700 |
% % defnargs: |
| 701 |
% \pgfkeysdefnargs{/a}{2}{1=`#1', 2=`#2'} |
| 702 |
% \pgfkeys{ |
| 703 |
% /a= |
| 704 |
% {1} |
| 705 |
% {2} |
| 706 |
% } |
| 707 |
% ->defnargs: 1=`1', 2=`2' |
| 708 |
% |
| 709 |
% defargs: |
| 710 |
% \pgfkeysdefargs{/b}{#1#2}{1=`#1', 2=`#2'} |
| 711 |
% \pgfkeys{ |
| 712 |
% /b= |
| 713 |
% {1} |
| 714 |
% {2} |
| 715 |
% } |
| 716 |
% ->defargs: 1=`1', 2=` 2' (note the space!) |
| 717 |
% |
| 718 |
% defargs: |
| 719 |
% \pgfkeysdefargs{/b}{#1#2}{1=`#1', 2=`#2'} |
| 720 |
% \pgfkeys{ |
| 721 |
% /b= |
| 722 |
% {1}% |
| 723 |
% {2} |
| 724 |
% } |
| 725 |
% ->defargs: 1=`1', 2=`2' |
| 726 |
% -------------------------------------------------- |
| 727 |
\long\def\pgfkeysdefnargs#1#2#3{\pgfkeysdefnargs@{#1}{#2}{#3}{\def}{\pgfkeyssetvalue}}% |
| 728 |
\long\def\pgfkeysedefnargs#1#2#3{\pgfkeysdefnargs@{#1}{#2}{#3}{\edef}{\pgfkeyssetevalue}}% |
| 729 |
\long\def\pgfkeysdefnargs@#1#2#3#4#5{% |
| 730 |
\ifcase#2\relax |
| 731 |
\pgfkeyssetvalue{#1/.@args}{}% |
| 732 |
\or |
| 733 |
\pgfkeyssetvalue{#1/.@args}{##1}% |
| 734 |
\or |
| 735 |
\pgfkeyssetvalue{#1/.@args}{##1##2}% |
| 736 |
\or |
| 737 |
\pgfkeyssetvalue{#1/.@args}{##1##2##3}% |
| 738 |
\or |
| 739 |
\pgfkeyssetvalue{#1/.@args}{##1##2##3##4}% |
| 740 |
\or |
| 741 |
\pgfkeyssetvalue{#1/.@args}{##1##2##3##4##5}% |
| 742 |
\or |
| 743 |
\pgfkeyssetvalue{#1/.@args}{##1##2##3##4##5##6}% |
| 744 |
\or |
| 745 |
\pgfkeyssetvalue{#1/.@args}{##1##2##3##4##5##6##7}% |
| 746 |
\or |
| 747 |
\pgfkeyssetvalue{#1/.@args}{##1##2##3##4##5##6##7##8}% |
| 748 |
\or |
| 749 |
\pgfkeyssetvalue{#1/.@args}{##1##2##3##4##5##6##7##8##9}% |
| 750 |
\else |
| 751 |
\pgfkeys@error{\string\pgfkeysdefnargs: expected <= 9 arguments, got #2}% |
| 752 |
\fi |
| 753 |
\pgfkeysgetvalue{#1/.@args}\pgfkeys@tempargs |
| 754 |
\def\pgfkeys@temp{\expandafter\long\expandafter#4\csname pgfk@#1/.@@body\endcsname}% |
| 755 |
\expandafter\pgfkeys@temp\pgfkeys@tempargs{#3}% |
| 756 |
% eliminate the \pgfeov at the end such that TeX gobbles spaces |
| 757 |
% by using |
| 758 |
% \pgfkeysdef{#1}{\pgfkeysvalueof{#1/.@@body}##1} |
| 759 |
% (with expansion of '#1'): |
| 760 |
\edef\pgfkeys@tempargs{\noexpand\pgfkeysvalueof{#1/.@@body}}% |
| 761 |
\def\pgfkeys@temp{\pgfkeysdef{#1}}% |
| 762 |
\ifnum#2=1\relax |
| 763 |
\expandafter\pgfkeys@temp\expandafter{\pgfkeys@tempargs{##1}}% |
| 764 |
\else |
| 765 |
\expandafter\pgfkeys@temp\expandafter{\pgfkeys@tempargs##1}% |
| 766 |
\fi |
| 767 |
#5{#1/.@body}{#3}% |
| 768 |
} |
| 769 |
|
| 770 |
% Defining a key command |
| 771 |
|
| 772 |
\pgfkeysdef{/handlers/.code}{\pgfkeysdef{\pgfkeyscurrentpath}{#1}} |
| 773 |
\pgfkeysdef{/handlers/.code 2 args}{\pgfkeysdefargs{\pgfkeyscurrentpath}{##1##2}{#1}} |
| 774 |
\pgfkeysdef{/handlers/.ecode}{\pgfkeysedef{\pgfkeyscurrentpath}{#1}} |
| 775 |
\pgfkeysdef{/handlers/.ecode 2 args}{\pgfkeysedefargs{\pgfkeyscurrentpath}{##1##2}{#1}} |
| 776 |
\pgfkeysdefnargs{/handlers/.code args}{2}{\pgfkeysdefargs{\pgfkeyscurrentpath}{#1}{#2}} |
| 777 |
\pgfkeysdefnargs{/handlers/.ecode args}{2}{\pgfkeysedefargs{\pgfkeyscurrentpath}{#1}{#2}} |
| 778 |
\pgfkeysdefnargs{/handlers/.code n args}{2}{\pgfkeysdefnargs{\pgfkeyscurrentpath}{#1}{#2}} |
| 779 |
\pgfkeysdefnargs{/handlers/.ecode n args}{2}{\pgfkeysedefnargs{\pgfkeyscurrentpath}{#1}{#2}} |
| 780 |
|
| 781 |
% Adding to a key command |
| 782 |
|
| 783 |
\pgfkeys{/handlers/.add code/.code 2 args=% |
| 784 |
% Find out, whether with args or not. |
| 785 |
\pgfkeysifdefined{\pgfkeyscurrentpath/.@args}% |
| 786 |
{% Yes, so add to body and reuse args |
| 787 |
\pgfkeysaddvalue{\pgfkeyscurrentpath/.@body}{#1}{#2}% |
| 788 |
% Redefine code |
| 789 |
{% |
| 790 |
\pgfkeysgetvalue{\pgfkeyscurrentpath/.@args}{\pgfkeys@tempargs}% |
| 791 |
\pgfkeysgetvalue{\pgfkeyscurrentpath/.@body}{\pgfkeys@tempbody}% |
| 792 |
\def\pgfkeys@marshal{\expandafter\long\expandafter\gdef\expandafter\pgfkeys@global@temp\pgfkeys@tempargs}% |
| 793 |
\expandafter\pgfkeys@marshal\expandafter{\pgfkeys@tempbody}% |
| 794 |
}% |
| 795 |
\pgfkeysifdefined{\pgfkeyscurrentpath/.@@body}{% |
| 796 |
% support for \pgfkeysndefargs: |
| 797 |
\pgfkeyslet{\pgfkeyscurrentpath/.@@body}{\pgfkeys@global@temp}% |
| 798 |
}{% |
| 799 |
% support for \pgfkeysdefargs: |
| 800 |
\pgfkeyslet{\pgfkeyscurrentpath/.@cmd}{\pgfkeys@global@temp}% |
| 801 |
}% |
| 802 |
}% |
| 803 |
{% |
| 804 |
% No, so single argument (simple \pgfkeysdef). Redefine accordingly. |
| 805 |
\edef\pgf@expanded@path{\pgfkeyscurrentpath}% |
| 806 |
{% |
| 807 |
\toks0{#1}% |
| 808 |
\pgfkeysifdefined{\pgf@expanded@path/.@cmd}% |
| 809 |
{\expandafter\expandafter\expandafter\pgfkeys@temptoks\expandafter\expandafter\expandafter{\csname pgfk@\pgf@expanded@path/.@body\endcsname}}% |
| 810 |
{\expandafter\pgfkeys@temptoks\expandafter{\expandafter\pgfkeyssetvalue\expandafter{\pgf@expanded@path}{##1}}}% |
| 811 |
\toks1{#2}% |
| 812 |
\xdef\pgfkeys@global@temp{\the\toks0 \the\pgfkeys@temptoks \the\toks1 }% |
| 813 |
}% |
| 814 |
\def\pgf@temp{\pgfkeyssetvalue{\pgf@expanded@path/.@body}}% |
| 815 |
\expandafter\pgf@temp\expandafter{\pgfkeys@global@temp}% |
| 816 |
\expandafter\long\expandafter\def\expandafter\pgfkeys@temp\expandafter##\expandafter1\expandafter\pgfeov\expandafter{\pgfkeys@global@temp}% |
| 817 |
\pgfkeyslet{\pgf@expanded@path/.@cmd}\pgfkeys@temp% |
| 818 |
}% |
| 819 |
} |
| 820 |
\pgfkeys{/handlers/.prefix code/.code=\pgfkeys{\pgfkeyscurrentpath/.add code={#1}{}}}% |
| 821 |
\pgfkeys{/handlers/.append code/.code=\pgfkeys{\pgfkeyscurrentpath/.add code={}{#1}}}% |
| 822 |
|
| 823 |
|
| 824 |
% Defining a style |
| 825 |
|
| 826 |
\pgfkeys{/handlers/.style/.code=\pgfkeys{\pgfkeyscurrentpath/.code=\pgfkeysalso{#1}}} |
| 827 |
\pgfkeys{/handlers/.estyle/.code=\pgfkeys{\pgfkeyscurrentpath/.ecode=\noexpand\pgfkeysalso{#1}}} |
| 828 |
\pgfkeys{/handlers/.style args/.code 2 args=\pgfkeys{\pgfkeyscurrentpath/.code args={#1}{\pgfkeysalso{#2}}}} |
| 829 |
\pgfkeys{/handlers/.estyle args/.code 2 args=\pgfkeys{\pgfkeyscurrentpath/.ecode args={#1}{\noexpand\pgfkeysalso{#2}}}} |
| 830 |
\pgfkeys{/handlers/.style 2 args/.code=\pgfkeys{\pgfkeyscurrentpath/.code 2 args=\pgfkeysalso{#1}}} |
| 831 |
\pgfkeys{/handlers/.style n args/.code 2 args=\pgfkeys{\pgfkeyscurrentpath/.code n args={#1}{\pgfkeysalso{#2}}}} |
| 832 |
|
| 833 |
% Adding to a style |
| 834 |
|
| 835 |
\pgfkeys{/handlers/.add style/.code 2 args=\pgfkeys{\pgfkeyscurrentpath/.add code={\pgfkeysalso{#1}}{\pgfkeysalso{#2}}}}% |
| 836 |
\pgfkeys{/handlers/.prefix style/.code=\pgfkeys{\pgfkeyscurrentpath/.add code={\pgfkeysalso{#1}}{}}}% |
| 837 |
\pgfkeys{/handlers/.append style/.code=\pgfkeys{\pgfkeyscurrentpath/.add code={}{\pgfkeysalso{#1}}}}% |
| 838 |
|
| 839 |
|
| 840 |
% Defining a value |
| 841 |
|
| 842 |
\pgfkeys{/handlers/.initial/.code=\pgfkeyssetvalue{\pgfkeyscurrentpath}{#1}} |
| 843 |
\pgfkeys{/handlers/.add/.code 2 args=\pgfkeysaddvalue{\pgfkeyscurrentpath}{#1}{#2}} |
| 844 |
\pgfkeys{/handlers/.prefix/.code=\pgfkeysaddvalue{\pgfkeyscurrentpath}{#1}{}} |
| 845 |
\pgfkeys{/handlers/.append/.code=\pgfkeysaddvalue{\pgfkeyscurrentpath}{}{#1}} |
| 846 |
\pgfkeys{/handlers/.get/.code=\pgfkeysgetvalue{\pgfkeyscurrentpath}{#1}} |
| 847 |
\pgfkeys{/handlers/.link/.code=\pgfkeyssetvalue{\pgfkeyscurrentpath}{\pgfkeysvalueof{#1}}} |
| 848 |
|
| 849 |
|
| 850 |
% Defining a default |
| 851 |
|
| 852 |
\pgfkeys{/handlers/.default/.code=\pgfkeyssetvalue{\pgfkeyscurrentpath/.@def}{#1}} |
| 853 |
\pgfkeys{/handlers/.value required/.code=\pgfkeyssetvalue{\pgfkeyscurrentpath/.@def}{\pgfkeysvaluerequired}} |
| 854 |
\pgfkeys{/handlers/.value forbidden/.code=\pgfkeys{\pgfkeyscurrentpath/.add code=% |
| 855 |
{% |
| 856 |
\ifx\pgfkeyscurrentvalue\pgfkeysnovalue@text% |
| 857 |
\else% |
| 858 |
\def\pgf@marshal{\pgfkeysvalueof{/errors/value forbidden/.@cmd}}% |
| 859 |
\expandafter\expandafter\expandafter\pgf@marshal\expandafter\expandafter\expandafter{\expandafter\pgfkeyscurrentkey\expandafter}\expandafter{\pgfkeyscurrentvalue}\pgfeov% |
| 860 |
\fi% |
| 861 |
}{}}} |
| 862 |
|
| 863 |
|
| 864 |
% High-level cmds |
| 865 |
|
| 866 |
\pgfkeys{/handlers/.store in/.code=\pgfkeysalso{\pgfkeyscurrentpath/.code=\def#1{##1}}} |
| 867 |
\pgfkeys{/handlers/.estore in/.code=\pgfkeysalso{\pgfkeyscurrentpath/.code=\edef#1{##1}}} |
| 868 |
|
| 869 |
\pgfkeys{/handlers/.is if/.code=\pgfkeysalso{% |
| 870 |
\pgfkeyscurrentpath/.code=\pgfkeys@handle@boolean{#1}{##1}, |
| 871 |
\pgfkeyscurrentpath/.default=true% |
| 872 |
}% |
| 873 |
} |
| 874 |
\def\pgfkeys@handle@boolean#1#2{% |
| 875 |
\pgfkeys@ifcsname{#1#2}{% |
| 876 |
\csname#1#2\endcsname% |
| 877 |
}{% |
| 878 |
\def\pgf@marshal{\pgfkeysvalueof{/errors/boolean expected/.@cmd}}% |
| 879 |
\expandafter\pgf@marshal\expandafter{\pgfkeyscurrentkey}{#2}\pgfeov% |
| 880 |
}% |
| 881 |
} |
| 882 |
|
| 883 |
\pgfkeys{/handlers/.is choice/.code=% |
| 884 |
\pgfkeys{% |
| 885 |
\pgfkeyscurrentpath/.cd,% |
| 886 |
.code=\def\pgfkeys@was@choice{##1}\expandafter\pgfkeysalso\expandafter{\pgfkeyscurrentkey/##1}, |
| 887 |
.unknown/.code={% |
| 888 |
\def\pgf@marshal{\pgfkeysvalueof{/errors/unknown choice value/.@cmd}}% |
| 889 |
{\expandafter\expandafter\expandafter\pgf@marshal\expandafter\expandafter\expandafter{\expandafter\the\expandafter\pgfkeys@pathtoks\expandafter}\expandafter{\pgfkeys@was@choice}\pgfeov}% |
| 890 |
}% |
| 891 |
}% |
| 892 |
} |
| 893 |
|
| 894 |
|
| 895 |
% Repeatedly setting a key |
| 896 |
|
| 897 |
\pgfkeys{/handlers/.list/.code=% |
| 898 |
{% |
| 899 |
\ifx\foreach\@undefined% |
| 900 |
\pgfkeys@error{You need to load the pgffor package to use the .list key syntax.}% |
| 901 |
\fi% |
| 902 |
% Use foreach to unfold the list |
| 903 |
\def\pgf@keys@temp{}% |
| 904 |
\foreach \pgf@keys@key in{#1}% |
| 905 |
{\expandafter\expandafter\expandafter\gdef% |
| 906 |
\expandafter\expandafter\expandafter\pgf@keys@temp% |
| 907 |
\expandafter\expandafter\expandafter{\expandafter\pgf@keys@temp\expandafter{\pgf@keys@key}}}% |
| 908 |
\edef\pgf@keys@list@path{\pgfkeyscurrentpath}% |
| 909 |
\expandafter\expandafter\expandafter\pgf@keys@do@list% |
| 910 |
\expandafter\expandafter\expandafter{\expandafter\pgf@keys@list@path\expandafter}\pgf@keys@temp\pgf@stop% |
| 911 |
}% |
| 912 |
} |
| 913 |
\def\pgf@keys@do@list#1{\pgf@keys@utilifnextchar\bgroup{\pgf@keys@do@list@item{#1}}\pgf@keys@gobble} |
| 914 |
\def\pgf@keys@do@list@item#1#2{\pgfkeysalso{#1={#2}}\pgf@keys@do@list{#1}} |
| 915 |
|
| 916 |
|
| 917 |
% Forwarding |
| 918 |
|
| 919 |
\pgfkeys{/handlers/.forward to/.code=% |
| 920 |
\pgfkeys{\pgfkeyscurrentpath/.add code={}{\pgfkeys{#1={##1}}}} |
| 921 |
} |
| 922 |
|
| 923 |
|
| 924 |
% Inspection handlers |
| 925 |
|
| 926 |
\pgfkeys{/handlers/.show value/.code=\pgfkeysgetvalue{\pgfkeyscurrentpath}{\pgfkeysshower}\show\pgfkeysshower} % inspect the value |
| 927 |
\pgfkeys{/handlers/.show code/.code=\pgfkeysgetvalue{\pgfkeyscurrentpath/.@cmd}{\pgfkeysshower}\show\pgfkeysshower} % inspect the body of the command |
| 928 |
|
| 929 |
|
| 930 |
% First char syntax handlers |
| 931 |
\pgfkeys{/handlers/first char syntax/.is if=pgfkeys@syntax@handlers} |
| 932 |
|
| 933 |
% Path handling |
| 934 |
|
| 935 |
% Prepares the .unknown handler used by '.search also'. |
| 936 |
% It will be stored into \pgfkeys@global@temp. |
| 937 |
\def\pgfkeys@searchalso@prepare@unknown@handler#1{% |
| 938 |
\global\def\pgfkeys@global@temp##1\pgfeov{}% |
| 939 |
\pgfkeys@searchalso@parse#1,\pgfkeys@mainstop |
| 940 |
{% |
| 941 |
\toks0=\expandafter{\pgfkeys@global@temp##1\pgfeov}% |
| 942 |
\toks1={% |
| 943 |
\pgfkeysgetvalue{/handlers/.unknown/.@cmd}{\pgfkeys@code}% |
| 944 |
\expandafter\pgfkeys@code\pgfkeys@searchalso@temp@value\pgfeov |
| 945 |
}% |
| 946 |
\xdef\pgfkeys@global@temp{% |
| 947 |
\noexpand\def\noexpand\pgfkeys@searchalso@temp@value{####1}% |
| 948 |
\noexpand\ifpgfkeysaddeddefaultpath |
| 949 |
\noexpand\expandafter\noexpand\pgfkeys@firstoftwo |
| 950 |
\noexpand\else |
| 951 |
\noexpand\expandafter\noexpand\pgfkeys@secondoftwo |
| 952 |
\noexpand\fi{% |
| 953 |
\noexpand\pgfkeyssuccessfalse |
| 954 |
\noexpand\let\noexpand\pgfkeys@searchalso@name=\noexpand\pgfkeyscurrentkeyRAW |
| 955 |
\the\toks0 % one or more /.try things; one for each path. The last element won't have a /.try |
| 956 |
%\noexpand\ifpgfkeyssuccess |
| 957 |
%\noexpand\else |
| 958 |
% \the\toks1 % invoke /handlers/.unknown handler |
| 959 |
%\noexpand\fi |
| 960 |
}{% |
| 961 |
\the\toks1 % invoke /handlers/.unknown handler |
| 962 |
}% |
| 963 |
}% |
| 964 |
\expandafter\gdef\expandafter\pgfkeys@global@temp\expandafter##\expandafter1\expandafter\pgfeov\expandafter{\pgfkeys@global@temp}% |
| 965 |
}% |
| 966 |
}% |
| 967 |
|
| 968 |
\def\pgfkeys@searchalso@parse{\futurelet\pgfkeys@possiblerelax\pgfkeys@searchalso@parse@main} |
| 969 |
\def\pgfkeys@searchalso@parse@main{% |
| 970 |
\ifx\pgfkeys@possiblerelax\pgfkeys@mainstop% |
| 971 |
\expandafter\pgfkeys@cleanup% |
| 972 |
\else% |
| 973 |
\expandafter\pgfkeys@searchalso@appendentry% |
| 974 |
\fi% |
| 975 |
} |
| 976 |
\def\pgfkeys@searchalso@appendentry#1,#2{% |
| 977 |
\def\pgfkeys@searchalso@nexttok{#2}% |
| 978 |
\pgfkeys@spdef\pgfkeys@temp{#1}% |
| 979 |
{% |
| 980 |
\toks0=\expandafter{\pgfkeys@global@temp##1\pgfeov}% |
| 981 |
\toks1=\expandafter{\pgfkeys@temp}% |
| 982 |
\xdef\pgfkeys@global@temp{% |
| 983 |
\the\toks0 % the space is important! |
| 984 |
\noexpand\ifpgfkeyssuccess\noexpand\else |
| 985 |
\noexpand\pgfqkeys{\the\toks1 }{\noexpand\pgfkeys@searchalso@name |
| 986 |
\ifx\pgfkeys@searchalso@nexttok\pgfkeys@mainstop\else/.try\fi /.expand once=\noexpand\pgfkeys@searchalso@temp@value}% |
| 987 |
\noexpand\fi}% |
| 988 |
\expandafter\gdef\expandafter\pgfkeys@global@temp\expandafter##\expandafter1\expandafter\pgfeov\expandafter{\pgfkeys@global@temp}% |
| 989 |
}% |
| 990 |
\pgfkeys@searchalso@parse#2% |
| 991 |
} |
| 992 |
\pgfkeys{% |
| 993 |
/handlers/.is family/.code=\pgfkeys{\pgfkeyscurrentpath/.ecode=\edef\noexpand\pgfkeysdefaultpath{\pgfkeyscurrentpath/}},% |
| 994 |
/handlers/.cd/.code=\edef\pgfkeysdefaultpath{\pgfkeyscurrentpath/},% |
| 995 |
/handlers/.search also/.code={% |
| 996 |
\pgfkeys@searchalso@prepare@unknown@handler{#1}% |
| 997 |
%\message{I prepared the '\pgfkeyscurrentpath/.unknown' handler \meaning\pgfkeys@global@temp\space for '#1'.}% |
| 998 |
\pgfkeyslet{\pgfkeyscurrentpath/.unknown/.@cmd}{\pgfkeys@global@temp}% |
| 999 |
} |
| 1000 |
}% |
| 1001 |
|
| 1002 |
|
| 1003 |
% Value expansion |
| 1004 |
|
| 1005 |
\pgfkeys{/handlers/.expand once/.code=\expandafter\pgfkeys@exp@call\expandafter{#1}} |
| 1006 |
\pgfkeys{/handlers/.expand twice/.code=\expandafter\expandafter\expandafter\pgfkeys@exp@call\expandafter\expandafter\expandafter{#1}} |
| 1007 |
\pgfkeys{/handlers/.expanded/.code=\edef\pgfkeys@temp{#1}\expandafter\pgfkeys@exp@call\expandafter{\pgfkeys@temp}} |
| 1008 |
|
| 1009 |
\long\def\pgfkeys@exp@call#1{\pgfkeysalso{\pgfkeyscurrentpath={#1}}} |
| 1010 |
|
| 1011 |
\def\pgfkeys@mathparse{% |
| 1012 |
\pgfkeys@ifcsname{pgfmathparse}{% |
| 1013 |
\pgfmathparse |
| 1014 |
}{% |
| 1015 |
\pgfkeys@error{You have to load `pgfmath' to use \string\pgfmathparse}% |
| 1016 |
\def\pgfmathresult |
| 1017 |
}% |
| 1018 |
} |
| 1019 |
\pgfkeys{/handlers/.evaluated/.code=\pgfkeys@mathparse{#1}\expandafter\pgfkeys@exp@call\expandafter{\pgfmathresult}} |
| 1020 |
|
| 1021 |
% Try to set a key and do nothing if not define |
| 1022 |
|
| 1023 |
\newif\ifpgfkeyssuccess |
| 1024 |
\pgfkeys{/handlers/.try/.code=\pgfkeys@try} |
| 1025 |
\pgfkeys{/handlers/.retry/.code=\ifpgfkeyssuccess\else\pgfkeys@try\fi} |
| 1026 |
\def\pgfkeys@try{% |
| 1027 |
\edef\pgfkeyscurrentkey{\pgfkeyscurrentpath}% make sure that \pgfkeys@code doesn't know about 'try'. Important for .is choice |
| 1028 |
\ifx\pgfkeyscurrentvalue\pgfkeysnovalue@text% Hmm... no value |
| 1029 |
\pgfkeysifdefined{\pgfkeyscurrentpath/.@def}% |
| 1030 |
{\pgfkeysgetvalue{\pgfkeyscurrentpath/.@def}{\pgfkeyscurrentvalue}} |
| 1031 |
{}% no default, so leave it |
| 1032 |
\fi% |
| 1033 |
\pgfkeysifdefined{\pgfkeyscurrentpath/.@cmd}% |
| 1034 |
{% |
| 1035 |
\pgfkeysgetvalue{\pgfkeyscurrentpath/.@cmd}{\pgfkeys@code}% |
| 1036 |
\expandafter\pgfkeys@code\pgfkeyscurrentvalue\pgfeov% |
| 1037 |
\pgfkeyssuccesstrue% |
| 1038 |
}% |
| 1039 |
{% |
| 1040 |
\pgfkeysifdefined{\pgfkeyscurrentpath}% |
| 1041 |
{% |
| 1042 |
\ifx\pgfkeyscurrentvalue\pgfkeysnovalue@text% |
| 1043 |
\pgfkeysvalueof{\pgfkeyscurrentpath}% |
| 1044 |
\else% |
| 1045 |
\pgfkeyslet{\pgfkeyscurrentpath}\pgfkeyscurrentvalue% |
| 1046 |
\fi% |
| 1047 |
\pgfkeyssuccesstrue% |
| 1048 |
}% |
| 1049 |
{% |
| 1050 |
\pgfkeys@split@path% |
| 1051 |
\pgfkeysifdefined{/handlers/\pgfkeyscurrentname/.@cmd}{% |
| 1052 |
% in the standard configuration, this check here is redundant |
| 1053 |
% because pgfkeys@ifexecutehandler === true. |
| 1054 |
% It is only interesting for 'handle only existing'. |
| 1055 |
\pgfkeys@ifexecutehandler{% |
| 1056 |
\pgfkeysgetvalue{/handlers/\pgfkeyscurrentname/.@cmd}{\pgfkeys@code}% |
| 1057 |
\expandafter\pgfkeys@code\pgfkeyscurrentvalue\pgfeov |
| 1058 |
\pgfkeyssuccesstrue% |
| 1059 |
}{% |
| 1060 |
\pgfkeyssuccessfalse |
| 1061 |
}% |
| 1062 |
}{% |
| 1063 |
\pgfkeyssuccessfalse |
| 1064 |
}% |
| 1065 |
}% |
| 1066 |
}% |
| 1067 |
} |
| 1068 |
|
| 1069 |
% Utilities |
| 1070 |
|
| 1071 |
\pgfkeys{/utils/exec/.code={#1}} % simply execute the given code directly. |
| 1072 |
|
| 1073 |
|
| 1074 |
% Errors |
| 1075 |
|
| 1076 |
\pgfkeys{ |
| 1077 |
/errors/boolean expected/.code 2 args=% |
| 1078 |
{% |
| 1079 |
\toks1={#1}% |
| 1080 |
\toks2={#2}% |
| 1081 |
\pgfkeys@error{% |
| 1082 |
Boolean parameter of key '\the\toks1' must be 'true' or 'false', not |
| 1083 |
'\the\toks2'. I am going to ignore it% |
| 1084 |
}% |
| 1085 |
}, |
| 1086 |
/errors/value required/.code 2 args=% |
| 1087 |
{% |
| 1088 |
\toks1={#1}% |
| 1089 |
\pgfkeys@error{% |
| 1090 |
The key '\the\toks1' requires a value. I am going to ignore this |
| 1091 |
key% |
| 1092 |
}% |
| 1093 |
}, |
| 1094 |
/errors/value forbidden/.code 2 args=% |
| 1095 |
{% |
| 1096 |
\toks1={#1}% |
| 1097 |
\toks2={#2}% |
| 1098 |
\pgfkeys@error{% |
| 1099 |
You may not specify a value for the key '\the\toks1'. I am going to ignore |
| 1100 |
the value '\the\toks2' that you provided% |
| 1101 |
}% |
| 1102 |
}, |
| 1103 |
/errors/unknown choice value/.code 2 args=% |
| 1104 |
{% |
| 1105 |
\toks1={#1}% |
| 1106 |
\toks2={#2}% |
| 1107 |
\pgfkeys@error{% |
| 1108 |
Choice '\the\toks2' unknown in choice key '\the\toks1'. I am |
| 1109 |
going to ignore this key% |
| 1110 |
}% |
| 1111 |
}, |
| 1112 |
/errors/unknown key/.code 2 args=% |
| 1113 |
{% |
| 1114 |
\toks1={#1}% |
| 1115 |
\toks2={#2}% |
| 1116 |
\def\pgf@temp{#2}% |
| 1117 |
\pgfkeys@error{% |
| 1118 |
I do not know the key '\the\toks1'\ifx\pgf@temp\pgfkeysnovalue@text\space\else, to which you passed |
| 1119 |
'\the\toks2', \fi and I am going to ignore it. Perhaps you |
| 1120 |
misspelled it% |
| 1121 |
}% |
| 1122 |
} |
| 1123 |
} |
| 1124 |
|
| 1125 |
\pgfkeys{/handlers/.unknown/.code=% |
| 1126 |
{% |
| 1127 |
\def\pgf@marshal{\pgfkeysvalueof{/errors/unknown key/.@cmd}}% |
| 1128 |
{\expandafter\expandafter\expandafter\pgf@marshal\expandafter\expandafter\expandafter{\expandafter\pgfkeyscurrentkey\expandafter}\expandafter{\pgfkeyscurrentvalue}\pgfeov}% |
| 1129 |
}% |
| 1130 |
} |
| 1131 |
|
| 1132 |
\pgfkeys{ |
| 1133 |
/handler config/.is choice, |
| 1134 |
/handler config/all/.code={% |
| 1135 |
\let\pgfkeys@case@three=\pgfkeys@case@three@handleall |
| 1136 |
\let\pgfkeys@ifexecutehandler=\pgfkeys@ifexecutehandler@handleall |
| 1137 |
}, |
| 1138 |
/handler config/only existing/.code={% |
| 1139 |
\let\pgfkeys@case@three=\pgfkeys@case@three@handle@restricted |
| 1140 |
\let\pgfkeys@ifexecutehandler=\pgfkeys@ifexecutehandler@handleonlyexisting |
| 1141 |
}, |
| 1142 |
/handler config/full or existing/.code={% |
| 1143 |
\let\pgfkeys@case@three=\pgfkeys@case@three@handle@restricted |
| 1144 |
\let\pgfkeys@ifexecutehandler=\pgfkeys@ifexecutehandler@handlefullorexisting |
| 1145 |
}, |
| 1146 |
/handler config/only existing/add exception/.code={\pgfkeysaddhandleonlyexistingexception{#1}}, |
| 1147 |
}% |
| 1148 |
\pgfkeysaddhandleonlyexistingexception{.cd}% |
| 1149 |
\pgfkeysaddhandleonlyexistingexception{.try}% |
| 1150 |
\pgfkeysaddhandleonlyexistingexception{.retry}% |
| 1151 |
\pgfkeysaddhandleonlyexistingexception{.lastretry}% |
| 1152 |
\pgfkeysaddhandleonlyexistingexception{.unknown}% |
| 1153 |
\pgfkeysaddhandleonlyexistingexception{.expand once}% |
| 1154 |
\pgfkeysaddhandleonlyexistingexception{.expand twice}% |
| 1155 |
\pgfkeysaddhandleonlyexistingexception{.expanded}% |
| 1156 |
|
| 1157 |
|
| 1158 |
% Utilities for self-containment |
| 1159 |
\def\pgf@keys@gobble#1{} |
| 1160 |
\long\def\pgf@keys@utilifnextchar#1#2#3{% |
| 1161 |
\let\pgf@keys@utilreserved@d=#1% |
| 1162 |
\def\pgf@keys@utilreserved@a{#2}% |
| 1163 |
\def\pgf@keys@utilreserved@b{#3}% |
| 1164 |
\futurelet\pgf@keys@utillet@token\pgf@keys@utilifnch} |
| 1165 |
\def\pgf@keys@utilifnch{% |
| 1166 |
\ifx\pgf@keys@utillet@token\pgf@keys@utilsptoken |
| 1167 |
\let\pgf@keys@utilreserved@c\pgf@keys@utilxifnch |
| 1168 |
\else |
| 1169 |
\ifx\pgf@keys@utillet@token\pgf@keys@utilreserved@d |
| 1170 |
\let\pgf@keys@utilreserved@c\pgf@keys@utilreserved@a |
| 1171 |
\else |
| 1172 |
\let\pgf@keys@utilreserved@c\pgf@keys@utilreserved@b |
| 1173 |
\fi |
| 1174 |
\fi |
| 1175 |
\pgf@keys@utilreserved@c} |
| 1176 |
{% |
| 1177 |
\def\:{\global\let\pgf@keys@utilsptoken= } \: |
| 1178 |
\def\:{\pgf@keys@utilxifnch} \expandafter\gdef\: {\futurelet\pgf@keys@utillet@token\pgf@keys@utilifnch} |
| 1179 |
} |
| 1180 |
|
| 1181 |
\chardef\pgfkeys@inputcheck0 |
| 1182 |
\def\pgfkeys@IfFileExists#1{% |
| 1183 |
\openin\pgfkeys@inputcheck=#1 |
| 1184 |
\ifeof\pgfkeys@inputcheck |
| 1185 |
\expandafter\closein\expandafter\pgfkeys@inputcheck |
| 1186 |
\expandafter\pgfkeys@secondoftwo |
| 1187 |
\else |
| 1188 |
\expandafter\closein\expandafter\pgfkeys@inputcheck |
| 1189 |
\expandafter\pgfkeys@firstoftwo |
| 1190 |
\fi |
| 1191 |
} |
| 1192 |
|
| 1193 |
% Library system for pgfkeys |
| 1194 |
\def\usepgfkeyslibrary{\pgf@keys@utilifnextchar[{\pgfkeys@@uselibrary}{\pgfkeys@uselibrary}} |
| 1195 |
\def\pgfkeys@@uselibrary[#1]{\pgfkeys@uselibrary{#1}} |
| 1196 |
\def\pgfkeys@uselibrary#1{\pgfkeys@uselibrary@parse#1,\pgfkeys@mainstop} |
| 1197 |
\def\pgfkeys@uselibrary@parse{% |
| 1198 |
\pgf@keys@utilifnextchar\pgfkeys@mainstop{\pgfkeys@cleanup}{\pgfkeys@uselibrary@normal}% |
| 1199 |
}% |
| 1200 |
\def\pgfkeys@uselibrary@normal#1,{% |
| 1201 |
\pgfkeys@uselibrary@load{#1}% |
| 1202 |
\pgfkeys@uselibrary@parse |
| 1203 |
} |
| 1204 |
\def\pgfkeys@uselibrary@load#1{% |
| 1205 |
\expandafter\pgfkeys@spdef\expandafter\pgf@temp\expandafter{#1}% |
| 1206 |
\ifx\pgf@temp\pgfkeys@empty\expandafter\pgfkeys@firstoftwo\else\expandafter\pgfkeys@secondoftwo\fi{}{% |
| 1207 |
\pgfkeys@ifcsname{pgfkeys@library@\pgf@temp @loaded}{}{% |
| 1208 |
\expandafter\let\csname pgfkeys@library@\pgf@temp @loaded\endcsname=\pgfkeys@empty |
| 1209 |
\expandafter\edef\csname pgfkeys@library@#1@atcode\endcsname{\the\catcode`\@}% |
| 1210 |
\expandafter\edef\csname pgfkeys@library@#1@barcode\endcsname{\the\catcode`\|}% |
| 1211 |
\expandafter\edef\csname pgfkeys@library@#1@dollarcode\endcsname{\the\catcode`\$}% |
| 1212 |
\catcode`\@=11 |
| 1213 |
\catcode`\|=12 |
| 1214 |
\catcode`\$=3 |
| 1215 |
\pgfkeys@IfFileExists{pgfkeyslibrary\[email protected]}{% |
| 1216 |
\input pgfkeyslibrary\[email protected] |
| 1217 |
}{% |
| 1218 |
\pgfkeys@error{I did not find the pgfkeys library '\pgf@temp'. I looked for the |
| 1219 |
file named pgfkeyslibrary\[email protected], but could not find it in the |
| 1220 |
current texmf trees.}% |
| 1221 |
}% |
| 1222 |
\catcode`\@=\csname pgfkeys@library@#1@atcode\endcsname |
| 1223 |
\catcode`\|=\csname pgfkeys@library@#1@barcode\endcsname |
| 1224 |
\catcode`\$=\csname pgfkeys@library@#1@dollarcode\endcsname |
| 1225 |
}% |
| 1226 |
}% |
| 1227 |
} |
| 1228 |
|
| 1229 |
\let\pgfkeys@library@filtered@loaded\pgfkeys@empty |
| 1230 |
\input pgfkeyslibraryfiltered.code.tex |
| 1231 |
|
| 1232 |
\endinput |