summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/pstricks/pst-key.tex
blob: 8c1204bc1728588f7feff3654e942624fd54729a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
%% $Id: pst-key.tex 446 2017-04-19 11:40:55Z herbert $
%%
%% This is file `pst-key.tex',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% keyval.dtx  (with options: `package,plain,pstricks')
%% 
%% This file is based on keyval.dtx from the LaTeX tools distribution.
%% It may be distributed and used with the conditions applying to the
%% PSTricks distribution. See the comments in pstricks.tex for details.
%% 
%% File: keyval.dtx Copyright (C) 1993 1994 1995 1997 1998 David Carlisle
\def\next[#1]{\catcode`\@=11
       \expandafter\let\csname ver@keyval.sty\endcsname\empty
       \wlog{keyval: #1}}\next
                 [1998/07/23 v1.11 key=value parser (DPC)]
\def\setkeys{%
  \@ifnextchar[%
    \KV@list
    {\let\KV@undefined\KV@error
     \KV@setkeys}}
\def\KV@psset{psset}
\def\KV@setkeys#1#2{%
  \def\@tempa{#1}%
  \edef\KV@prefix{%
  \ifx\@tempa\KV@psset\else
                  KV@%
  \fi
                  #1@}%
  \KV@do#2,\relax,}
\def\psset#1{%
  \def\KV@prefix{psset@}%
  \KV@do#1,\relax,}
\def\use@par{\expandafter\psset\expandafter{\pst@par}%
             \let\pst@par\@empty}
\def\KV@list[#1]{%
  \def\KV@undefined{\KV@add#1}%
   \ifx#1\@undefined
    \let#1\@empty
   \fi
  \KV@setkeys}
\def\KV@do#1,{%
 \ifx\relax#1\empty\else
  \KV@split#1==\relax
  \expandafter\KV@do\fi}
\def\KV@split#1=#2=#3\relax{%
  \KV@@sp@def\@tempa{#1}%
  \ifx\@tempa\@empty\else
    \expandafter\let\expandafter\@tempc
      \csname\KV@prefix\@tempa\endcsname
    \ifx\@tempc\relax
      \KV@undefined{#2}{#3}%
    \else
      \ifx\@empty#3\@empty
        \KV@default
      \else
        \KV@@sp@def\@tempb{#2}%
        \expandafter\@tempc\expandafter{\@tempb}\relax
      \fi
    \fi
  \fi}
\def\KV@default{%
  \expandafter\let\expandafter\@tempb
    \csname\KV@prefix\@tempa @default\endcsname
  \ifx\@tempb\relax
    \KV@err{No value specified for \@tempa}%
  \else
    \@tempb\relax
  \fi}
\def\KV@add#1#2#3{%
  \toks2\expandafter{#1}%
  \KV@@sp@def\@tempb{#2}%
  \toks4\expandafter{\@tempb}%
  \edef#1{\the\toks2
          \ifx#1\@empty\else,\fi
          \@tempa
          \ifx\KV@add#3\KV@add\else={\the\toks4}\fi}}
\def\KV@err#1{\errmessage{keyval: #1}}
\def\KV@error#1#2{\KV@err{\@tempa\space undefined}}
\def\@tempa#1{%
\def\KV@@sp@def##1##2{\KV@@sp@b##2\@nil\@nil#1\@nil\relax##1}}
\@tempa{ }
\def\KV@@sp@b#1#2 \@nil{\KV@@sp@c#1#2}
\def\KV@@sp@c#1\@nil#2\relax#3{\def#3{#1}}
\def\define@key#1#2{%
  \def\KV@prefix{#1}%
  \edef\KV@prefix{%
    \ifx\KV@prefix\KV@psset\else
        KV@%
     \fi
        #1@#2}%
  \@ifnextchar[\KV@def{\@namedef\KV@prefix####1}}
\def\KV@def[#1]{%
  \@namedef{\KV@prefix @default\expandafter}\expandafter
    {\csname \KV@prefix\endcsname{#1}}%
  \@namedef\KV@prefix##1}
\endinput
%%
%% End of file `pst-key.tex'.