# Creating a bibliography

There are a variety of ways to create bibliographies within a LaTeX document, but most methods for including citations and a list of references require three main steps:

1. Include a file in your project that provides all the bibliographic data for the works you are going to cite. This is the .bib file. The .bib file has a special format that provides the raw bibliographic data without any specific style formatting.
2. Provide some instructions in your LaTeX document's preamble that describes what bibliography management system you are going to use. There are three different systems that are commonly used: bibTeX, natbib, and bibLaTeX.
3. Include citation commands within your text where you wish to cite works that are available in your .bib file. You must also include commands to print the bibliography at the appropriate location in your document.

The LaTeX compile process will check all of the citation commands, insert appropriately styled citations at those locations, and automatically generate a bibliography using the data in your .bib file.

## Creating the .bib file

Overleaf provides several features that allow you to work with .bib files more easily. You can upload or create your .bib file directly in Overleaf, or you can use a reference manager integration (premium feature) to automatically import or build your .bib file from data you have gathered in Papers, Zotero, or Mendeley.

{% content-ref url="/pages/2YwgNIrc3gvcpw8OhNIz" %}
[Working with .bib files](/citing-and-references/working-with-.bib-files.md)
{% endcontent-ref %}

{% content-ref url="/pages/FXCDAEIivxlL8ngdVeVD" %}
[Reference Manager integrations](/integrations-and-add-ons/reference-manager-integrations.md)
{% endcontent-ref %}

## LaTeX reference management systems

When it comes to bibliography management systems, there are three main options in LaTeX: **bibTeX**, **natbib**, and **bibLaTeX**. While all three make use of .bib files, they provide different commands, style, data type, and attribute options.

If you are using a template that was provided to you, the template will likely have a specific reference management system already selected. Please check the documentation for your template to find out which system it may be using.

If you are creating a project without a template or specific requirements, **bibLaTeX** is the recommended system to use, as it provides an easier and more flexible interface and a better language localization than the other two options.

Overleaf's [LaTeX learning documentation](https://www.overleaf.com/learn) provides overviews of how to use these 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>

## Writing and citing

LaTeX bibliography reference systems each provide various citation commands for you to use within your LaTeX document to indicate what works should be cited, where the citations should appear, and what type of citation is required.

A common feature of all citation commands is that they rely on **citeKeys**, which are unique identifiers for each work that is provided in your .bib file.

Overleaf's [LaTeX learning documentation](https://www.overleaf.com/learn) provides an overview of the citation commands and styles for bibLaTeX, natbib, and bibTex.

<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/Biblatex_citation_styles">bibLaTeX citation styles</a></td><td><a href="/files/zW04YYsPibRBnjQjFOpB">/files/zW04YYsPibRBnjQjFOpB</a></td><td><a href="https://www.overleaf.com/learn/latex/Biblatex_citation_styles">https://www.overleaf.com/learn/latex/Biblatex_citation_styles</a></td></tr><tr><td align="center"><a href="https://www.overleaf.com/learn/latex/Natbib_citation_styles">natbib citation styles</a></td><td><a href="/files/zW04YYsPibRBnjQjFOpB">/files/zW04YYsPibRBnjQjFOpB</a></td><td><a href="https://www.overleaf.com/learn/latex/Natbib_citation_styles">https://www.overleaf.com/learn/latex/Natbib_citation_styles</a></td></tr><tr><td align="center"><a href="https://www.overleaf.com/learn/latex/Bibtex_bibliography_styles">bibTeX citation styles</a></td><td><a href="/files/zW04YYsPibRBnjQjFOpB">/files/zW04YYsPibRBnjQjFOpB</a></td><td><a href="https://www.overleaf.com/learn/latex/Bibtex_bibliography_styles">https://www.overleaf.com/learn/latex/Bibtex_bibliography_styles</a></td></tr></tbody></table>

Overleaf provides autocompletion features as well as advanced reference search options (a premium feature) that help you find the right citeKey for a given reference.

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


---

# Agent Instructions: 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:

```
GET https://docs.overleaf.com/citing-and-references/creating-a-bibliography.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
