I am using the natbib package with the dcu style and my bibliography is displayed in alphabetical order. I was wondering if it is possible to change that and to number my references in the order where they appear in the text instead without changing the style? This style matches exactly the requirements I have and I don't really want to rewrite my whole bibliography to get kind of the same result using the unsrtnat style...

  • Welcome to TeX.SE. – Mico Dec 30 '19 at 17:48

I suggest you proceed as follows:

  • Find the file dcu.bst in your TeX distribution. Make a copy of this file and call the copy, say, dcu-nosort.bst.

  • Open the file dcu-nosort.bst in a text editor.

  • Comment out all three instances of SORT. In my copy of the bst file, they occur on lines 1239, 1311, and 1344.

  • Save the file dcu-nosort.bst either in the directory where your main tex file is located or in a directory that's searched by BibTeX. If you choose the latter method, be sure to update the filename database of your TeX distribution suitably.

  • In your main tex file, change the instruction \bibliographystyle{dcu} to \bibliographystyle{dcu-nosort} and perform a full recompile cycle (LaTeX, BibTeX, and LaTeX twice more) to fully propagate all changes.

Happy BibTeXing!

| improve this answer | |
  • 1
    That worked perfectly, thank you very much! – Guili Dec 30 '19 at 16:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.