Documentation/Citations & Bibliography/How to Sort Your Bibliography by Appearance or Alphabetically in LaTeX
Citations & Bibliography

How to Sort Your Bibliography by Appearance or Alphabetically in LaTeX

Different journals and style guides require different bibliography sorting. Some want references sorted by order of appearance (numbered [1], [2], [3]...), others alphabetically by first author. Here's how to control this.

Sort by Order of Appearance (BibTeX)

Use the 'unsrt' bibliography style for numbered references in citation order:

% References appear in the order you first cite them:
\bibliographystyle{unsrt}
\bibliography{references}

% If using natbib:
\usepackage[numbers,sort&compress]{natbib}
\bibliographystyle{unsrtnat}
\bibliography{references}

% Result: [1] first-cited paper, [2] second-cited, ...

Sort Alphabetically by Author (BibTeX)

Use 'plain' or 'alpha' for alphabetical sorting:

% Alphabetical by author, numbered:
\bibliographystyle{plain}

% Alphabetical with author-year labels like [Smi24]:
\bibliographystyle{alpha}

% With natbib for author-year:
\usepackage{natbib}
\bibliographystyle{plainnat}

Sort Control with BibLaTeX

BibLaTeX gives you fine-grained sorting control:

% Sort by author, then year, then title (default):
\usepackage[sorting=nyt]{biblatex}

% Sort by order of citation (like unsrt):
\usepackage[sorting=none]{biblatex}

% Sort by year descending, then author:
\usepackage[sorting=ydnt]{biblatex}

% Available sorting schemes:
% nty  = name, title, year (default)
% nyt  = name, year, title
% none = citation order
% ydnt = year (descending), name, title

💡 Tips

  • Check your target journal's requirements — most specify the expected sort order
  • IEEE/ACM typically want citation-order (unsrt); APA wants alphabetical
  • BibLaTeX's sorting=none is equivalent to BibTeX's unsrt style
  • If using BibLaTeX, run 'biber main' instead of 'bibtex main'

Try This in Bibby AI

Write LaTeX faster with AI auto-complete and instant compilation.

Start Writing Free

Related Tutorials

How to Sort Your Bibliography by Appearance or Alphabetically in LaTeX | Bibby AI