3

I am writing a paper and would like to try the AASTeX citation style (https://mirror.clientvps.com/CTAN/macros/latex/contrib/aastex/aasjournal.bst).

However, I find the way it adds the further authors' names after the year in case of more than two authors completely appaling (see, for instance, https://www.bibtex.com/s/bibliography-style-aastex-aasjournal/).

I would therefore prefer to make it more pleasant by forcing citations to end after the bracketed year. For instance, [Fan et al.(2020)Fan, Jiang, Tang, Jin, and Wei] should simply become [Fan et al.(2020)]. However, I do not understand where to edit the aasjournal.bst to achieve this.

Does someone know a quick fix?

Changing to biblatex's authoryear-style is not a preferred option because I would hate to insert square brackets by hand and I like the way AASTeX turns names and year into a single hyperlink.

EDIT: So with these bib-entries:

@ARTICLE{Flanagan:1998,
      author = {{Flanagan}, {\'E}anna {\'E}. and {Hughes}, Scott A.},
       title = "{Measuring gravitational waves from binary black hole coalescences. I. Signal to noise for inspiral, merger, and ringdown}",
     journal = {\prd},
        year = 1998,
       month = apr,
      volume = {57},
      number = {8},
       pages = {4535-4565},
         doi = {10.1103/PhysRevD.57.4535},
archivePrefix = {arXiv},
      eprint = {gr-qc/9701039}
}

@ARTICLE{Gao:2020,
      author = {{Gao}, He and {Ai}, Shun-Ke and {Cao}, Zhou-Jian and {Zhang}, Bing and {Zhu}, Zhen-Yu and {Li}, Ang and {Zhang}, Nai-Bo and {Bauswein}, Andreas},
       title = "{Relation between gravitational mass and baryonic mass for non-rotating and rapidly rotating neutron stars}",
     journal = {Frontiers of Physics},
    keywords = {gravitational waves, Astrophysics - High Energy Astrophysical Phenomena},
        year = 2020,
       month = jan,
      volume = {15},
      number = {2},
         eid = {24603},
       pages = {24603},
         doi = {10.1007/s11467-019-0945-9},
archivePrefix = {arXiv},
      eprint = {1905.03784},
primaryClass = {astro-ph.HE}
}

and this header

\documentclass[12pt,a4paper, titlepage,twoside]{article}
\usepackage{aasmacros}
\usepackage{fullpage}
\usepackage{hyperref}
\usepackage{cleveref}                   %Referencing with \cref{}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{ dsfont }
\usepackage{enumitem}
%\usepackage[authoryear]{natbib}
\hypersetup{%
  colorlinks=true,
  linkcolor=blue,
  linkbordercolor={0 0 1}
}
\begin{document}
Lorem \cite{Flanagan:1998} and cite \cite{Gao:2020}
% \printbibliography
\bibliography{refs}
\bibliographystyle{aasjournal.bst}
\end{document}

I obtain exactly the desired output for Flanagan, but Gao is ugly and too long. When including \usepackage[authoryear]{natbib}, the aastex specifics are lost: I lose the square brackets around the output, a whitespace is inserted before the year and the hyperlink is split into two hyperlinks for names and years.

6
  • Welcome to TeX.SE.
    – Mico
    Nov 21, 2022 at 18:37
  • Umm, are you loading the natbib citation management style with the option authoryear? If not, you probably should. To quote from the aasjournal.bst fiile you provide a link to: "This is an author-year citation style bibliography. As such, it is non-standard LaTeX, and requires a special package file to function properly. Such a package is natbib by Patrick W. Daly."
    – Mico
    Nov 21, 2022 at 18:38
  • 2
    Hi! I work on AASTeX, and I think that what @Mico said is exactly right. If using aasjournal.bst + natbib is still giving unsatisfactory authoryear results, then please provide an example of the class and header you are using that results in these trailing authors in the compiled text. Thanks!
    – Gus
    Nov 21, 2022 at 18:50
  • @Mico Thank you for your quick response. As stated in the edit, loading natbib is more harmful than helpful. My suspicion was that the statement you referred to is more of a legacy issue.
    – Dididombi
    Nov 21, 2022 at 19:15
  • @Gus If I understand you correctly, natbib is required for aastex? I am a bit surprised, because the output I obtain without it seems more in line with the actual AAS recommendations (Although I personally dislike them :))
    – Dididombi
    Nov 21, 2022 at 19:17

2 Answers 2

7

An extended comment up front: You appear to regard statements found on bibtex.com to be authoritative. Sadly, this trust is badly misplaced. For starters, the website bibtex.com is IN NO WAY associated with, or authorized by, the author of BibTeX. The advice that's provided by whoever owns the rights to the bibtex.com site is frequently flawed -- and at times even downright wrong. For sure, whoever authored the page you provided a link to appears to have been blissfully [??] unaware of the fact that the aasjournal bib style requires the use of a citation management package such as natbib. Don't let their incompetence fool you. You've been warned.

What's the basis for my claim that the aasjournal bib style requires the use of a citation management package such as natbib? Well, the preamble of the file aasjournal.bst contains the following passage:

 % This is an author-year citation style bibliography. As such, it is
 % non-standard LaTeX, and requires a special package file to function properly.
 % Such a package is    natbib.sty   by Patrick W. Daly

To summarize: Do yourself a big favor and (a) learn to disregard what you've come across on bibtex.com and (b) load the natbib citation management package. Upon completion of this process, you'll also come to realize that the citation call-outs produced by the aasjournal bib style are, contrary to the assertions contained in your posting, neither "spectacularly ugly" nor "completely appaling".


I gather that you like authoryear-style citation call-outs to be encased in square brackets. If that's the case, do look into using the \citep command that's provided by the natbib citation management package.

enter image description here

\documentclass[12pt,a4paper,titlepage,twoside]{article}
\begin{filecontents}[overwrite]{refs.bib}
@ARTICLE{Flanagan:1998,
      author = {Flanagan, {\'E}anna {\'E}. and Hughes, Scott A.},
       title = {Measuring gravitational waves from binary black hole 
                coalescences. {I.} {Signal} to noise for inspiral, 
                merger, and ringdown},
     journal = {Physical Review~D},
        year = 1998,
       month = apr,
      volume = {57},
      number = {8},
       pages = {4535--4565},
         doi = {10.1103/PhysRevD.57.4535},
archivePrefix= {arXiv},
      eprint = {gr-qc/9701039}
}
@ARTICLE{Gao:2020,
      author = {Gao, He and Ai, Shun-Ke and Cao, Zhou-Jian and 
                Zhang, Bing and Zhu, Zhen-Yu and Li, Ang and 
                Zhang, Nai-Bo and Bauswein, Andreas},
       title = {Relation between gravitational mass and baryonic 
                mass for non-rotating and rapidly rotating neutron 
                stars},
     journal = {Frontiers of Physics},
    keywords = {Gravitational waves, Astrophysics - High Energy Astrophysical Phenomena},
        year = 2020,
       month = jan,
      volume = {15},
      number = {2},
         eid = {24603},
       pages = {24603},
         doi = {10.1007/s11467-019-0945-9},
archivePrefix= {arXiv},
      eprint = {1905.03784},
primaryClass = {astro-ph.HE}
}
\end{filecontents}

%\usepackage{aasmacros} % I don't seem to have this package

\usepackage{fullpage}

\usepackage{xurl} % <-- new
\usepackage{hyperref}
\hypersetup{%
  colorlinks=true,
  allcolors =blue % <-- new
  %linkbordercolor={1 0 1} % irrelevant since 'colorlinks' option is set
}
\usepackage{cleveref} 
\usepackage[english]{babel}
%\usepackage[utf8]{inputenc} % That's the default nowadays.
\usepackage{dsfont}
\usepackage{enumitem}

\usepackage[authoryear,square]{natbib} % note the "square" option
\bibliographystyle{aasjournal}

\begin{document}
Lorem \citep{Flanagan:1998} and Ipsum \citep{Gao:2020}.
\bibliography{refs}
\end{document}
1

@Mico is perfectly right about the fallacy I have fallen for.

Nevertheless, the solution he suggests is not the one I was looking for, as it still differs from other AAS requirements. The fix I have finally found after rereading this introduction multiple times, was to comment out some parts of FUNCTION {output.bibitem} in aasjournal.bst:

FUNCTION {output.bibitem}
{ newline$
  "\bibitem[{" write$
  label write$
  ")" %make.full.names duplicate$ short.list =
   %   { pop$ }
   %   { * }
   % if$
  "}]{" * write$
  cite$ write$
  "}" write$
  newline$
  ""
  before.all 'output.state :=
}

This works for me even without loading natbib :)

4
  • 3
    As the ctan.org/tex-archive/macros/latex/contrib/aastex package is distributed under the latex project public license, you should rename the bst file if you make changes Nov 22, 2022 at 9:22
  • Thanks, I was not aware of that
    – Dididombi
    Nov 22, 2022 at 9:25
  • Please provide a reference to "other AAS requirements" you allude to.
    – Mico
    Nov 22, 2022 at 14:51
  • I am with @Mico and am replying here (rather than above) bc I don't know what other AAS requirements you're trying to meet (or why). We don't use square bracket author-year, we ask authors to use \citet and \citep with natbib, we aren't concerned about the unanchored parenthesis, but we def require any entry in the reference list to have at least 3 authors for multi-author references in the article bibliography (this last one is I guess what you don't like?). It's fine for you to hack away on this for whatever non-AAS purpose you're aiming to achieve, though!
    – Gus
    Nov 22, 2022 at 21:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .