TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to use the amsplain bibliography style (or an identical appearing style), but the sources need to be sorted by order of first appearance in the document, not how they are arranged in the bibtext file. How can I do this?

share|improve this question
All the unsrt based styles produce the bibliography in order of appearance in text, but they will resort to the ordering in the .bib file if one has \nocite{*} in the document (for the remaining entries). – egreg Mar 6 '13 at 22:01

amsplain.bst can easily be modified to suppress the sort.

look for the line

FUNCTION {presort}

and further down,


comment out every line, inclusive, in that stretch of code.

then modify the header to acknowledge the file's origin, but remove any indication that ams might be responsible for maintenance or support, and rename the resulting file. (the lppl didn't exist when the ams*.bst files were created, or it would have been applied to this file; if any changes are made in the future, the lppl will be used.)

share|improve this answer

Your Answer


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.