30

How does LaTeX sort references as it is causing the first reference I have used to be numbered as [2] in the document rather than [1]. See below:

Technology has been introduced in various ways within healthcare applications to support the delivery of reminders [2]. One of the most prevalent approaches to date for the delivery of reminders has been through the use of mobile phones, especially within the domain of provision of support for persons with dementia [1, 3].

Ref [2] in this paragraph is the first reference in my .bib file, how can I get it to be shown as [1]?

\documentclass[a4paper,12pt]{article}
\begin{document}

Technology has been introduced in various ways within healthcare applications to support the delivery of reminders \cite{GatorTechSmartHouse}. One of the most prevalent appraches to date for the delivery of reminders has been through the use of mobile phones, especially within the domain of provision support for persons with dementia \cite{NextGenerationOfMobileMedicationManagementSolutions, VideoRemindersAsCognitiveProstheticsForPeopleWithDementia}.

\bibliographystyle{plain}
\bibliography{ref}
\end{document}

.bib file

@article{
GatorTechSmartHouse,
    Author = {S. Helal, W. Mann, H. El-Zabadani, J.King, Y. Kaddoura, E. Jansen},
    Title = {The {G}ator {T}ech {S}mart {H}ouse: a programmable pervasive space},
    Journal = {Computer},
    Volume = {38, No. 3},
    Pages = {50-60},
    Year = {2001}
}

@article{
NextGenerationOfMobileMedicationManagementSolutions,
    Author = {C.D. Nugent, D. Finlay, R. Davis, M. Mulvenna, J. Wallace, C. Paggetti, E. Tamburini, N. Black},
    Title = {The next generation of mobile medication management solutions},
    Journal = {International {J}ournal of {E}lectronic {H}ealthcare},
    Volume = {3, No. 1},
    Pages = {7-31},
    Year = {2007}
}

@article{
VideoRemindersAsCognitiveProstheticsForPeopleWithDementia,
    Author = {S. O'Neill, S. Manson, G. Parente, M.P. Donnelly, C.D. Nugent, S. McClean, B. Scotney, D. Craig},
    Title = {Video reminders as cognitive prosthetics for people with dementia},
    Journal = {Ageing {I}nternational},
    Volume = {36, No. 2},
    Pages = {267-282},
    Year = {2011}
}
0

1 Answer 1

49

If you need the bibliography sorted in order of appearance, use

\bibliographystyle{unsrt}

because the plain bib style sorts alphabetically by author.


As an aside: your bib entries are wrong. Authors should be separated by and rather than commas:

@article{
GatorTechSmartHouse,
    Author = {S. Helal and W. Mann and H. El-Zabadani and J. King and Y. Kaddoura and E. Jansen},
    Title = {The {Gator} {Tech} {Smart} {House}: a programmable pervasive space},
    Journal = {Computer},
    Volume = {38, No. 3},
    Pages = {50-60},
    Year = {2001}
}

Watch out for missing spaces between name (initials) and surname.

Also it's better to write {Tech} for keeping the uppercase, so kerning between T and e can be applied (which isn't if the input is {T}ech).

8
  • Thanks for that, as well as the other info. I was following a PDF I found on creating references which didn't mention those extra points, so thanks!
    – Colin747
    Commented May 6, 2013 at 16:46
  • 12
    +1 for kerning alert; elsewhere the converse is (ignorantly) proposed, good to know... Commented May 9, 2013 at 10:36
  • How to do this when I need to use an existing bibliography style (but can modify it)? (so I can't just use unsrt) Commented May 13, 2019 at 7:11
  • @HendyIrawan If you have to use a specific bib style, why would you want to change its choices about sorting?
    – egreg
    Commented May 13, 2019 at 7:22
  • @egreg a few possible reasons. For my purpose it was because of a "bug" in the style. Another reason is to create a style similar to an existing one but with some modifications. Some journals/proceedings use a style but with their own little overriding rules. Commented May 13, 2019 at 12:11

You must log in to answer this question.

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