Using the bibliography in your LATEX document

To actually use the bibliography in your paper, you need to add the following commands in your LATEX file (these commands are usually can be found at the end of the document - where the References section to appear):


Here, foo is the name of your bib file created with KBibTeX and plain is the name of bibliography style.

There is a plenty of specific bibliography styles. Please consult your publisher for the one to choose or try and find the one that suits the best for your purposes.

Below is a list of some generic styles available everywhere:


normal style, listed in alphabetic order and labeled numerically


same as plain except entries appear in order of citation


same as plain except entry identifiers are used


same as plain except uses abbreviations for first names, month names, and journal names

So you can use your LATEX editor's capabilities (please consult the editor documentation for this) or just enter the following code in a generic text editor then save the file with tex name extension.

 \bibliographystyle{plain}% Choose a bibliographic style
 Test file with a reference (see~\cite{Lamport86}).

For our testing purposes, let this file be named example.tex.


Please save this file to the same folder as your example.bib.

Now that you have the basis for a document, you have to run both latex and bibtex to process it.

First, you should run latex (to create a foo.aux file, which bibtex reads). Then run bibtex once to get some of the citations and create a bbl file. Then run latex again so that the cross references between the text file and the bibliography are correct. You may want to repeat running bibtex and latex on the file to make sure that all cross references are correct. Be warned that adding/deleting citations and sources will require running bibtex again.

Thus, the following commands can be used to compile the document from console:

latex example
bibtex example
latex example
latex example


If you are using some advanced LATEX shell like Kile or LyX, there is no need to worry about running all these commands from console emulator. Just use a hot key (Alt+6 in Kile) or a toolbar button to see the results.

Now, you can see the results as a DVI or PDF file (the format depends on your configuration), stored in the same folder as your source files.


Congratulations! You have just created your first document with BibTEX bibliography.