.\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" ======================================================================== .\" .IX Title "LaTeXML::Core::KeyVal 3pm" .TH LaTeXML::Core::KeyVal 3pm "2018-08-13" "perl v5.26.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" "LaTeXML::Core::KeyVal" \- Key\-Value Defintions in LaTeXML .SH "DESCRIPTION" .IX Header "DESCRIPTION" Provides an interface to define and access KeyVal definition. Used in conjunction with \f(CW\*(C`LaTeXML::Core::KeyVals\*(C'\fR to fully implement KeyVal pairs. It extends LaTeXML::Common::Object. .SS "Exposed Methods" .IX Subsection "Exposed Methods" .ie n .IP """DefKeyVal(\fIkeyset\fP, \fIkey\fP, \fItype\fP, \fIdefault\fP, \fI%options\fP); """ 4 .el .IP "\f(CWDefKeyVal(\f(CIkeyset\f(CW, \f(CIkey\f(CW, \f(CItype\f(CW, \f(CIdefault\f(CW, \f(CI%options\f(CW); \fR" 4 .IX Item "DefKeyVal(keyset, key, type, default, %options); " Defines a new KeyVal Parameter in the given \fIkeyset\fR, \fIkey\fR and with optional prefix \fIoption{prefix}\fR. For descriptions of further parameters, see \fILaTeXML::Core::KeyVal::define\fR. .ie n .IP """HasKeyVal(\fIprefix\fP, \fIkeyset\fP, \fIkey\fP); """ 4 .el .IP "\f(CWHasKeyVal(\f(CIprefix\f(CW, \f(CIkeyset\f(CW, \f(CIkey\f(CW); \fR" 4 .IX Item "HasKeyVal(prefix, keyset, key); " Checks if the given KeyVal pair exists. .ie n .IP """DisableKeyVal(\fIprefix\fP, \fIkeyset\fP, \fIkey\fP); """ 4 .el .IP "\f(CWDisableKeyVal(\f(CIprefix\f(CW, \f(CIkeyset\f(CW, \f(CIkey\f(CW); \fR" 4 .IX Item "DisableKeyVal(prefix, keyset, key); " Disables the given KeyVal so that it can not be used. .SS "Constructors" .IX Subsection "Constructors" .ie n .IP """>" 4 .el .IP "\f(CW>" 4 .IX Item ">" Creates a new \fIKeyVal\fR object. This serves as a simple reference to the given KeyVal object, regardless of its existence or not. .SS "KeyVal Accessors" .IX Subsection "KeyVal Accessors" .ie n .IP """$prefix = $keyval\->getPrefix;""" 4 .el .IP "\f(CW$prefix = $keyval\->getPrefix;\fR" 4 .IX Item "$prefix = $keyval->getPrefix;" Gets the prefix of this KeyVal object. .ie n .IP """$keyset = $keyval\->getKeySet;""" 4 .el .IP "\f(CW$keyset = $keyval\->getKeySet;\fR" 4 .IX Item "$keyset = $keyval->getKeySet;" Gets the keyset of this KeyVal object. .ie n .IP """$key = $keyval\->getKey;""" 4 .el .IP "\f(CW$key = $keyval\->getKey;\fR" 4 .IX Item "$key = $keyval->getKey;" Gets the key of this KeyVal object. .ie n .IP """$prefix = $keyval\->getFullPrefix;""" 4 .el .IP "\f(CW$prefix = $keyval\->getFullPrefix;\fR" 4 .IX Item "$prefix = $keyval->getFullPrefix;" Gets the full prefix of this keyval object, to be used when composing macros. .ie n .IP """$prefix = $keyval\->getHeader;""" 4 .el .IP "\f(CW$prefix = $keyval\->getHeader;\fR" 4 .IX Item "$prefix = $keyval->getHeader;" Gets the header of this keyval object, to be used when composing macros. .SS "Keyval Property Getters" .IX Subsection "Keyval Property Getters" .ie n .IP """$value = $keyval\->getProp($prop);""" 4 .el .IP "\f(CW$value = $keyval\->getProp($prop);\fR" 4 .IX Item "$value = $keyval->getProp($prop);" Gets the value of a given property of this KeyVal. Intended for internal use only. .ie n .IP """$value = $keyval\->setProp($prop, $value, $scope);""" 4 .el .IP "\f(CW$value = $keyval\->setProp($prop, $value, $scope);\fR" 4 .IX Item "$value = $keyval->setProp($prop, $value, $scope);" Sets the value of the given property with the given value and scope. Intended for internal use only. .ie n .IP """$type = $keyval\->getType();""" 4 .el .IP "\f(CW$type = $keyval\->getType();\fR" 4 .IX Item "$type = $keyval->getType();" Gets the type of this KeyVal object, as found in \f(CW$STATE\fR. .ie n .IP """$keyval\->setType($type);""" 4 .el .IP "\f(CW$keyval\->setType($type);\fR" 4 .IX Item "$keyval->setType($type);" Sets the type of this KeyVal object, as found in \f(CW$STATE\fR. .ie n .IP """$default = $keyval\->getDefault();""" 4 .el .IP "\f(CW$default = $keyval\->getDefault();\fR" 4 .IX Item "$default = $keyval->getDefault();" Gets the default of this KeyVal object, as found in \f(CW$STATE\fR. .ie n .IP """$keyval\->setDefault($default, $setMacros);""" 4 .el .IP "\f(CW$keyval\->setDefault($default, $setMacros);\fR" 4 .IX Item "$keyval->setDefault($default, $setMacros);" Sets the default of this KeyVal object, and optionally sets the macros as well. .SS "KeyVal Key Definition" .IX Subsection "KeyVal Key Definition" .ie n .IP """$defined = $keyval\->isDefined($checkMacros);""" 4 .el .IP "\f(CW$defined = $keyval\->isDefined($checkMacros);\fR" 4 .IX Item "$defined = $keyval->isDefined($checkMacros);" Checks if this KeyVal item is actually defined. If checkMacros is set to true, also check if macros are defined. .ie n .IP """$keyval\->define($type, $default, %options);""" 4 .el .IP "\f(CW$keyval\->define($type, $default, %options);\fR" 4 .IX Item "$keyval->define($type, $default, %options);" (Re\-)defines this Key of kind 'kind'. Defines a keyword \fIkey\fR used in keyval arguments for the set \fIkeyset\fR and, and if the option \fIcode\fR is given, defines appropriate macros when used with the \fIkeyval\fR package (or extensions thereof). .Sp If \fItype\fR is given, it defines the type of value that must be supplied, such as \f(CW\*(AqDimension\*(Aq\fR. If \fIdefault\fR is given, that value will be used when \fIkey\fR is used without an equals and explicit value in a keyvals argument. .Sp A \fIscope\fR option can be given, which can be used to defined the key-value pair globally instead of in the current scope. .Sp Several more \fIoption\fRs can be given. These implement the behaviour of the xkeyval package. .Sp The \fIprefix\fR parameter can be used to configure a custom prefix for the macros to be defined. The \fIkind\fR parameter can be used to configure special types of xkeyval pairs. .Sp The 'ordinary' kind behaves like a normal keyval parameter. .Sp The 'command' kind defines a command key, that when run stores the value of the key in a special macro, which can be further specefied by the \fImacroprefix\fR option. .Sp The 'choice' kind defines a choice key, which takes additional options \&\fIchoices\fR (to specify which choices are valid values), \fImismatch\fR (to be run if an invalid choice is made) and \fIbin\fR (see xkeyval documentation for details). .Sp The 'boolean' kind defines a special choice key that takes possible values true and false, and defines a new Conditional according to the assumed value. The name of this conditional can be specified with the \fImacroprefix\fR option. .Sp The kind parameter only takes effect when \fIcode\fR is given, otherwise only meta-data is stored. .ie n .IP """$keyval\->defineOrdinary($code);""" 4 .el .IP "\f(CW$keyval\->defineOrdinary($code);\fR" 4 .IX Item "$keyval->defineOrdinary($code);" Helper function to define \f(CW$STATE\fR neccesary for an ordinary key. .ie n .IP """$keyval\->defineCommand($code, $macroprefix);""" 4 .el .IP "\f(CW$keyval\->defineCommand($code, $macroprefix);\fR" 4 .IX Item "$keyval->defineCommand($code, $macroprefix);" Helper function to define \f(CW$STATE\fR neccesary for a command key. .ie n .IP """$keyval\->defineChoice($code, $mismatch, $choices, $normalize, $bin);""" 4 .el .IP "\f(CW$keyval\->defineChoice($code, $mismatch, $choices, $normalize, $bin);\fR" 4 .IX Item "$keyval->defineChoice($code, $mismatch, $choices, $normalize, $bin);" Helper function to define \f(CW$STATE\fR neccesary for an choice key. .ie n .IP """$keyval\->defineBoolean($code, $mismatch, $macroprefix);""" 4 .el .IP "\f(CW$keyval\->defineBoolean($code, $mismatch, $macroprefix);\fR" 4 .IX Item "$keyval->defineBoolean($code, $mismatch, $macroprefix);" Helper function to define \f(CW$STATE\fR neccesary for a boolean key. .ie n .IP """disabled = $keyval\->isDisabled();""" 4 .el .IP "\f(CWdisabled = $keyval\->isDisabled();\fR" 4 .IX Item "disabled = $keyval->isDisabled();" Checks if this keyval property is disabled. .ie n .IP """$keyval\->disable();""" 4 .el .IP "\f(CW$keyval\->disable();\fR" 4 .IX Item "$keyval->disable();" Disables this KeyVal object in \f(CW$STATE\fR. .SS "Value Related" .IX Subsection "Value Related" .ie n .IP """$expansion = $keyval\->setKeys($value, $useDefault, $checkExistence, $checkDisabled, $setInternals);""" 4 .el .IP "\f(CW$expansion = $keyval\->setKeys($value, $useDefault, $checkExistence, $checkDisabled, $setInternals);\fR" 4 .IX Item "$expansion = $keyval->setKeys($value, $useDefault, $checkExistence, $checkDisabled, $setInternals);" Expands this KeyVal into a \fITokens()\fR to be used with \esetkeys. \&\fIvalue\fR contains the value to be used in the expansion, \fIuseDefault\fR indicates if the value argument should be ignored and the default should be used instead. If \fIcheckExistence\fR is set to 1 and the macro does not exist, undef is returned. If \fIcheckDisabled\fR is set to 1 and the macro is disabled, an empty \fITokens()\fR is returns. If \fI\f(CI$setInternals\fI\fR is set, sets XKeyVal internal macros. .ie n .IP """$reversion = $keyval\->digest($stomach, $value);""" 4 .el .IP "\f(CW$reversion = $keyval\->digest($stomach, $value);\fR" 4 .IX Item "$reversion = $keyval->digest($stomach, $value);" Digests this KeyVal with the given stomach and value. .ie n .IP """$reversion = $keyval\->revert($value, $useDefault, $compact, $isFirst, $punct, $assign);""" 4 .el .IP "\f(CW$reversion = $keyval\->revert($value, $useDefault, $compact, $isFirst, $punct, $assign);\fR" 4 .IX Item "$reversion = $keyval->revert($value, $useDefault, $compact, $isFirst, $punct, $assign);" Reverts this KeyVal with a given \fIvalue\fR (or the default if \fIIsDefault\fR is set) and punctuation and assignment tokens. If \fIcompact\fR is given, spaces will be omitted when possible. The \fIisDefault\fR parameter indicates if appropriate seperation tokens should be inserted. .ie n .IP """$str = $keyval\->toString();""" 4 .el .IP "\f(CW$str = $keyval\->toString();\fR" 4 .IX Item "$str = $keyval->toString();" Turns this KeyVal object into a string. .SH "AUTHOR" .IX Header "AUTHOR" Tom Wiesing .SH "COPYRIGHT" .IX Header "COPYRIGHT" Public domain software, produced as part of work done by the United States Government & not subject to copyright in the \s-1US.\s0