3

I'm having some trouble with BibTeX. The code below makes references in author-year order, but for references with same author and year order is arbitrary. Any solution? Thanks :D

\documentclass{thesis}

\usepackage{indentfirst}
\usepackage{fancyhdr}
\usepackage{graphicx}
\raggedbottom
\usepackage[a4paper,top=4cm,bottom=4cm,left=3cm,right=3cm]{geometry}
\pagestyle{empty}

\usepackage[english]{babel}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{textcomp}
\usepackage[utf8]{inputenc}
\usepackage{microtype}
\usepackage{enumitem}

\bibliographystyle{siam}
\usepackage[numbers]{natbib}
\usepackage{chapterbib}

\frenchspacing
\usepackage{setspace}
\onehalfspacing




\newcommand{\cit}[1]{``#1''}
\makeatletter
\renewcommand\@biblabel[1]{}
\makeatother


\begin{document}
\cleardoublepage 
\nocite{*}
\renewcommand\bibsection{\subsection*{UNdocs}}
\bibliography{un}
\bibliographystyle{siam}


\end{document}

Entry examples:
@Proceedings{unmik2,
title = {On the Authority of the Interim Administration in Kosovo},
year = {1999},
address = {Pristina},
organization = {UNMIK [United Nations Interim Administration Mission in Kosovo]},
note = {U.N. Doc. UNMIK/REG/1999/1},
}

@Proceedings{unmik3,
title = {On the Appointment and Removal from Office of Judges and Prosecutors},
year = {1999},
address = {Pristina},
organization = {UNMIK [United Nations Interim Administration Mission in Kosovo]},
note = {U.N. Doc. UNMIK/REG/1999/7},
}

Here's two entry in the .bib file order. When I compile they appear in a random order while I'd like the imput order.

lockstep
  • 250,273
Lucas
  • 31
  • 1
    Welcome to TeX.SX! Please make your code compilable. The class and bibliography files are missing. – mvkorpel Aug 15 '14 at 16:28
  • It is! There're both class (thesis) and .bib file (bibliography=un). – Lucas Aug 15 '14 at 16:30
  • 1
    Could you give a couple of examples of bib entries whose sorting order isn't currently to your liking? Please also indicate what sorting order to do prefer in such cases. – Mico Aug 15 '14 at 16:53
  • Added examples! – Lucas Aug 15 '14 at 17:09
  • Thanks for posting a couple of example entries. The ordering performed by BibTeX is not random. First, note that both entries are missing a required field, viz., the author field. Note that the year of publication of both entries is the same, so that field doesn't offer a sorting clue either. Without an author, BibTeX will look to the title field to perform its sorting job. Since "Appointment" precedes "Authority", alphabetically speaking, entry unmik3 is typeset before entry unmik2. – Mico Aug 15 '14 at 18:19
  • Oh thanks, so obvious! However, proceedings entry has not an 'author' field. Any suggestion? Maybe I can change proceedings into another entry type! – Lucas Aug 15 '14 at 21:03
  • Sorry about the class file comment. For some reason it is not included in TeX Live, but I should have checked CTAN. (Anyway, the issue doesn't seem to depend on the document class.) – mvkorpel Aug 15 '14 at 21:46
  • 1
    You can change the order of entries in the output by adding invisible text to title fields (or whatever field is used for sorting in a particular bibliography style) as suggested in this answer. – mvkorpel Aug 15 '14 at 22:33
  • 1
    It works, thank you so much! I'll try with biblatex as well – Lucas Aug 16 '14 at 06:37

0 Answers0