1LaTeXML::Core::KeyVal(3U)ser Contributed Perl DocumentatiLoanTeXML::Core::KeyVal(3)
2
3
4
6 "LaTeXML::Core::KeyVal" - Key-Value Definitions in LaTeXML
7
9 Provides an interface to define and access KeyVal definition. Used in
10 conjunction with "LaTeXML::Core::KeyVals" to fully implement KeyVal
11 pairs. It extends LaTeXML::Common::Object.
12
13 Exposed Methods
14 "DefKeyVal(keyset, key, type, default, %options); "
15 Defines a new KeyVal Parameter in the given keyset, key and with
16 optional prefix option{prefix}. For descriptions of further
17 parameters, see LaTeXML::Core::KeyVal::define.
18
19 "HasKeyVal(prefix, keyset, key); "
20 Checks if the given KeyVal pair exists.
21
22 "DisableKeyVal(prefix, keyset, key); "
23 Disables the given KeyVal so that it can not be used.
24
25 Constructors
26 "<LaTeXML::Core::KeyVal-"new(preset, keyset, key); >>
27 Creates a new KeyVal object. This serves as a simple reference to
28 the given KeyVal object, regardless of its existence or not.
29
30 KeyVal Key Definition
31 "$keyval->define($type, $default, %options);"
32 (Re-)defines this Key of kind 'kind'. Defines a keyword key used
33 in keyval arguments for the set keyset and, and if the option code
34 is given, defines appropriate macros when used with the keyval
35 package (or extensions thereof).
36
37 If type is given, it defines the type of value that must be
38 supplied, such as 'Dimension'. If default is given, that value
39 will be used when key is used without an equals and explicit value
40 in a keyvals argument.
41
42 A scope option can be given, which can be used to defined the key-
43 value pair globally instead of in the current scope.
44
45 Several more options can be given. These implement the behaviour of
46 the xkeyval package.
47
48 The prefix parameter can be used to configure a custom prefix for
49 the macros to be defined. The kind parameter can be used to
50 configure special types of xkeyval pairs.
51
52 The 'ordinary' kind behaves like a normal keyval parameter.
53
54 The 'command' kind defines a command key, that when run stores the
55 value of the key in a special macro, which can be further specefied
56 by the macroprefix option.
57
58 The 'choice' kind defines a choice key, which takes additional
59 options choices (to specify which choices are valid values),
60 mismatch (to be run if an invalid choice is made) and bin (see
61 xkeyval documentation for details).
62
63 The 'boolean' kind defines a special choice key that takes possible
64 values true and false, and defines a new Conditional according to
65 the assumed value. The name of this conditional can be specified
66 with the macroprefix option.
67
68 The kind parameter only takes effect when code is given, otherwise
69 only meta-data is stored.
70
71 "$keyval->defineOrdinary($code);"
72 Helper function to define $STATE neccesary for an ordinary key.
73
74 "$keyval->defineCommand($code, $macroprefix);"
75 Helper function to define $STATE neccesary for a command key.
76
77 "$keyval->defineChoice($code, $mismatch, $choices, $normalize, $bin);"
78 Helper function to define $STATE neccesary for an choice key.
79
80 "$keyval->defineBoolean($code, $mismatch, $macroprefix);"
81 Helper function to define $STATE neccesary for a boolean key.
82
84 Tom Wiesing <tom.wiesing@gmail.com>
85
87 Public domain software, produced as part of work done by the United
88 States Government & not subject to copyright in the US.
89
90
91
92perl v5.34.0 2022-01-19 LaTeXML::Core::KeyVal(3)