Skip to Main Content

BibTeX for LaTeX

This guide provides a brief overview of managing references in LaTeX using BibTeX. Follow the instructions to integrate BibTeX into your LaTeX documents, allowing you to cite sources and generate bibliographies.

How to generate a BibTeX file

You can create BibTeX records manually. It is also possible to automatically generate records by exporting reference details directly from databases, journal websites, Google Scholar or other search tools. You can also generate BibTeX files directly from your reference management software e.g. RefWorks, Zotero or EndNote.

Whether using MS Word or LaTeX to prepare documents, it is a good idea to use reference management software to capture, store and organise your references, all in one place. A list of selected references can easily be exported to create a BibTeX file ready to use with your LaTeX document.

Reference management and LaTeX data flow

Although using reference manager software seems like an additional step, doing this allows you the flexibility to create bespoke BibTeX files for each project while keeping your references in an organised library. It also allows you to create references using other programs, such as Word.

Reference management and LaTeX data flow

Exporting BibTeX files directly from search tools (with examples)

Many databases allow automatic export or download of references into BibTeX file(s). Major databases allow bulk export of selected records in one operation e.g. Web of Science Core Collection, Engineering Village and Scopus. Other databases allow the export of individual records e.g. DBLP.

The process is similar for most of these databases:

  1. Select items from a list of search results by ticking boxes or saving them to a working folder
  2. Choose the export, download or save option, and select BibTeX as the output format
  3. The .bib file will save automatically to your downloads

If the save option only gives a .txt file option. you can change the file extension to .bib

 

Example: Web of Science Core Collection

Screenshot illustrating steps 1-3 of how to export .bib file from Web of Science.

BibTeX records can be downloaded from major journal websites either from the article or issue web page or from search results. The process is similar to exporting from databases.

Example: a Science Direct (Elsevier) journal

  1. Search for the desired article
  2. Click on the article title to view the full text
  3. Click on Cite under the article title
  4. Select Export citation to BibTeX

Screenshot illustrating how to export .bib file from a Science Direct  journal

To export BibTeX citations from Google Scholar, you need to enable BibTeX in your settings:

Adding BibTeX Citation Links to Google Scholar

  1. Click on the menu icon and click on Settings
  2. Scroll down to the Bibliography Manager
  3. Under Citation Links options select BibTeX
  4. Save the changes

Screenshot illustrating steps 1-4 of how to BibTeX Citation Links to Google Scholar

 

Exporting BibTeX citations

Your search results should now include an option to generate a BibTeX record. 

  • Click on Import into BiBTeX to see the entry
  • Copy the BibTeX entry and paste it into your .bib file.

Screenshot of "Import to BibTeX" option in Google Scholar

 

Potential issues

When generating your BibTeX file, either from a database or journal directly or with the help of reference management software, you can come across some issues with formating. Here are some common problems:

  • Special LaTeX characters: characters like %, $, & included in your .bib file can cause errors during LaTeX compilation. Use your LaTeX editor to find and replace these, e.g. replace & with \&.

  • Notes field: imported records often include unnecessary information e.g. notes field. Exclude the notes field from your .bib file to improve reference quality. When using RefWorks, you can tidy up your references directly in RefWorks by using the Bulk Edit feature to clear selected fields. When exporting from Zotero, untick the notes field option when generating BibTeX file. 

  • Retaining capitalization: some bibliographic styles strip out capitalisation in fields such as the title field. This can be a problem when using acronyms. To fix the issue, edit the BibTeX file and enclose the specific text in curly brackets (whole not partial words) e.g. title={Study of incompressible {MHD} flow in a circular pipe}.