use LaTeXML::Package;

# Simple reuse of Whatit
DefConstructor('\BoxDup{}',
  "<ltx:XMWrap><ltx:XMWrap>#1</ltx:XMWrap><ltx:XMWrap>#1</ltx:XMWrap></ltx:XMWrap>");

# Deferred reuse of Whatsit
DefConstructor('\SaveBox{}', "#1",
  afterDigest => sub {
    AssignValue(SAVED_WHATSIT => $_[1]->getArg(1), 'global'); });
DefConstructor('\UseBox', "#savedbox",
  properties => sub { (savedbox => LookupValue('SAVED_WHATSIT')); });

# Some math macros that create ltx:XMDual's for testing
DefMath('\parens{}',   '(#1)', meaning => parentheses);
DefMath('\brackets{}', '[#1]', meaning => brackets);
