> For the complete documentation index, see [llms.txt](https://docs.overleaf.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.overleaf.com/citing-and-references/library.md).

# Library

Your Library gives you one place to manage your reference data, shared across every project. Add an entry once, include it in any project using citation commands. When you cite an entry from the Library, the required data will be copied into your project .bib file.&#x20;

<figure><img src="/files/rcgQZEXdm0d6q1TrjbcX" alt="a diagram showing reference data going into the Library from external sources and being shared in multiple project .bib files." width="563"><figcaption></figcaption></figure>

When working on a project, you can quickly add references from your library to your project .bib file. Each of your project .bib files only contains the entries that are needed for the specific project

### Overview of how to use the Library

{% stepper %}
{% step %}
In the Library, add reference data by:

1. pasting BibTeX/BibLaTeX source from reference databases and journal websites,
2. entering DOIs to obtain full bibliographic data, or
3. uploading existing .bib files.
   {% endstep %}

{% step %}
Within your projects, use citation LaTeX commands to automatically see references from your Library that you can add.

{% hint style="success" %}
Adding entries from the Library will add the corresponding reference data to your project .bib file.
{% endhint %}
{% endstep %}
{% endstepper %}

## Accessing your Library

You can access your Overleaf Library from the sidebar of your project dashboard at <https://www.overleaf.com/project> by clicking **Library**. The Library can also be accessed directly at <https://www.overleaf.com/library>.

<figure><img src="/files/dl3uS5avmUjF8EgMUxOj" alt="The location of the Library button on the side panel of the project dashboard is above the Trash button and below the list of available project tags." width="204"><figcaption></figcaption></figure>

{% hint style="info" %}
**Using a two-tab workflow**

When doing heavy literature review or initial setup, you can keep the Library open in one browser tab and your active project in another. This lets you quickly drop new papers into your Library and immediately cite them in your project without losing your place in the editor.
{% endhint %}

## Library benefits

The Library provides a new way to work with reference data. This short section describes a few reasons to consider using the Library and how to benefit from it.

* **Form-based or code-based data entry**: You can choose to add references using the form entry fields, paste pre-formatted BibTeX or BibLaTeX entries directly into the Library, or upload an existing `.bib` file.
* **Error prevention**: Using the Library ensures correct BibTeX or BibLaTeX syntax, avoids duplicate entries, and helps identify errors by keeping references discoverable and readable.
* **Support for flexible workflows**: Using the Library doesn’t stop you from directly editing a project `.bib` file or from importing references from Dimensions, ReadCube, Zotero, Mendeley, or other sources.
* **Large collections remain readable and editable**: Large `.bib` files can become difficult to maintain, and in some cases, exceed Overleaf's editable file limit. The Library features a search function that allows you to easily find specific references even in large reference data collections.
* **Smoother compiling**: A large project \``.bib` file with unused entries can increase the time the LaTeX compiler takes to parse and search for references. A smaller, well-maintained project `.bib` file that draws selected references from the Library helps projects compile more quickly and reliably.
* **A continuous workflow**: Unlike a standard project `.bib` file that might get buried after a paper is complete, the Library exists independently within an Overleaf account. This means you can continually save, organize, and tweak references during a literature review, even before creating a new project to write in.
* **An accessible knowledge hub**: The Library is designed to act as a central hub for reference data, built to add references from popular databases and publisher sites using their provided BibTeX or BibLaTeX formats. Because it isn't tied to any single document, the Library serves as the perfect place to collect interesting papers between semesters, during lab meetings, or while reading on the weekend. When it is time to start writing, all reference data is waiting and ready to be cited.
* **A LaTeX-first approach**: The Library stores all references natively in BibTeX or BibLaTeX format. This allows for LaTeX-aware validation and error correction, helping to ensure that references are displayed accurately in LaTeX documents without the need for complex formatting workarounds.

## BibTeX and BibLaTeX

Reference data used in LaTeX projects is stored in BibTeX format, and can also use BibLaTeX conventions for types and fields. You can choose to work directly with the underlying BibTeX and BibLaTeX structure, or use the form editor to hide the code details when adding, editing, or managing your reference data.&#x20;

This example reference entry shows the BibTeX code for a book, and illustrates typical BibTeX and BibLaTeX format:

```bibtex
@book{austen1813pride,
  author    = {Austen, Jane},
  title     = {Pride and Prejudice},
  year      = {1813},
  publisher = {T. Egerton},
  address   = {London},
}
```

All entries begin with an `@` symbol, followed by an entry type (for example, `@book`). After the entry type is an opening brace `{`, the citation key, and a comma. This is followed by a series of key-value pairs that provide the reference data for the work, all wrapped up with a closing brace `}`.

In a project, reference data is collected together in BibTeX or BibLaTeX format in one or more `.bib` files. The `.bib` files act as databases for your references. You access this data in your LaTeX documents using a citation command together with the citation key for the reference that you wish to cite.&#x20;

When you bring references into your project  `.bib` file, you can again work with the raw format in the **Code Editor** or use the **Visual Editor** when working with your  `.bib` file.&#x20;

To learn how to cite and create lists of references in LaTeX, please see Overleaf's [LaTeX learning documentation](https://www.overleaf.com/learn), which provides overviews of how to use the BibLaTeX, BibTeX, and natbib (based on BibTeX) referencing systems.

<table data-view="cards"><thead><tr><th align="center"></th><th data-hidden data-card-cover data-type="files"></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td align="center"><a href="https://www.overleaf.com/learn/latex/Bibliography_management_in_LaTeX">Using bibLaTeX</a></td><td><a href="/files/e5k0ENRGmdlMvTFDSTAs">/files/e5k0ENRGmdlMvTFDSTAs</a></td><td><a href="https://www.overleaf.com/learn/latex/Bibliography_management_in_LaTeX">https://www.overleaf.com/learn/latex/Bibliography_management_in_LaTeX</a></td></tr><tr><td align="center"><a href="https://www.overleaf.com/learn/latex/Bibliography_management_with_natbib">Using natbib</a></td><td><a href="/files/e5k0ENRGmdlMvTFDSTAs">/files/e5k0ENRGmdlMvTFDSTAs</a></td><td><a href="https://www.overleaf.com/learn/latex/Bibliography_management_with_natbib">https://www.overleaf.com/learn/latex/Bibliography_management_with_natbib</a></td></tr><tr><td align="center"><a href="https://www.overleaf.com/learn/latex/Bibliography_management_with_bibtex">Using bibTeX</a></td><td><a href="/files/e5k0ENRGmdlMvTFDSTAs">/files/e5k0ENRGmdlMvTFDSTAs</a></td><td><a href="https://www.overleaf.com/learn/latex/Bibliography_management_with_bibtex">https://www.overleaf.com/learn/latex/Bibliography_management_with_bibtex</a></td></tr></tbody></table>

## Adding reference data to the Library

There are several options for adding data to the Library. You can paste references in from sources like Google Scholar, arXiv, Crossref, and many others. You can also paste in entries from your existing  `.bib` files, upload entire  `.bib` files, or enter data manually in an easy to use form. Use the **Add** button at the top right of the Library page to see a list of options for adding references.

<figure><img src="/files/StcxF0Gx1VrKWA5v8LCe" alt="Menu options fro the Add button on the Library showing options to Paste BibTeX and DOI entries, upload a .bib file, or enter a reference manually." width="308"><figcaption></figcaption></figure>

When pasting in BibTeX or BibLaTeX code or Digital Object Identifiers (DOIs), click the **Preview** button to check the reference, then **Save**.

<figure><img src="/files/IpUpYGxIfioFszX4PhuQ" alt="Add references pane with a bibTeX entry, showing the preview screen"><figcaption><p>Adding and previewing a single reference</p></figcaption></figure>

### Adding multiple entries

You can paste many entries from an existing bib file into the "Add reference" dialog. After clicking the Preview button, you will have the opportunity to select which entries you wish to add to your Library.<br>

<figure><img src="/files/q5c4twfsGC8DjH0PBRna" alt="Add references pane with several bibTeX entries, showing the preview screen displaying the list of entries from the bibTeX code"><figcaption><p>Adding and previewing multiple references</p></figcaption></figure>

If you have an existing `.bib` file that you wish to include in your Library, you can choose the Upload `.bib` file option from the Add button menu. When adding a bib file, you will be provided with options for which entries to add.

{% hint style="warning" %}
**Troubleshooting missing entries when pasting or uploading a  `.bib` file**

When confronted with syntax errors in a bib file, the Library may skip over entries that are missing a bracket or that have other errors. Please check your original source file for errors if you are missing entries when importing.
{% endhint %}

### Digital Object Identifiers (DOIs)

You can add the data for a reference to the Library simply by providing its Digital Object Identifier (DOI).  DOIs provide a compact, permanent way to point to publications, or publication data, on the internet.

Journal pages and websites that do not directly or easily provide BibTeX data directly will often provide DOIs for resources they host. The Library provides an **add by DOI** option that will allow you to add all the reference data for a given source to the Library simply by providing its DOI.

When providing a DOI, you can either provide just the identifier itself (recommended), or the full URL at doi.org.

* An example DOI URL: `https://doi.org/10.47397/tb/47-1/tb145wright-ltx-talk`
* the DOI itself : `10.47397/tb/47-1/tb145wright-ltx-talk`

If the Library fails to find the publication data at doi.org for a value that you have provided, you'll see a warning "Some or all DOIs could not be resolved" after clicking on the "preview" option.

A standard DOI is made up of a prefix (which always begins with `10.`) and a suffix, separated by a slash (e.g., `10.1038/nature123`). The suffix may be quite long, but ensure it does not include any spaces or end in punctuation

{% hint style="warning" %}
**Troubleshooting: DOI could not be resolved issues**

If the Library cannot resolve your DOI, verify that your entry matches the standard format. First, to simplify the input, remove any web addresses like `https://doi.org/`. Next, ensure that the DOI is correctly formatted. A standard DOI always begins with `10.`, and should not include spaces or end in punctuation.
{% endhint %}

## Using the Library in projects

You don't need to memorize your Library citation keys or constantly switch back to the Library to find titles. The Overleaf editor's autocomplete feature will look up entries in the Library for you as you type.

* Users with **simple reference search** enabled can pull references directly from the Library using citation keys, which can be partially typed within a citation command and will be auto-completed.

<figure><img src="/files/K2IXrbFRqGDzfyLpaJmk" alt="citation autocompletion with simple search, showing how a partial citation key is completed" width="384"><figcaption></figcaption></figure>

* Users with **advanced reference search** enabled can pull references from the Library using citation keys, titles, or author names within a citation command. For all these values, partial inputs will be automatically completed, making it easy to locate the correct reference to be cited.

<figure><img src="/files/yPO9MPNgXTWGUJYZHamG" alt="autocompletion of references using advanced reference search, showing how cite keys and author names are completed" width="384"><figcaption></figcaption></figure>

To cite from the library, you must enable Overleaf's auto-complete in the editor settings. You can configure your reference search options in your settings as well. Please see[ Adding citations and references](/citing-and-references/adding-citations-and-references.md) for more information on these options.

{% content-ref url="/pages/gj5c8BOG1VHeqLYWYPAw" %}
[Adding citations and references](/citing-and-references/adding-citations-and-references.md)
{% endcontent-ref %}

### The main .`bib` file

If your project has no `.bib` file, the first time you cite something from your Library, a new `references.bib` file will be added to your project. This file will be set as your **main  `.bib` file**, and will receive any bib entries that are cited from your Library.

If your project has several  `.bib` files, you can select one of the editable  `.bib` file to be the main  `.bib` file that will be used to receive new Library reference entries. Clicking on the Settings icon in the bottom left of the editor, or selecting the Settings option from your project's File menu will allow you to configure the main  `.bib` file for your project.

<figure><img src="/files/dKtlG0QVFZhlGKbXXYrR" alt="Editor settings screen showing the references settings selected and the main bib selection option."><figcaption></figcaption></figure>

{% hint style="info" %}
The main `.bib` file selection only affects the Library behaviour and does not influence which file is used at compile time for your references. The `.bib` file where references are found by the compiler must be set by using the appropriate LaTeX commands in your source.
{% endhint %}

### The `.bib`  file Visual Editor

When working with `.bib` files in your project, the **Code Editor** view of your `.bib` file presents a traditional plain text interface for directly editing the BibTeX or BibLaTeX coded entries of your bib.

<figure><img src="/files/Ga6eudGxq2tiU7jHhedY" alt="The .bib file Code Editor, showing the source code for entries"><figcaption><p>The Code Editor</p></figcaption></figure>

The **Visual Editor** for `.bib` files provides a view that is more like the view provided by the Library, including form-based entry and editing options, as well as the same set of options for adding and managing entries that are available within the Library.

<figure><img src="/files/gXDsUIUSnyxQZQW3jwBA" alt="The visual editor for .bib files, showing the entry list and form editor card for a selected entry"><figcaption><p>The Visual Editor</p></figcaption></figure>

## Configuring Library options

There are three important configuration options that affect how the Library works in your project.

1. **Autocomplete must be enabled.** When you type a citation command (such as `\cite`) and begin to provide an argument, Overleaf will autocomplete the citation key based on possible entries found in your Library and `.bib` files. Providing options for you to select requires having autocomplete enabled.
2. **A main `.bib` file must be selected.** The Library needs to be told which `.bib` file in your project should be used to receive reference entries that are cited from the Library.
3. **A reference search style should be chosen.** Simple reference search will search for references in your Library based on citation keys only. Advanced reference search (a premium feature) will search across citation keys, author names, and titles.

## Managing your Library&#x20;

You can easily edit your references using the form view. Selecting a reference in the Library brings up the form, allowing you to correct errors and add or remove fields.

{% hint style="info" %}
Editing a reference in your Library will not update project `.bib` files where that reference has already been cited. To update an entry in an existing project, you must remove and re-add the citation in that specific project, or edit the reference directly in the `.bib` file where it is used.
{% endhint %}

### Validation

Syntax mistakes and missing field values are major problems encountered when working directly with BibTeX or BibLaTeX. The Library helps to address this by ensuring correct syntax and by providing feedback about missing values or problems with your entries.

When you add items to your Library, it will check for

* duplicate citation keys,
* malformed citation keys, and
* missing required fields.

The Library provides indicators for missing required fields in the list of entries, with more details about the missing data shown in the card for the highlighted entry.

<figure><img src="/files/lGvdjoUftdVp1DwZTx4q" alt="a Library entry with a missing field showing a warning when selected in the library"><figcaption><p>A Library entry displaying a warning for a missing required field</p></figcaption></figure>

#### Citation key validation and generation

A citation key cannot include commas, spaces, or specific control and delimiter characters like `{`, `}`, `#`, `%`, `~`, `\`, or parentheses `( )`, because BibTeX and LaTeX use these symbols to parse syntax, separate fields, or process commands.

If a citation key is removed or left blank the Library will generate a citation key based on the author and year fields. A generated citation key can be edited afterwards to follow your preferred conventions. The Library will not replace existing valid keys with new values.

{% hint style="warning" %}
While the Library will warn you about duplicate citation keys when adding references, it does not currently block the addition of duplicates. It is currently the user's responsibility to ensure that libraries are free from duplicate entries or from entries that share the same citation key.
{% endhint %}

## Deleting Library entries

You can delete entries in your library, this will not affect project  `.bib` files where the entry has been used. Deleting entries from the Library will move them to your account's **Trash**, rather than deleting them permanently right away. Library entries that are moved to the Trash can be restored back to the Library within 30 days.

{% hint style="danger" %}
Entries that are left in the Trash for more than 30 days will be deleted permanently and cannot be restored.
{% endhint %}

### Moving an entry to the Trash

To move an entry out of the Library and into the Trash, select the entry within the Library and choose the delete option shown at the top of the entries list.

<figure><img src="/files/T3kzfMnIbugfnmf8IyRW" alt="Selected items in the Library showing the delete option"><figcaption><p>Selected entries in the Library and the Delete option</p></figcaption></figure>

### Restoring or permanently deleting an entry&#x20;

To view references that have been moved to the Trash, in the project dashboard, click on the Trash button in the side bar.

<figure><img src="/files/MDWYibGfeeiIr6RVRSTI" alt="the Trash button in the side panel of the project dashboard just below the Library button"><figcaption><p>The Library and Trash buttons in the project dashboard side pane</p></figcaption></figure>

The Trash can contain both projects and references. Click on the **References tab** to see any references that have been moved to the Trash.

Once selected, you may restore a trashed reference, or delete it permanently.

<figure><img src="/files/8WVMDawAOIGxSOnWKcxa" alt="Items selected in the trash, showing options to restore or delete permanently"><figcaption><p>The Trash with the References tab selected</p></figcaption></figure>

## Exporting references

You can export selected references to a  `.bib` file. This allows you to use your Library entries as references in local LaTeX projects, add your Library entries to other reference management tools, and share, or back up your Library reference data.

Use the download option for selected references to export a  `.bib` file containing these references.

<figure><img src="/files/exa2VCbiWtAN6wg6i9BE" alt="Selected reference entries in the Library with the Download option selected"><figcaption><p>Downloading entries from the Library</p></figcaption></figure>

## Library FAQ&#x20;

<details>

<summary>Is the Library a reference manager, like ReadCube, Zotero, or Mendeley?</summary>

You can think of the Library as a purpose-built, simplified reference manager designed specifically for LaTeX workflows. It provides a central repository where you can easily sort, manage, and pull references directly into your Overleaf projects.

However, there are some key differences between the Library and standalone reference managers:

* No PDF or note storage: The Library is strictly for managing references (your BibTeX or BibLaTeX entries). It is not a repository for full-text PDFs or personal research notes, which are features often offered by external tools.
* LaTeX-driven formatting: The Library does not natively translate your references into different citation styles (such as APA or IEEE). Because the Library is integrated directly into your LaTeX projects, this formatting is handled seamlessly by BibTeX, BibLaTeX, or natbib during the LaTeX compile process.

</details>

<details>

<summary>How big can my Library get?</summary>

You can add up to 100MB of reference data to your Library.

</details>

<details>

<summary>How does the Library work with an external reference manager?</summary>

While you can easily import your existing `.bib` files into the Library, it currently operates independently and does not actively sync back and forth with external managers like Zotero or Mendeley.

</details>

<details>

<summary>Is there a browser extension that I can use to add references to the Library when I am on other sites?</summary>

Many reference managers provide browser extensions for scraping reference data from journal sites. Overleaf does not directly provide a browser extension that provides this functionality. There are a number of existing extensions that do provide BibTeX data from journal sites or from other reference data sources, such as Google Scholar. Many sites that provide reference data do offer a BibTeX output format directly.

</details>

<details>

<summary>I am not able to cite items that are in my Library, what should I do?</summary>

Please check the Library configuration options (link to above). If you are still having trouble, please [contact us](https://www.overleaf.com/contact).

</details>

<details>

<summary>Can I move data from project <code>.bib</code> files to my Library?</summary>

You can copy and paste references from .bib files into your Library, or download them from your projects and upload them to your Library. Currently there is not a way to move individual references directly from a project bib file to the Library.<br>

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.overleaf.com/citing-and-references/library.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
