# -*- mode: Perl -*-
# /=====================================================================\ #
# |  revsymb.sty                                                        | #
# | Implementation for LaTeXML                                          | #
# |=====================================================================| #
# | Part of LaTeXML:                                                    | #
# |  Public domain software, produced as part of work done by the       | #
# |  United States Government & not subject to copyright in the US.     | #
# |---------------------------------------------------------------------| #
# | Thanks to the arXMLiv group for initial implementation              | #
# |    http://arxmliv.kwarc.info/                                       | #
# | Released to the Public Domain                                       | #
# |---------------------------------------------------------------------| #
# | Bruce Miller <bruce.miller@nist.gov>                        #_#     | #
# | http://dlmf.nist.gov/LaTeXML/                              (o o)    | #
# \=========================================================ooo==U==ooo=/ #
package LaTeXML::Package::Pool;
use strict;
use warnings;
use LaTeXML::Package;

DefMath('\lambdabar', "\x{03BB}\x{0304}");
DefConstructor('\mathbb{}', '#1', bounded => 1, requireMath => 1,
  font => { family => 'blackboard', series => 'medium', shape => 'upright' });
DefMacro('\Bbb{}', '\mathbb{#1}');

# NOTE: The following markup creates open & close delimiters in bold and various big sizes.
# These constructors DO create Tokens with the appropriate series & size font attributes;
# However, the way delimiters are stored in the parsed math representation (as attributes)
# loses that font information, so that these tokens will appear as normal delimiters in the mathml.
DefConstructor('\biglb Token', '#1',
  afterConstruct => sub { addDelimiterRole($_[0], 'OPEN'); },
  font => { size => 'big', series => 'bold', forcebold => 1 }, bounded => 1);
DefConstructor('\bigrb Token', '#1',
  afterConstruct => sub { addDelimiterRole($_[0], 'CLOSE'); },
  font => { size => 'big', series => 'bold', forcebold => 1 }, bounded => 1);
DefConstructor('\Biglb Token', '#1',
  afterConstruct => sub { addDelimiterRole($_[0], 'OPEN'); },
  font => { size => 'Big', series => 'bold', forcebold => 1 }, bounded => 1);
DefConstructor('\Bigrb Token', '#1',
  afterConstruct => sub { addDelimiterRole($_[0], 'CLOSE'); },
  font => { size => 'Big', series => 'bold', forcebold => 1 }, bounded => 1);
DefConstructor('\bigglb Token', '#1',
  afterConstruct => sub { addDelimiterRole($_[0], 'OPEN'); },
  font => { size => 'bigg', series => 'bold', forcebold => 1 }, bounded => 1);
DefConstructor('\biggrb Token', '#1',
  afterConstruct => sub { addDelimiterRole($_[0], 'CLOSE'); },
  font => { size => 'bigg', series => 'bold', forcebold => 1 }, bounded => 1);
DefConstructor('\Bigglb Token', '#1',
  afterConstruct => sub { addDelimiterRole($_[0], 'OPEN'); },
  font => { size => 'Bigg', series => 'bold', forcebold => 1 }, bounded => 1);
DefConstructor('\Biggrb Token', '#1',
  afterConstruct => sub { addDelimiterRole($_[0], 'CLOSE'); },
  font => { size => 'Bigg', series => 'bold', forcebold => 1 }, bounded => 1);

DefMath('\gtrsim', "\x{2273}", role => 'RELOP',
  meaning => 'greater-than-or-equivalent-to');
DefMath('\lesssim', "\x{2272}", role => 'RELOP',
  meaning => 'less-than-or-similar-to');
Let('\agt', '\gtrsim');
Let('\alt', '\lesssim');

DefMath('\precsim', "\x{227E}", role => 'RELOP',
  meaning => 'precedes-or-equivalent-to');
DefMath('\succsim', "\x{227F}", role => 'RELOP',
  meaning => 'succeeds-or-equivalent-to');
Let('\altprecsim', '\precsim');
Let('\altsuccsim', '\succsim');

DefMath('\overcirc{}', "\x{030A}", operator_role => 'OVERACCENT');    # same as mathring

DefMath('\dddot{}', "\x{02D9}\x{02D9}\x{02D9}", operator_role => 'OVERACCENT');    # DOT ABOVE
Let('\overdots', '\dddot');
DefMath('\triangleq', "\x{225C}", role => 'RELOP');                                # DELTA EQUAL TO
Let('\corresponds', '\triangleq');

# \frak

#DefAccent('\loarrow{}',  "\x{20D6}", UTF(0x2190)); # COMBINING LEFT ARROW ABOVE
#DefAccent('\roarrow{}',  "\x{20D7}", UTF(0x2192)); # COMBINING RIGHT ARROW ABOVE
DefMath('\loarrow{}', "\x{20D6}", operator_role => 'OVERACCENT');
DefMath('\roarrow{}', "\x{20D7}", operator_role => 'OVERACCENT');

# \mathfrak
DefConstructor('\openone', '1',
  font => { family => 'blackboard', series => 'medium', shape => 'upright' });

#DefAccent('\overstar', "\x{0359}", UTF(0x002A)); # COMBINNING ASTERISK BELOW (should be ABOVE, but no code available)
#DefAccent('\tensor',   "\x{20E1}", UTF(0x2194)); # COMBINING LEFT RIGHT ARROW ABOVE
DefMath('\overstar{}', "\x{0359}", operator_role => 'OVERACCENT');
DefMath('\tensor{}',   "\x{20E1}", operator_role => 'OVERACCENT');

# \vereq

#**********************************************************************
1;
