2

I'm writing a thesis report and I'm using natbib and unsrtnat for my bibliography.

My problem is the bibliography is sorted by order of citation, and I would like to have it sorted by alphabetical order.

This is a minimum viable example :

\documentclass[12pt]{book}
\usepackage[sort,comma,authoryear,round]{natbib}
\usepackage{hyperref}
\usepackage{url}
\usepackage[english,french]{babel}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}

\usepackage{lipsum}

\usepackage{tgtermes}
\usepackage[a4paper]{geometry}

\geometry{left=3cm,right=3cm,top=2.5cm}

\usepackage{lmodern}
\rmfamily
\DeclareFontShape{T1}{lmr}{b}{sc}{<->ssub*cmr/bx/sc}{}
\DeclareFontShape{T1}{lmr}{bx}{sc}{<->ssub*cmr/bx/sc}{}

\usepackage{amssymb,amsmath,amsthm,amscd}
\usepackage{mathrsfs}
%
\usepackage{subfig}
%
\usepackage{lmodern}
\usepackage{setspace}
\usepackage{epigraph}

%% Style des chapitres
\usepackage[Lenny]{fncychap}
\usepackage[french]{minitoc}
\usepackage{minitoc}

%% ces deux commandes pour num�roter les subsubsections
\setcounter{secnumdepth}{4} 
\setcounter{tocdepth}{4}
%\setcounter{secnumdepth}{4}          % Profondeur du table de mati�re 
\usepackage{todonotes}
%
%\usepackage[table]{xcolor} % pour coulorer les tableaux
\usepackage[linesnumbered,ruled,vlined]{algorithm2e}
\usepackage{booktabs}
\usepackage{multirow}

% Eviter les hyphenations
\hyphenpenalty=10000

% Boîtes ombrées
\usepackage{shadow}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%Pour la page de garde
\usepackage{tabularx}
\usepackage{calc} 
\usepackage{graphicx} 
\usepackage{longtable}

\usepackage[nottoc]{tocbibind}
\usepackage{makeidx}
\makeindex

%\input{macros}
%\input{macrosmath}
\begin{document}

Hello \citet{McCandless2016}

Hello \citet{IBM2017}

Hello \citet{Salles2013}

Hello \citet{BioSpace2017}

Hello \citet{Haag2006}

Hello \citet{Dousset2003}

Hello \citet{Ghalamallah2009}

Hello \citet{McGonagle2012}

Hello \citet{Wilensky2015}

Hello \citet{Casselman2011}



\renewcommand{\bibname}{Références bibliographiques}
\bibliography{Bibich}
\bibliographystyle{unsrtnat}
\end{document}

And this is the result :

Citation :

Citation

Bibliography :

Bibliography

What should I do ?

I have already added the sort option but it doesn't seem to work.

1
  • 2
    unsrtnat explicitly does not sort bib entries. Apr 10, 2018 at 18:07

1 Answer 1

7

Instead of the unsrtnat bibliography style that sorts its entries by order of citation and works best with a numeric citation style, you can use the plainnat style, that sorts the entries alphabetically:

\documentclass{article}
\usepackage[comma,authoryear,round]{natbib}
\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
  @book{Knu86,
    author = {Knuth, Donald E.},
    year = {1986},
    title = {The \TeX book},
  }
    @book{test,
    author = {Author, Test},
    year = {1986},
    title = {example book},
    }
\end{filecontents}

\begin{document}
\cite{Knu86} \cite{test}
\bibliographystyle{plainnat}
\bibliography{\jobname}
\end{document}

natbib's sort option refers to the citations in the text. It 'orders multiple citations into the sequence in which they appear in the list of references' (from the natbib manual, chapter 5 package options, page 22)

1

You must log in to answer this question.

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