Skip to Main Content

LaTeX document preparation system

Bibliography Management with bibtex

BibTeX is a tool used to format lists of references in LaTeX documents. It helps to organize and automate the bibliography process. If you are using citation management software (like Zotero, EndNote, Mendeley, etc.), these programs allow you to create a .bib file of your library. Here's a quick guide to get you started. We need at least the following two files to create bibliography.

  1. BibTeX Database File (.bib):

    • Stores your references.
    • Each entry has a unique key and a specific type (e.g., article, book, etc.).
  2. LaTeX Document (.tex):

    • Includes the bibliography section and cites references using keys from the .bib file.

You can either manually store your references in .bib file. Alternatively, you can use citation management software to create a .bib file. We are going to show both ways.

1. Manually entering references to your .bib file

A .bib file contains entries that look like this. For instance, we can create the following journal article citation for Albert Einstein's article:

@article{einstein1905,

author = {Albert Einstein},

title = {Zur Elektrodynamik bewegter K{\"o}rper},

journal = {Annalen der Physik}, year = {1905},

volume = {322},

number = {10},

pages = {891--921},

doi = {10.1002/andp.19053221004}

}

Manually creating a .bib file involves writing the BibTeX entries yourself. Here’s how to do it:

  • Open a text editor and create a new file with a .bib extension (e.g., references.bib).
  • Add your references using the appropriate BibTeX entry types and fields.

Or, you can copy and paste bibtex format from Google scholars using the bibtex option. For instance,

  • Go to Google Scholar, and find the scholarly work you want to cite
  • Click on Cite
  • Then, click on BibTex

This will open a new page for you to copy and paste your bibtex code:

Doing this manually can be overwhelming, especially if you are working with large projects like dissertation or book. So, relying on citation management software is super useful.

2.  Citation management software and .bib file

Citation management software can simplify the process of creating and maintaining a .bib file. Here’s a quick overview of how to use some popular tools:

  • Zotero:

    • Add references manually or import them using browser extensions.

    • Select the references you want to export, then choose Export from the File menu and select BibTeX as the format.
  • Mendeley:

    • Add references manually or import them from online databases.

    • Go to File -> Export and choose BibTeX as the format to export your references to a .bib file.

Using citation management software can save time and reduce errors, especially when dealing with large numbers of references.

Citation and References in Text

Once you make sure that you have the necessary scholarly works that you want to cite in the .bib file, you can start citing them within your article.

You have to make sure that you add your .bib file to LaTeX document so that it knows where to look at for these citations.

  1. Add the .bib File to Your LaTeX Document:

\bibliographystyle{plain} % or any other style you prefer

\bibliography{references} % references.bib is your BibTeX file

  1. Cite References in Your Document:

We are going to use the \cite{key} command to cite references.

According to \cite{einstein1905}, the theory of relativity is revolutionary.

Example LaTeX Document

\documentclass{article}

\usepackage{cite}

\begin{document}

\section{Introduction} Einstein's work on relativity \cite{einstein1905} is foundational.

\bibliographystyle{plain}

\bibliography{references}

\end{document}