%
% LaTeX 2e document class for publications of the Asociación Argentina de Astronomía
%
% v1.0, 15/5/2014
%
% ----------------------------------------------------------------------------------
%
% Class definitions
%
\NeedsTeXFormat{LaTeX2e}[2011/06/27]
\ProvidesClass{aaa2014}[2014/05/15 LaTeX document class for AAA publications, v1.0]
%
% Class options
%
\DeclareOption{baaa} % Typeset BAAA
{
  \gdef\journal{1}
  \gdef\journalname{Bolet\'{\i}n de la Asociaci\'on Argentina de Astronom\'{\i}a}
  \gdef\journalshortname{Bolet\'{\i}n}
  \gdef\journalacronym{BAAA}
}
\DeclareOption{craaa} % Typeset CRAAA
{
  \gdef\journal{0}
  \gdef\journalname{Cuaderno de Res\'umenes de la Asociaci\'on Argentina de Astronom\'{\i}a}
  \gdef\journalshortname{Cuaderno de Res\'umenes}
  \gdef\journalacronym{CRAAA}
}
\gdef\journaleditorial{Asociaci\'on Argentina de Astronom\'{\i}a} % Editorial
\gdef\journalvol#1{\gdef\@journalvol{#1}} % Volume
\gdef\journalyear#1{\gdef\@journalyear{#1}} % Year
\gdef\journaleditors#1{\gdef\@journaleditors{#1}} % Editors
\gdef\journalissn#1{\gdef\@journalissn{#1}} % ISSN
\input{fleqn.clo} % Align equations to the left
\@twosidetrue % Use always two-side format
\setlength\overfullrule{0pt} % Strict overfull rule
\@twocolumntrue % Use two column format
\ProcessOptions % Process options
% 
% Thematic area, only for AAA database use
%
\def\thematicarea#1{}
%
% Language-dependent definitions
% Contribution languages: 0 = Spanish / 1 = English
%
\def\contriblanguage#1
{
  \ifnum #1 = 0
    \def\keywordname{Palabras clave}
    \def\abstractname{Resumen}
    \def\contactname{Contacto}
    \def\contentsname{Contenido}
    \def\listfigurename{Lista de Figuras}
    \def\listtablename{Lista de Tablas}
    \def\refname{Referencias}
    \def\indexname{\'Indice}
    \def\figurename{Fig.}
    \def\tablename{Tabla}
    \def\partname{Parte}
    \def\appendixname{Ap\'endice}
    \def\ackname{Agradecimientos}
    \def\contribtype##1{\def\ctypename{\ifnum ##1 = 1{PRESENTACION MURAL}
                                       \else \ifnum ##1 = 2{PRESENTACION ORAL}
                                             \else \ifnum ##1 = 3{INFORME INVITADO}
                                                   \else{MESA REDONDA} \fi \fi \fi}}
  \else
    \def\keywordname{Keywords}
    \def\abstractname{Abstract}
    \def\contactname{Contact}
    \def\contentsname{Contents}
    \def\listfigurename{List of Figures}
    \def\listtablename{List of Tables}
    \def\refname{References}
    \def\indexname{Index}
    \def\figurename{Fig.}
    \def\tablename{Table}
    \def\partname{Part}
    \def\appendixname{Appendix}
    \def\ackname{Acknowledgements}
    \def\contribtype##1{\def\ctypename{\ifnum ##1 = 1{POSTER PRESENTATION}
                                       \else \ifnum ##1 = 2{ORAL PRESENTATION}
                                             \else \ifnum ##1 = 3{INVITED REPORT}
                                                   \else {ROUND TABLE} \fi \fi \fi}}
  \fi
}
%
% Page settings
%
\setlength\paperheight{260mm}
\setlength\paperwidth{190mm}
%
% Font size commands
%
\renewcommand\normalsize{\@setfontsize\normalsize\@xpt{11}}\normalsize
\newcommand\small{\@setfontsize\small\@ixpt{10}}%
\newcommand\scriptsize{\@setfontsize\scriptsize\@viipt\@viiipt}
\newcommand\tiny{\@setfontsize\tiny\@viiipt\@ixpt} 
\newcommand\large{\@setfontsize\large\@xipt{13}}
\newcommand\Large{\@setfontsize\Large\@xivpt{16}}
\newcommand\LARGE{\@setfontsize\LARGE\@xviipt{20}}
\newcommand\huge{\@setfontsize\huge\@xxpt{24}}
\newcommand\Huge{\@setfontsize\Huge\@xxvpt{30}}
%
% Sizes
%
\setlength\headheight{12\p@}
\setlength\headsep   {12\p@}
\setlength\topskip   {10\p@}
\setlength\oddsidemargin   {-30\p@}
\setlength\evensidemargin  {-30\p@}
\setlength\marginparwidth  {48\p@}
\setlength\topmargin{-40pt}
\let\footnotesize\small
\setlength{\textwidth}{165mm}
\setlength{\textheight}{220mm} 
%
% Page style
%
\def\ps@aaaheadings
{
    \def\@oddfoot{\hfill\small\thepage}
    \def\@evenfoot{\small\thepage\hfill}
    \def\@evenhead{\hfil\leftmark\hfil}
    \def\@oddhead{\small\hfil\rightmark\hfil}
    \let\@mkboth\@gobbletwo
    \let\sectionmark\@gobble
    \let\subsectionmark\@gobble
}
\newcounter{inst} % Institution counter
\newcounter{auth} % author counter
\newdimen\instindent
\newbox\authrun
\newtoks\authorrunning
\newbox\titrun
\newtoks\titlerunning
\let\@date\undefined
\long\def\abstract#1{\gdef\@abstract{{\itshape \abstractname} / #1}}
%
% Keywords
%
\def\keywords#1{\gdef\@keywords{#1}}
%
% Institute
%
\def\institute#1{\gdef\@institute{#1}}
%
% Institute names
%
\def\institutename{\par
 \begingroup
 \parindent=0pt
 \parskip=0pt
 \refstepcounter{inst}
 \def\and{\par\refstepcounter{inst}
 \hangindent\instindent
 \noindent
 \hbox to\instindent{\hss$^{\theinst}$\enspace}\ignorespaces}%
 \setbox0=\vbox{\@institute}
 \ifnum\value{inst}>9\relax\setbox0=\hbox{$^{88}$\enspace}%
                 \else\setbox0=\hbox{$^{8}$\enspace}\fi
 \instindent=\wd0\relax
 \ifnum\value{inst}=1\relax
 \else
   \setcounter{inst}{1}%
   \hangindent\instindent
   \noindent
   \hbox to\instindent{\hss$^{\theinst}$\enspace}\ignorespaces
 \fi
 \small
 \ignorespaces
 \@institute\par
 \endgroup}
%
% E-mail
%
\def\mail#1{\gdef\@mail{#1}}
\def\@mail{}
%
% Affiliation numbers
%
\def\inst#1{\unskip$^{#1}$}

\def\maketitle{\twocolumn[\@maketitle]
 \setcounter{footnote}{0}
 \global\let\maketitle\relax
 \global\let\@maketitle\relax
 \global\let\@author\@empty
 \global\let\@date\@empty
 \global\let\@title\@empty
 \global\let\@abstract\@empty
 \global\let\@keywords\@empty
 \global\let\keywords\relax
 \global\let\title\relax
 \global\let\author\relax
 \global\let\abstract\relax
 \global\let\date\relax
 \global\let\and\relax
}
%
% Define header
%
\def\makeheadbox
{
  {
    \hsize=30cc
    \begin{tabular}{lcr}
      \small{Reuni\'on Anual No. {\@journalvol}} & \rule{7.0cm}{0pt} & \small{\journaleditorial}\\
      \small{C\'ordoba, 15-19/9/{\@journalyear}} & &\small{Res\'umenes}\\
      \hline \normalsize
    \end{tabular}
  }
}
%
% Make title page
%
\def\@maketitle{
%
% Begin in new page
%
  \newpage
  \normalfont
%
% Print header
%
  \vbox to0pt{\vskip-20pt \nointerlineskip \makeheadbox\vss}
%
% Print title
%
  \nointerlineskip
  \vskip24pt
  \begin{center}
  {
    \Large \rmfamily \bf \boldmath
    \vspace*{8pt}
    \noindent\ignorespaces
    \@title
    \vspace*{2pt}
    \par
  }
%
% Print authors
%
  \vskip 8pt
  {\normalsize \scshape \mdseries \noindent\ignorespaces\@author}
  \end{center}
%
% Print affiliations
%
  \vskip6pt
  \small \itshape
  \leftskip=.8cm\rightskip=\leftskip
  \institutename
%
% Print abstract
%
  \vskip 8pt
  \small\rm
  \@abstract
%
% Print keywords
%
  \vskip 6pt
  \small\rm
  \noindent{\itshape \keywordname}\ / \@keywords
%
% Print contact e-mail
%
  \vskip 6pt
  \small\rm
  \noindent{\itshape \contactname}\ / \@mail
%
% Print contribution type
%
%  \vskip 6pt
%  \small\rm
%  \noindent{\ctypename}
%  \vskip24pt
}
\setlength\arrayrulewidth{.4\p@}
\DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm}
\DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf}
\DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt}
\DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf}
\DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit}
\DeclareOldFontCommand{\sl}{\normalfont\slshape}{\@nomath\sl}
\DeclareOldFontCommand{\sc}{\normalfont\scshape}{\@nomath\sc}
\DeclareRobustCommand*\cal{\@fontswitch\relax\mathcal}
\DeclareRobustCommand*\mit{\@fontswitch\relax\mathnormal}
\setlength\columnsep{12pt}
\setlength\columnseprule{0\p@}
\pagestyle{aaaheadings}
\pagenumbering{arabic}
\twocolumn
\sloppy
\flushbottom
%
% Some useful astronomical definitions
%
\def\sun{\hbox{$\odot$}}
\def\degr{\hbox{$^\circ$}}
\def\arcmin{\hbox{$^\prime$}}
\def\arcsec{\hbox{$^{\prime\prime}$}}
%
% Journal abbreviations
%
\def\aj{AJ} % Astronomical Journal
\def\araa{ARA\&A} % Annual Review of Astronomy and Astrophysics
\def\apj{ApJ} % Astrophysical Journal
\def\apjl{ApJL} % Astrophysical Journal Letters
\def\apjs{ApJS} % Astrophysical Journal Supplement
\def\apss{Ap\&SS} % Astrophysics and Space Science
\def\aap{A\&A} % Astronomy and Astrophysics
\def\aapr{A\&A~Rev.} % Astronomy and Astrophysics Reviews
\def\aaps{A\&AS} % Astronomy and Astrophysics Supplement
\def\baas{BAAA} % Boletín de la AAA
\def\mnras{MNRAS} % Monthly Notices of the RAS
\def\na{New~A.} % New Astronomy
\def\nar{New~A.~Rev.} % New Astronomy Review
\def\prl{Phys.~Rev.~Lett.} % Physical Review Letters
\def\rmxaa{Rev.~Mex.~Astron.~Astrofis.} % Revista Mexicana de Astronomia y Astrofisica
\def\science{Science} % Science
\def\solphys{Sol.~Phys.} % Solar Physics
\def\ssr{Space~Sci.~Rev.} % Space Science Reviews
\def\nat{Nature} % Nature
\def\aplett{Astrophys.~Lett.} % Astrophysics Letters
\def\apspr{Astrophys.~Space~Phys.~Res.} % Astrophysics Space Physics Research
\def\planss{Planet.~Space~Sci.} % Planetary Space Science
%
\endinput
%
% End of baaa2014.cls
%--------------------
