1

In a document class of mine, I use bibtex, and set up two bibliographies. One of sources actually cited by the document, and another one with extra references, printed separately.

I want the style of the entries in that second bibliography, when printed, to be the alpha style; but - I want them to be sorted by order of appearance of the work (at least by year, preferably also accounting for month for journals).

Now, I don't actually care about the labels of the items in this second bibliography, since we can assume they are never actually cited.

Given what I've described - what's the "least painful" thing I can do to get both the order and entry style I like?

Related: Use amsplain, but sort by appearance in document, not bibtex file .

3
  • This might aid you to make a helpful MWE: tex.meta.stackexchange.com/questions/4407 Jan 29, 2022 at 22:10
  • Please clarify what you're trying to achieve with the second bibliography. At one point, you mention, "I don't actually care about the labels of the items in this second bibliography". So, why do they need to be labelled alpha-styled? Since that bibliography would appear to consist of entries not cited in the body of the document, the entries don't need any labels at all, do they? You want want them to show up in the order they occur in the bib file, right? Is this interpretation correct? Please advise.
    – Mico
    Jan 30, 2022 at 7:39
  • @Mico: No labels will be printed, only the bibliography entries (which, for alpha, don't include the labels).
    – einpoklum
    Jan 30, 2022 at 7:43

1 Answer 1

0

I'm not sure that I've fully understood your formatting objectives. If I did not, please clarify what needs to be done.

The proposed solution employs a lightly modified version of the alpha bibliography style to list the bibliographic entries in the order they are listed in the bib file. I suggest you proceed as follows:

  • Find the file alpha.bst in your TeX distribution. Make a copy of this file and call the copy, say, alpha-nosort.bst. (Don't edit an original file of the TeX distribution directly.)

  • Open the file alpha-nosort.bst in a text editor. The progrem you employ to edit your tex files will do file.

  • Inside alpha-nosort.bst, locate the line with the single instruction SORT (uppercase). In my copy of the file, this instruction occurs on line 1187. Comment out (or delete) this instruction.

  • Save the file alpha-nosort.bst either in the directory that contains your main tex file(s) or in a directory that's searched by BibTeX. If you choose the latter option, be sure to update the filename database of your TeX distribution suitably. If you're not sure what the preceding sentence means, I suggest you choose the former option.

  • In your main tex file, change the instruction \bibliographystyle{alpha} to \bibliographystyle{alpha-nosort}. Then, run a full recompile-cycle - LaTeX, BibTeX, and LaTeX twice more - to fully propagate the changes.

Happy BibTeXing!


Here's an MWE (minimum working example) and its associated output.

enter image description here

\documentclass{article} % or some other suitable document class

\begin{filecontents}[overwrite]{mybib.bib}
@misc{zz:02, author="Zelda Zwicky", title="Further thoughts", year=3002}
@misc{aa:01, author="Anne Author", title="Initial Thoughts", year=3001}
\end{filecontents}
\bibliographystyle{alpha-nosort}

\begin{document}
\nocite{*} % entries in 'mybib.bib' aren't explicitly \cite'd
\bibliography{mybib}
\end{document}
1
  • 1
    The OP wants a chronologically-ordered "Supplemental bibliography". Provided the .bib file is manually ordered, the procedure you describe should work. The important thing though is that the .bib file must already be in the desired order. Jun 25, 2023 at 2:05

You must log in to answer this question.

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