4

I am using the package natbib with \bibliographystyle{abbrvnat} which produces almost exactly what I want (I can switch by between \cite , \citet ...etc), however, I am facing the following two problems:

  1. References are not appearing in order of appearance. I can use \bibliographystyle{unsrtnat} but then, references will show the complet first and last name, which I don't want.
  2. References are shown in the format :

    L1. FamilyName1, L2. FamilyName2. Reference Tile. Journal Name, year.

    which I want to switch, so instead, I want to get:

    FamilyName1.L1 , FamilyName2.L2 . Reference Tile. Journal Name, year.

Does anyone have an idea?

4
  • @mico, from your suggestion, I understand that the original package does not accept any options to do what I want? Thanks anyway for the hit, will do, and let you know about the outcome Commented Aug 5, 2014 at 14:33
  • @Mico , weired, but I cannot locate the file abbrvnat.bst although when I use it as a \Bibliographystyle it compiles successfully !? Commented Aug 5, 2014 at 17:55
  • @Mico thanks, I found it and it's working except it is not ordering references in order of appearance. Can you please tell me how to do that? Commented Aug 5, 2014 at 19:32
  • @Mico it's working! could you please copy your comment to an answer so I can rate it and change the thread to solved please? Commented Aug 6, 2014 at 7:06

1 Answer 1

3

You're posting contains two parts. The answers to both parts involve editing a copy of the bibliography style -- here, abbrvnat.bst. Begin by finding the file abbrvnat.bst in your TeX distribution and making a copy called, say, myabbrvnat.bst. (Do not edit a file from the TeX distribution directly.) Use any text editor you're familiar with to do the editing; the editor you use for your tex files will do fine. As I show below, the required edits happily to be minor and thus easy to apply.

  • Q1: How to change the listing of the bibliography items from being sorted alphabetically to being listed in the order they're cited in the body of the document?

    A1: In the file myabbrvnat.bst, find the two lines that start with SORT (uppercase is relevant). Comment out these lines -- or, if you prefer, just delete them.

  • Q2: How to change the typesetting of the author's name (or authors' names) from

    FirstNameInitial(s)1 FamilyName1[, FirstNameInitial(s)2 FamilyName2][, ...]

    to

    FamilyName1, FirstNameInitial(s)1[, FamilyName2, FirstNameInitial(s)2][, ...]

    A2: To invert the order of given names and surnames of authors, find the string

    "{f.~}{vv~}{ll}{, jj}" 
    

    (located in the function format.names, most likely on line 222) and change it to

    "{vv~}{ll}{, jj}{, f.}"
    

Save the file myabbrvnat.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 appropriately.

And, in your main tex file, change the instruction \bibliographystyle{abbrvnat} to \bibliographystyle{myabbrvnat} and run LaTeX, BibTeX, and LaTeX twice more to fully propagate all changes.

You must log in to answer this question.

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