Skip to Main Content

MIT Libraries logo

MIT logo Search Account

Citation Management and Writing Tools: LaTeX and BibTeX

A guide describing software to help with citation management, writing, and other parts of the research process.

Contents

LaTeX & BibTeX

What is LaTeX?

LaTeX is a typesetting program that takes a plain text file with various commands in it and converts it to a formatted document based on the commands that it has been given. The source file for the document has a file extension of .tex. It is widely used at MIT for theses and other technical papers due to its prowess with mathematical and foreign characters. For more information on LaTeX, see LaTeX on Athena Basics, provided by the Athena On-Line Help system.

What is BibTeX?

BibTeX is a bibliographic tool that is used with LaTeX to help organize the user's references and create a bibliography. A BibTeX user creates a bibliography file that is separate from the LaTeX source file, wth a file extension of .bib. Each reference in the bibliography file is formatted with a certain structure and is given a "key" by which the author can refer to in the source .tex file. For more information on BibTeX, see see MIT IS&T's page: How do I Create Bibliographies in LaTeX.

Overleaf at MIT

If you're new to LaTeX/BibTeX, consider using Overleafan online LaTeX and Rich Text collaborative writing and publishing tool. It includes built-in features to link your Zotero or Mendeley library to your LaTeX document.

MIT Libraries provides Overleaf Pro+ accounts for all MIT faculty, students and staff. Learn more on how to get started with Overleaf.

Zotero & BibTeX

Export from Zotero to BibTeX

  1. To export all of the references in a certain library to BibTeX, either
    • click on the File menu in Zotero and select "Export Library..." or
    • right-click on the library and select "Export Library..."
  2. To export all references in a collection, right-click on the collection in the left-hand menu and select "Export Collection..."
  3. To export only certain references, select those references using control-clicks and/or shift-clicks, then right-click one of the highlighted references and select "Export Items..."
  4. From the dialog box that pops up, select the BibTeX format, and click OK.
  5. Navigate to the directory where you are storing your manuscript (your .tex file), and save the file. This will generate a file in the appropriate format for BibTeX to read and create a bibliography from.

Auto-syncing from Zotero to BibTeX

Auto-updating your .bib file when you make changes or additions to your Zotero Library is not available directly in Zotero. You can, however, install and enable a Zotero extension, Better BibTeX, to enable these features. 

  1. Once Better BibTeX is enabled, select the folder/library/items you wish to include in your .bib file as you would do in the basic export process described above.
  2. In the export dialog box, you will now see many more options for your export format. Select the “Better BibTeX” option, and, to set up the auto sync, make sure you also check the “Keep updated” box.
  3. Click Ok, name your .bib file and save in the same location as your LaTeX file.

You can adjust or remove a .bib auto sync of Zotero records at any time by going to your Zotero preferences and clicking on the Better BibTeX tab, followed by the Automatic export tab.

For more detailed instructions on setting up your Zotero export, see the Zotero and BibTeX Quick Guide.

Linking with Overleaf

In Overleaf, you can link your entire library or a Group library to your Overleaf project. This link allows you to have synced records with Zotero while actively accessing them in Overleaf. More information on linking your Zotero and Overleaf accounts may be found on this Overleaf How-To Guide.

Mendeley & BibTeX

Export to BibTeX

  1. Within your Library in Mendeley Reference Manager, select the references that you would like to export to BibTeX.
  2. In the dropdown menu in the toolbar at the top of the screen, click File > Export All > BibTeX (*.bib)
  3. Make sure you save your BibTeX file to the same location as your LaTeX file.

Linking with Overleaf

In Overleaf, you can link your entire library or a subset of your records to your Overleaf project. This link allows you to have synced records with Mendeley while actively accessing them in Overleaf. More information on linking your Mendeley and Overleaf accounts may be found on this Overleaf How-To Guide.

JabRef & BibTeX

If you primarily create documents in LaTeX (versus a word processing software like Microsoft Word) you may want to consider using JabRef as your primary citation management software.

JabRef is a reference manager that acts as an interface to the BibTeX style used by the LaTeX typesetting system. JabRef is open source and is freely downloadable. The graphical interface allows the user to easily import, edit, search, and group citations in the BibTeX format. It also offers automatic citation key generation. JabRef does not offer any citation styles of its own; instead the citation is generated from the BibTeX file by LaTeX. Specifications for each style are given by the chosen style file.

JabRef can be used on Windows, Linux, and Mac.

For more detailed instructions on setting up JabRef as your LaTeX citation management software, see the JabRef Getting Started guidance.

Get help with LaTeX and BibTeX