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'm including the Bibliography to my thesis with the simple thebibliography environment provided by latex. Here is a sample of its content:

\begin{thebibliography}{39}

\bibitem{backprop}
                    Rumelhart David E., 
            Geoffrey E. Hinton 
                    and Ronald J. Williams. 
            \textit{``Learning representations by back-propagating errors.''} 
            Nature 323.6088 (1986): 533-536.

\bibitem{SIFT}      Lowe, David G. 
            \textit{``Distinctive image features from scale-invariant keypoints.''} 
                International journal of computer vision 60, no. 2 (2004): 91-110.

\end{thebibliography}

If I understood correctly the content of this page, the number 39 I put between the brackets corresponds to a certain style the bibliography should have. In particular 39 corresponding to alpha which you can find at page 39 of this pdf.

Nevertheless when I compile my document I will still continue to see the citations in the [1] style and not with the [CODE] one.

  • What is going wrong here?

  • Moreover, I'd like to know how are the codes computed from the citation, e.g.:

[KK90] K.S.Narendra and K.Parthsarathy. Identification and control of dynamical system using neural networks. IEENN, 1(1):4–27, 1990.

and where, if possible, can I find them on the web?

  • Is there a way to automatically alphabetically order the entries of the bibliography, or should I just pull up my sleeves and do it? ;)

Thanks in advance for any help you can provide.

share|improve this question
    
I think if you want the 'alpha' style, you need to use \bibliographystyle{alpha} --- which has nothing (necessarily) to do with the \thebibliography environment. –  jon Nov 23 '12 at 10:32
    
@jon - and where should I put it?in the bibliography part or in the intestation of document? –  Matteo Nov 23 '12 at 10:37

1 Answer 1

up vote 5 down vote accepted

You are confused.

LaTeX itself offers thebibliography environment: but it is rather a blunt instrument for preparing bibliographies, since it requires you to do things "by hand".

The common and correct way to prepare bibliographies is to make use of LaTeX in conjunction with an external program which uses data in a bibliography database to prepare and format the bibliography and references.

There are currently two approaches: bibtex, which is old, stable, well-supported by pre-written styles, relatively inflexible, and biblatex, which is modern and has all sorts of advantages over bibtex in many cases, but is more complex and less well-established.

In your case, since it looks as if bibtex will achieve what you need and since it is stable and well-understood, I'd stick with bibtex.

What you will need to do is this:

  1. First, you prepare a bibliography database file, which contains the author names, titles, dates etc of the works you want to cite, and attributes to each a "key". The sample database file on the page you cite is an illustration. These don't go in the LaTeX document, but in a separate file, with the suffix .bib, which you can keep in the same directory as your source file. In your case you might define:

    @Article{rumelhart86,
    author = {Rumelhart, David E. and Hinton, Geoffrey E. and  Williams, Ronald J.}, 
    title  = {Learning representations by back-propagating errors}, 
    journal = {Nature},
    volume = {323},
    number = {6088},
    year = {1986},
    pages = {533-536},
    }
    
  2. Next, you tell LaTeX two things. First you tell it what "style" to use in formatting the bibliography. You do this using the command \bibliographystyle{}. In your case, the style you want is alpha, so you put \bibliographystyle{alpha} in your document.

  3. Then, you use the command \cite{} to reference the works you wish to cite, using the keys you have defined. So, in your case, you might put \cite{rumelhart86}.

  4. At the place in your document where you want the bibliography to be generated, you put \bibliography{filename}, where filename is the name of your .bib file, without the extension. So if your .bib file is called mybibliography.bib, you would put \bibliography{mybibliography}

  5. Then the magic. Run LaTeX. Then run bibtex sourcefile (where sourcefile is the name of your LaTeX source file, not the bibliography database). Then run LaTeX again, twice, on the source file. The result, if all goes well, will be that you have a fully sorted bibliography, with all the labels and so forth generated for you.

If you re-read the page you have referred to, you will find it's quite well explained there. The canonical sources for further reading are Tame the Beast and bibtexing, which you can get by typing texdoc btxdoc on your system.

share|improve this answer
    
wow, thks for the really detailed explanation!I'll follow your advice and hope to get it working... ;) –  Matteo Nov 23 '12 at 10:59
    
The magic is working...thks a lot!! –  Matteo Nov 23 '12 at 11:11

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.