# -*- mode: Perl -*-
# /=====================================================================\ #
# |  aa                                                                 | #
# | 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;

# aa.cls
#  Astronomy & Astrophysics
# See https://www.aanda.org/for-authors/latex-issues/texnical-background-information
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
# Class Options
# Ignorable options
foreach my $option (qw(10pt 11pt 12pt twoside onecolumn twocolumn
  draft final referee
  longauth rnote
  oldversion
  runningheads
  envcountreset envcountsect
  structabstract traditabstract
  letter)) {
  DeclareOption($option, undef); }

# Anything else gets passed to article.
DeclareOption(undef, sub {
    PassOptions('article', 'cls', ToString(Expand(T_CS('\CurrentOption')))); });

ProcessOptions();

LoadClass('article');
RequirePackage('aa_support');

# except don't use the \pmatrix from amsmath.sty
# (which gets loaded through aa_support's dependencies)
# see arXiv:astro-ph/0002145 for an example.
# just use the one from TeX.pool, copied here:
DefMacro('\pmatrix{}',
  '\lx@gen@plain@matrix{name=pmatrix,datameaning=matrix,left=\@left(,right=\@right)}{#1}');
# also don't use the amsmath cases
DefMacro('\cases{}',
  '\lx@gen@plain@cases{meaning=cases,left=\@left\{,conditionmode=text,style=\textstyle}{#1}');
# but allow reloading amsmath.sty if {cases} was really needed (arXiv:astro-ph/0203101)
AssignValue('amsmath.sty.ltxml_loaded', undef, 'global');
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1;
