Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I added the \input{references} line to the end of my Journal.tex file like so:

\input{references}
\end{document}

However, the references that are being outputted are not in order of citation. Rather, they are in the order that the citations are defined in the references.tex file. I did try adding the unsrt command as such

\begin{thebibliography}{99.}
\bibliographystyle{unsrt}

but no luck... I also tried deleting the aux files and stuff, but no cigar...

I am brand new to latex, so please help me out here! Thanks! I am not using the command line, but using TexnicCenter instead.

EDIT:

A snippet of my reference.tex class (sorted alphabetically).

\begin{thebibliography}{99.}

\bibitem{alexander87} Alexander, R. D., The Biology of Moral Systems, New York: Aldine de Gruyter (1987)
\bibitem{axelrod80a} Axelrod, R.: Effective choice in the iterated prisoner's dilemma, J. Confl. Resolut., vol. 24, pp. 3-25 (1980)
\bibitem{axelrod80b} Axelrod, R.: More effective choice in the prisoner's dilemma, J. Confl. Resolut., vol. 24, pp. 379-403 (1980)
\end{thebibliography}

What I want

..... no such cause [1].

what I get

..... no such cause [13].

FURTHER EDIT:

\documentclass[graybox]{svmult}

\usepackage{mathptmx}         % selects Times Roman as basic font
\usepackage{helvet}           % selects Helvetica as sans-serif font
\usepackage{courier}          % selects Courier as typewriter font
\usepackage{type1cm}          % activate if the above 3 fonts are not available on your system
\usepackage{makeidx}          % allows index generation
\usepackage{graphicx}         % standard LaTeX graphics tool when including figure files
\usepackage{multicol}         % used for the two-column index
\usepackage[bottom]{footmisc} % places footnotes at page bottom
\usepackage{float}            % places the float image at precisely the location in the LaTeX code
\usepackage{verbatim}         % for multiline comments
\usepackage{subfigure}

\makeindex 
\setcounter{secnumdepth}{5}   % for subsubsub sections (if any)
\begin{document}

\title*{Some random title.}

\author{Ockham}

\maketitle

\section{Introduction}
\label{sec:intro}

blah blah.........

\input{references}
\end{document}
share|improve this question
    
Generating a sorted bibliography involves further steps. Do you use biblatex? –  uli Dec 5 '11 at 19:55
1  
Please add a minimal working example (MWE) that illustrates your problem. It's not clear here whether you are writing your bibliography by hand or using BibTeX, for example. –  Joseph Wright Dec 5 '11 at 19:55
    
@Joseph thanks, i have edited my answer accordingly... –  OckhamsRazor Dec 5 '11 at 19:59
2  
@OckhamsRazor No, that's not a MWE. We want something that starts \documentclass and ends \end{document}, and which is compilable. –  Joseph Wright Dec 5 '11 at 20:01
1  
@OckhamsRazor: We don't need more stuff, but all (and only) the relevant stuff. To keep it short: You \input a references file. Is this file called references.tex and, more important, does it contain a handmade thebibliography environment? –  lockstep Dec 5 '11 at 20:20

1 Answer 1

up vote 6 down vote accepted

There are two strategies to get references sorted in citation order.

1. Manual You add the bibliography items in a file which starts as

\begin{thebibliography}{99}

and ends with

\end{thebibliography}

You have to add the items exactly in the order you want, in the \bibitem{...}... form you showed in your question. Then you say, where the bibliography should appear,

\input{references}

Alternatively, you can include the whole thebibliography environment in the document. The number represents the maximum number of digits, so 99 is good for 10 to 99 items.

2. Automatic You prepare a references.bib file where you define your bibliography items in the following form

@book{alexander87,
  author={Alexander, R. D.},
  title{The Biology of Moral Systems},
  publisher={Aldine de Gruyter},
  address={New York},
  year={1987},
}
@article{axelrod80a,
  author={Axelrod, R.},
  title={Effective choice in the iterated prisoner's dilemma},
  journal={J. Confl. Resolut.},
  volume={24},
  year=1980,
  pages={3-25},
}

You prepare your manuscript and, where the bibliography should appear, you write

\bibliographystyle{unsrt}
\bibliography{references}

A run of the external program BibTeX will read the references.bib file and extract the relevant information, producing a file with extension .bbl that LaTeX will later input. After running BibTeX a couple of runs of LaTeX are necessary.

How you run BibTeX depends on the TeX environment you use (editor, distribution, operating system).

share|improve this answer

Your Answer

 
discard

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.