use LaTeXML::Package;
package LaTeXML::Package::Pool;
RequirePackage('keyval');

#======================================================================
# Tests of various constructors using KeyVals.
#======================================================================
DefKeyVal('foo','path','Semiverbatim');

# Testing simple use of keys; 
#   attribute is just list of key-value pairs.
DefConstructor('\KVsimple OptionalKeyVals:foo',
	       "<ltx:graphics graphic='none' options='#1'/>");

# Testing more complex use of keys;
#   individual attributes are obtained from specific keys.
DefConstructor('\KVcomplex OptionalKeyVals:foo', 
	       "<ltx:graphics graphic='none' width='&KeyVal(#1,width)' height='&KeyVal(#1,height)'/>");


# Testing use in an environment.
DefEnvironment('{KVenv} OptionalKeyVals:foo',
	       "<ltx:text width='&KeyVal(#1,width)' height='&KeyVal(#1,height)'>#body</ltx:text>");

# Testing structured use of keys; map an XML structure to the keys (eg. for amsrefs)
DefEnvironment('{KVstruct} OptionalKeyVals:foo',
	"<ltx:text>"
	."?&KeyVal(#1,width)(<ltx:text>Width: &KeyVal(#1,width)</ltx:text>)"
	."<ltx:text>&amp;</ltx:text>"
	."?&KeyVal(#1,height)(<ltx:text>Height: &KeyVal(#1,height)</ltx:text>)"
	."#body</ltx:text>");

# Testing automatic conversion of keys to text
DefConstructor('\KVauto RequiredKeyVals:foo',"<ltx:text>#1</ltx:text>");

#======================================================================
1;
