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

#**********************************************************************
# Seems to be equivalent.
LoadClass('aastex', withoptions => 1);
RequireResource('ltx-apj.css');
# ... Well, almost...
DefMacroI('\LongTables', undef, '');
Let('\begin{deluxetable*}', '\begin{deluxetable}');
Let('\end{deluxetable*}',   '\end{deluxetable}');

Let('\BeginEnvironment', '\begin');
Let('\EndEnvironment',   '\end');

# Hopefully, nobody is using these for real...
DefMacro('\BeforeBegin{}{}', '');
DefMacro('\BeforeEnd{}{}',   '');
DefMacro('\AfterBegin{}{}',  '');
DefMacro('\AfterEnd{}{}',    '');

DefMacro('\ApjSectionMarkInTitle{}',         '{#1.\ }');
DefMacro('\ApjSectionpenalty',               '0');
DefMacro('\AppendixApjSectionMarkInTitle{}', '{#1.\ }');

DefMacro('\NullCom{}', '');
DefMacroI('\apjsecfont',        undef, '\small');
DefMacroI('\lastfootnote',      undef, '\small');
DefMacroI('\lastpagefootnote',  undef, '\small');
DefMacroI('\lastpagefootnotes', undef, '\small');
DefMacro('\tableheadfrac{}', '');
DefMacro('\tabletypesize{}', '');
Let('\tablefontsize', '\tabletypesize');

DefMacro('\subtitle', '');

DefMacro('\submitted{}',   '\@add@frontmatter{ltx:date}[role=submitted]{#1}');
DefMacro('\journalinfo{}', '\@add@frontmatter{ltx:note}[role=journal]{#1}');

DefMacro('\keywordsname', 'Subject headings');

# Vertical analogs of llap, rlap
DefMacro('\ulap{}', '\hbox{#1}');
DefMacro('\dlap{}', '\hbox{#1}');

Let('\tabcaption', '\caption');

DefMacro('\format@title@section{}',    '\lx@tag[][.\space]{\thesection}#1');
DefMacro('\format@title@subsection{}', '\lx@tag[][.\space]{\thesubsection}#1');
DefMacro('\format@title@figure{}',     '\lx@tag[][.\@@emdash\space]{\lx@fnum@@{figure}}#1');
DefMacro('\format@title@table{}',      '\lx@tag{\lx@fnum@@{table}}#1');

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