[Tex/LaTex] How to use LaTeX’s default thebibliography with the AASTeX package

aastexcitingnatbib

I am trying to prepare a paper for submission to a journal that is not an AAS publication, but I would still like to use the AASTeX package for the tools it provides and stylistic reasons. The journal does not have its own LaTeX package, so I can use the AASTeX package as long as I make sure to conform to the few given guidelines. One of the guidelines I need to follow is using the in-text citation format of [n] where n is a positive integer. Each reference in the references section should be labeled with a corresponding number. If I were not using the AASTeX package, thebibliography environment would use this format. The modified version in AASTeX package forces you to use AAS format.

How can I use LaTeX's default thebibliography with the AASTeX package?

EDIT: In order to make this question more specific, I want to know what I can comment out of the class file (or add) in order for the default thebibliography to be used. Alternatively, what options can I add to a blank tex file to get a similar look and feel to AASTeX style without the AASTeX thebibliography? Alternative packages that are already made that are similar in style would otherwise be appreciated if I'm asking for too much.

Best Answer

Okay, so I figured it out mostly based an answer given here. Also, I looked into the bibliographystyle and setcitestyle commands. Here is a minimal working example:

\documentclass[preprint]{aastex}

\usepackage{natbib}
\usepackage{etoolbox}
\newcounter{lsaref}
\makeatletter
\apptocmd{\@lbibitem}{\stepcounter{lsaref}[\arabic{lsaref}]}{}{}
\makeatother

\bibliographystyle{plain}
\setcitestyle{square}

\begin{document}

\title{The Title}

\author{Sam A. Weiss\altaffilmark{a}}
\affil{Department of Physics, Made Up Place}
\altaffiltext{a}{fakeemail@fakedomain.com}

\begin{abstract}
Here is the abstract.
\end{abstract}

\section{Introduction}
Here is an introduction so the document will typeset properly \cite{first}.

\bibliography{references}

\end{document}

Note that for the above to typeset, there must be a file called "references.bib" in the same directory as the TeX file, and the keyword for the reference in the bib file must be "first". Also, the compiler will yell at you for not having the right citation format, but it should prompt you to press enter to continue anyway (possibly different depending on your version of LaTeX).

Happy LaTeXing :)