LaTeXM...:KeyVal(3pm)
πΈ NAME πΈ
Okay so this is the LaTeXM...:KeyVal(3pm) page, bestie, and the module is "LaTeXML::Core::KeyVal" β Key-Value Definitions in LaTeXML. Periodt. π
β¨ DESCRIPTION β¨
It provides an interface to define and access KeyVal definition. Used in conjunction with "LaTeXML::Core::KeyVals" to fully implement KeyVal pairs. It extends LaTeXML::Common::Object. Slay. π¦
π Exposed Methods
DefKeyVal(keyset, key, type, default, %options);β Defines a new KeyVal Parameter in the givenkeyset,key, and with the optional prefixoption{prefix}. For descriptions of further parameters, seeLaTeXML::Core::KeyVal::define. β¨HasKeyVal(prefix, keyset, key);β Checks if the given KeyVal pair exists. πDisableKeyVal(prefix, keyset, key);β Disables the given KeyVal so that it can not be used. π«
π Constructors
Hereβs the constructor signature, no cap:
"<LaTeXML::Core::KeyVal-"new(preset, keyset, key); >>
Creates a new KeyVal object. This serves as a simple reference to the given KeyVal object, regardless of its existence or not. Itβs giving βjust a pointer, bestieβ energy. π«Ά
π¦ KeyVal Key Definition
$keyval->define($type, $default, %options);
(Re-)defines this Key of kind 'kind'. Defines a keyword key used in keyval arguments for the set keyset and, and if the option code is given, defines appropriate macros when used with the keyval package (or extensions thereof). π
If type is given, it defines the type of value that must be supplied, such as 'Dimension'. If default is given, that value will be used when key is used without an equals and explicit value in a keyvals argument. π
A scope option can be given, which can be used to define the key-value pair globally instead of in the current scope. π
Several more options can be given. These implement the behaviour of the xkeyval package. π₯
The prefix parameter can be used to configure a custom prefix for the macros to be defined. The kind parameter can be used to configure special types of xkeyval pairs. β¨
- The
ordinarykind behaves like a normal keyval parameter. π - The
commandkind defines a command key, that when run stores the value of the key in a special macro, which can be further specified by themacroprefixoption. π» - The
choicekind defines a choice key, which takes additional optionschoices(to specify which choices are valid values),mismatch(to be run if an invalid choice is made) andbin(seexkeyvaldocumentation for details). π - The
booleankind defines a special choice key that takes possible valuestrueandfalse, and defines a new Conditional according to the assumed value. The name of this conditional can be specified with themacroprefixoption. π
β οΈ Thekindparameter only takes effect whencodeis given, otherwise only meta-data is stored. iykyk π
Helper functions, because we love a support squad:
$keyval->defineOrdinary($code);β Helper function to define$STATEnecessary for an ordinary key. π§$keyval->defineCommand($code, $macroprefix);β Helper function to define$STATEnecessary for a command key. π$keyval->defineChoice($code, $mismatch, $choices, $normalize, $bin);β Helper function to define$STATEnecessary for an choice key. πΈ$keyval->defineBoolean($code, $mismatch, $macroprefix);β Helper function to define$STATEnecessary for a boolean key. β
π AUTHOR
Tom Wiesing <tom.wiesing@gmail.com> β iconic. π
π COPYRIGHT
Public domain software, produced as part of work done by the United States Government & not subject to copyright in the US.
xoxo, this User Contributed Perl Documentation page comes from perl v5.40.1, dated 2025-11-16 π
π«Ά
π¦ where this page comes from
- ubuntu resolute: latexml 0.8.8-4 Β· PD
- ubuntu stonking: latexml 0.8.8-4 Β· PD
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms