summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/skeyval/skeyval-view-pokayoke1.tex
blob: c29448d04b5aa9acf862588ec772e4703f90e95e (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
\documentclass{skeyval-testclass}
\usepackage[xcolor-options=dvipsnames]{skeyval-view}

\makeatletter

\setupviewkeys{length of default=30}

\skvdefinekeys[KV]{fam1}[vhp@]{%
  .ord/keya/default-a,
  .cmd/keyb,
  .zcmd/key c/\def\cmdc##1{##1}/
    \edef\y{\detokenize\expandafter{\vhp@keyc}}\def\x##1{#1*key c*##1},
  .choice/keyd/center/
    {center.do=\def\x##1{#1*##1},left.do={\def\ans{#1}},right},
  .bool/show shadow/true,
  .zbool/show center/true/\edef\cmd{\ifvhp@showcenter Yes\else No\fi},
  .ord/keye,
  .cmd/keyf,
}
%\show\y
%\skvshowcs{KV@fam1@show center}
%\show\cmd

% Define some keys:
\directkeys*{
  .prefix=KV,
  .family=fam2,
  .holder prefix=hp@,
  .initialize keys after define,
  .define keys={%
    .ord/keya,
    .ord/galaxy/Messier 51a/\def\constellation{Canes Venatici},
    .choice/planet/Earth/{Earth.do=\def\x##1{#1*##1},Mars,Jupiter},
    .bool/space travel/true,
    .cmd/astronaut/Yuri Gagarin/
      \edef\x{\ifx\hp@astronaut\@empty Neil Armstrong\else\hp@astronaut\fi},
    .ord/space observatory/Hubble Space Telescope/
      \def\father{Lyman Spitzer~(1914--1997)},
  },
}

\makeatother

\begin{document}

\title{The \texttt{\textcolor{blue}{skeyval-view}} Package\\[.25ex]
  Version 1.1\\[1ex]
  \textsf{Test document}}
\author{Ahmed Musa}
\maketitle

\skvviewkeys{%
  .show={
    family=fam1,
    color=blue
  },
  .show={
    families={fam1,fam2},
    only those with default=true,
    write to file=\jobname.skvv,
    show labels=true,
    show wlabels=true,
  },
  .show={
    family=fam1,
    only those with default=[none],
    show labels=true,
    color=cyan,
  },
  .show={
    families={fam1,fam2},
    only those without default=true,
    color=purple,
  },
  .show={
    family=fam2,
    columns={prefix,family,key type,default},
    color=teal
  },
  .show={
    only those in family=fam2,
    columns={family,type,default}
  },
  .show={
    only those in families={fam1,fam2},
    columns={prefix,family,type,default},
    color=magenta
  }
}

\newpage
Find more information about the \textcolor{red}{\texttt{show shadow}} option on page~\pageref{KV/fam1/show shadow}.

\end{document}

% End of file skeyval-view-pokayoke1.tex