2

Hi Based on previous post How to order citations by appearance using BibTeX? ,

I tried randomly things like \bibliographystyle{unsrt}, ..., but I don't numbers in the body of the paper

I also tried using

\usepackage[round, comma, sort&compress ]{natbib}

\bibliographystyle{amsalpha}
\bibliography{...}

However, the first line seemed to do nothing except produce the message Natbib error : Bibliography not compatible with author-year citations

which slowed down things without influencing the outcome.What to do?

1
  • 4
    Welcome to TeX.SX! As far as I understood, you want author-year like references in your text but sort the references in your bibliography in the order of appearance instead of alphabetically. Is that correct? How is the reader supposed to find a reference in the bibliography then?
    – leandriis
    Commented Jul 25, 2020 at 18:23

1 Answer 1

3

Since you're using the natbib citation management, I suggest that you (a) load the package with the option authoryear and (b) employ the unsrtnat bibliography style.

enter image description here

That said, I'd like to repeat the concern voiced in @leandriis' comment: Assuming your paper cites more than half a dozen pieces, how on earth are your readers supposed to find the bibliographic entries that correspond to the citation call-outs? If you wish to employ authoryear-style citation call-outs, I really can't see a valid reason for not sorting the entries alphabetically by authors' surnames.

\documentclass{article}
\begin{filecontents}[overwrite]{mybib.bib}
@misc{a,author="A",title="Aa",year=3001}
@misc{z,author="Z",title="Zz",year=3002}
\end{filecontents}

\usepackage[round,authoryear]{natbib}
\bibliographystyle{unsrtnat}

\begin{document}
\cite{z}, \cite{a}
\bibliography{mybib}
\end{document}
4
  • thanks. Indeed, there is a problem. In the example I had seen, the text contained besides authoryear the appearance order number, and the same in the references. Without numbers, it is useless :(
    – florin
    Commented Jul 25, 2020 at 23:14
  • @florin - Please clarify what you meant by "I don't numbers in the body of the paper" in your posting. I had interpreted it as meanbing that you did not want numbers in the citation call-outs. However, this interpretation may have been wrong.
    – Mico
    Commented Jul 26, 2020 at 1:00
  • @florin I would recommend using the biblatex package ` \usepackage[sorting=none]{biblatex}`. Here how to do it: tex.stackexchange.com/questions/51434/biblatex-citation-order
    – sdaza
    Commented Jul 26, 2020 at 6:22
  • @Mico, sdaza, numbers need to appear , but the order I want is that of citation in the text (This allows attempting to sort the papers in order of importance to the topic). I used sdaza's suggestion \usepackage[natbib=true, style=numeric, sorting=none]{biblatex} \bibliography{Pare37.bib} (in preamble). Funnily, no reference section appeared, and the names of references in the text were those assigned by me in the bib file
    – florin
    Commented Jul 26, 2020 at 7:09

You must log in to answer this question.

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