12

I have references for two papers written by the same authors in the same year. When I cite them, I see something like this [Landgren et al., 2016a] and [Landgren et al., 2016b]. The problem is that the paper with 2016a was published some months after the one with 2016b, in fact 2016a is a follow up of 2016b. How can I make latex swap the order of both papers, so the older paper is labeled with 2016a? I have specified the month in my .bib file but that doesn't change anything.

Edit

Minimal bibtex:

@inproceedings{landgren2016distributed,
  title={On distributed cooperative decision-making in multiarmed bandits},
  author={Landgren, Peter and Srivastava, Vaibhav and Leonard, Naomi Ehrich},
  booktitle={Control Conference (ECC), 2016 European},
  pages={243--248},
  year={2016},
  month={may},
  organization={IEEE}
}

@inproceedings{landgren2016bdistributed,
  title={Distributed cooperative decision-making in multiarmed bandits: Frequentist and Bayesian algorithms},
  author={Landgren, Peter and Srivastava, Vaibhav and Leonard, Naomi Ehrich},
  booktitle={Decision and Control (CDC), 2016 IEEE 55th Conference on},
  pages={167--172},
  year={2016},
  month={sep},
  organization={IEEE}
}

Main tex

\documentclass{article}

\begin{document}


\nocite{*}
\bibliographystyle{apalike}
\bibliography{refs.bib}

\end{document}
3
  • 5
    The order of these disambiguation letters depends on the bibliography package you use (cite, natbib, biblatex, ...) and the style you employ (the argument to \bibliographystyle with BibTeX or the value of the style option with biblatex). Please show us an MWE/MWEB that reproduces what you are seeing and shows us how you produce your bibliography. A solution will crucially depend on your chosen method.
    – moewe
    Jun 25, 2018 at 10:32
  • 2
    In particular, please do tell us which bibliography style you employ.
    – Mico
    Jun 25, 2018 at 10:35
  • 2
    @moewe MWE added
    – Damaru
    Jun 25, 2018 at 11:47

2 Answers 2

13

You can fix the issue without changing the bst file (and making the copy editors happy, if you're submitting the paper and apalike is the required bib style). The sorting order, when the same list of author is shared by two entries, is determined by the title.

\begin{filecontents*}{\jobname.bib}
@inproceedings{landgren2016distributed,
  title={{\noopsort{A}{On}} distributed cooperative decision-making in multiarmed bandits},
  author={Landgren, Peter and Srivastava, Vaibhav and Leonard, Naomi Ehrich},
  booktitle={Control Conference (ECC), 2016 European},
  pages={243--248},
  year={2016},
  month=may,
  organization={IEEE}
}

@inproceedings{landgren2016bdistributed,
  title={{\noopsort{B}{Distributed}} cooperative decision-making in multiarmed bandits: Frequentist and Bayesian algorithms},
  author={Landgren, Peter and Srivastava, Vaibhav and Leonard, Naomi Ehrich},
  booktitle={Decision and Control (CDC), 2016 IEEE 55th Conference on},
  pages={167--172},
  year={2016},
  month=sep,
  organization={IEEE}
}
\end{filecontents*}

\documentclass{article}

\newcommand{\noopsort}[2]{#2}

\begin{document}

\nocite{*}
\bibliographystyle{apalike}
\bibliography{\jobname}

\end{document}

This way BibTeX sorts according to A and B, rather than according to On and Distributed.

I used filecontents* just for making the example self-contained.

enter image description here

8

With some modifications of apalike.bst you can sort by year and month. This will require you to input the three-letter month abbreviations without braces, though

month = may,

as is recommended in btxdoc anyway (p. 10)

month The month in which the work was published or, for an unpublished work, in which it was written. You should use the standard three-letter abbreviation, as described in Appendix B.1.3 of the LaTeXbook.

To modify apalike.bst proceed as follows.

  1. Locate apalike.bst on your machine. You can do this by typing kpsewhich apalike.bst into the command line/terminal. Alternatively, obtain a copy of the file from CTAN http://mirrors.ctan.org/biblio/bibtex/base/apalike.bst

  2. Copy the file to a location where TeX can find it. The document directory will do fine. See also https://texfaq.org/FAQ-inst-wlcf

  3. Rename the file to apalike-month.bst (the license of apalike.bst requires you to change the name if you modify the file)

  4. Apply the changes given in the following patch

    --- apalike.bst 2010-12-10 10:19:51.000000000 +0100
    +++ apalike-month.bst   2018-06-25 14:10:59.653275200 +0200
    @@ -1,7 +1,8 @@
    -% BibTeX `apalike' bibliography style (version 0.99a, 8-Dec-10), adapted from
    +% BibTeX `apalike-month' bibliography style
    +% based on `apalike' (version 0.99a, 8-Dec-10), which in turn was adapted from
     % the `alpha' style, version 0.99a; for BibTeX version 0.99a.
     %
    -% Copyright (C) 1988, 2010 Oren Patashnik.
    +% original copyright (C) 1988, 2010 Oren Patashnik.
     % Unlimited copying and redistribution of this file are permitted as long as
     % it is unmodified.  Modifications (and redistribution of modified versions)
     % are also permitted, but only if the resulting file is renamed.
    @@ -39,6 +40,7 @@
     %                    THIS `apalike' VERSION DOES NOT WORK WITH BIBTEX 0.98i.
     %    8-dec-10  (OP)  Still version 0.99a, as the code itself was unchanged;
     %                    this release clarified the license.
    +%   25-jun-18        Add month sorting
    
     ENTRY
       { address
    @@ -51,7 +53,7 @@
         institution
         journal
         key
    -%    month              not used in apalike
    +    month
         note
         number
         organization
    @@ -751,29 +753,29 @@
    
     FUNCTION {default.type} { misc }
    
    -MACRO {jan} {"January"}
    +MACRO {jan} {"01"}
    
    -MACRO {feb} {"February"}
    +MACRO {feb} {"02"}
    
    -MACRO {mar} {"March"}
    +MACRO {mar} {"03"}
    
    -MACRO {apr} {"April"}
    +MACRO {apr} {"04"}
    
    -MACRO {may} {"May"}
    +MACRO {may} {"05"}
    
    -MACRO {jun} {"June"}
    +MACRO {jun} {"06"}
    
    -MACRO {jul} {"July"}
    +MACRO {jul} {"07"}
    
    -MACRO {aug} {"August"}
    +MACRO {aug} {"08"}
    
    -MACRO {sep} {"September"}
    +MACRO {sep} {"09"}
    
    -MACRO {oct} {"October"}
    +MACRO {oct} {"10"}
    
    -MACRO {nov} {"November"}
    +MACRO {nov} {"11"}
    
    -MACRO {dec} {"December"}
    +MACRO {dec} {"12"}
    
     MACRO {acmcs} {"ACM Computing Surveys"}
    
    @@ -1013,6 +1015,13 @@
       *
       "    "
       *
    +  month empty$
    +    { "00" }
    +    { month }
    +  if$
    +  *
    +  "    "
    +  *
       title field.or.null
       sort.format.title
       *
    @@ -1072,6 +1081,13 @@
       *
       "    "
       *
    +  month empty$
    +    { "00" }
    +    { month }
    +  if$
    +  *
    +  "    "
    +  *
       title field.or.null
       sort.format.title
       *
    

    This patch re-enables the month field and includes the it field into the sorting sequence (if no month is given it is sorted as 00 so that work without explicit month sort before those with an explicit month, of course that can be changed by replacing the two "00"s with the desired sort string). To make sure that the months sort properly the three-letter macros are redefined to yield the month numbers. Note that the style has not been changed to print the month (so the sorting may feel somewhat arbitrary from the outside).

  5. Use \bibliographystyle{apalike-month} instead of \bibliographystyle{apalike} in your document.

As alternative for steps 1 to 4 you can obtain the patched version of the file at https://gist.github.com/moewew/432f756b9fbb81d6337577cd78a8bbd8

With the new apalike-month.bst your MWE gives

enter image description here

You must log in to answer this question.

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