How to Create Bibliographies with LaTeX

LaTeX is the best way to create technical documents. One of the reasons for this superiority is the possibility of creating bibliographies without much effort. Unlike traditional graphical editors like MS Word, which require external plugins or a lot of manual labor, LaTeX comes out of the box with a very mature solution for the creation of bibliographies in the most common styles.

To create a bibliography in LaTeX the most indicated solution is to use a bibtex file. Bibtex is a format that was created to store bibliographic references in a way that can be reused in more than one document. In this way, a writer doesn't need to retype bibliographic information in each document that references the same work. It becomes then just a matter of using the same bibliography file in each document that references it.

Creating a bibliography step by step

The sequence of steps necessary to create a bibliography is simple:

First, create a bibtex file with all references you want to use in the document. The separate file should follow a simple structure, that is used to differentiate between articles, books, and other types of documents. For example, to create a reference to an article you can type the following:

@article{DocumentKey,
 author = {Author1 \and Author2},
 title = {Title of the document},
 journal = {Where the article appeared},
 number = {issue number here},
 year = 2001
}

This is enough to have reference to a sample article in the document. Now that you have this information entered to the main document, you just need to insert a command \cite{DocumentKey} in any place where you may want the final reference to appear.

The next thing is to add the bibliography itself to the end of the document. This is done with the following commands: \bibligraphystyle{plain}, followed by \bibliography{fileName}. Notice that "fileName" here is the name of the bibtex file you created before.

When the document contains all the information described above, your next step is to run latex and bibtex to generate the bibliographic information. First run latex to export the required reference keys. Then, run bibtex on the same document to generate the bibliographic data. Finally, run latex again to incorporate the generated data into the dvi or pdf file.

If you need to make modifications to the bibliography file, you just need now to run bibtex and latex in sequence. If you add more references you also need to run the sequence of commands above to make sure that the information is correctly generated and incorporated into the final document.

Tags: bibliography, latex
Article created on 2012-09-05 14:29:55

Post a comment