Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am using amsalpha with bibtex. It seems to me that the order of the citation is alphabetical with respect to the keys.

Would it be possible to change it to alphabetical with respect to the authors?

I give an example. Supposes we have

[CD13] Cat and Dog, ...

[CH13] Cow and Horse, ...

[CL13] Cat and Lion, ...

I would rather have

[CD13] Cat and Dog, ...

[CL13] Cat and Lion, ...

[CH13] Cow and Horse, ...

Thanks! :)

share|improve this question
1  
Welcome to TeX.SE! –  cmhughes Mar 3 '13 at 23:48
3  
The rationale is that a reader will look for the label, rather than the authors. –  egreg Mar 3 '13 at 23:53
    
cmhughes: Thank you! :) @egreg sorry I am not sure I understand –  Mr Woody Mar 4 '13 at 20:05
    
@MrWoody When the reader wants to look up a reference, he knows the label, say CD13, from the text. Thus, it is better the bibliography is sorted by labels. –  mafp Mar 5 '13 at 17:10

1 Answer 1

up vote 1 down vote accepted

First, I don't think it is a good idea to sort by author names. If someone reads your text and finds a citation label CD13, she quickly wants to find that in the bibliography, so the bibliography should be sorted by labels.

That being said, for purely didactical reasons your scheme can be implemented as follows:

  1. Make a copy of amsalpha.bst, say amsalpha2.bst, and place it somewhere where BibTeX can find it.
  2. Open amsalpha2.bst with an editor, and locate the function FUNCTION {presort}
  3. Comment out the four lines as indicated:

    FUNCTION {presort}
    { calc.label
      %sort.label   %% commented out
      %"    "       %% commented out
      %*            %% commented out
      type$ "book" =
      type$ "inbook" =
      or
        'author.editor.sort
        { type$ "proceedings" =
        'editor.organization.sort
        { type$ "manual" =
            'author.organization.sort
            'author.sort
          if$
        }
          if$
        }
      if$
      %*              %% commented out
      "    "
      *
      year field.or.null sortify
      *
      "    "
      *
      title field.or.null
      sort.format.title
      *
      #1 entry.max$ substring$
      'sort.key$ :=
    }
    

That way, the author names will be the top sort criterion if present, not the labels. You can now use amsalpha2 as your bibliography style.

share|improve this answer
    
Thanks very much! :) –  Mr Woody Mar 7 '13 at 20:16

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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