Quick answer
Install the Better BibTeX add-on in Zotero. Then export your library or a collection as a .bib file with Keep updated turned on, and save the file in your LaTeX project. Cite entries with \cite{key}, using the keys in that file. In Overleaf, upload the file to your project, and upload it again when it changes unless you use an integration.
If you are still choosing between Zotero and Mendeley, read Is it better, Mendeley or Zotero? first.
What you need
- Zotero, with your references in a library or collection.
- The Better BibTeX add-on. Download the version that matches your version of Zotero.
- A LaTeX project, either on your computer or in Overleaf.
Step 1: Install Better BibTeX
Download the .xpi file for Better BibTeX from its project page. In Zotero, open Tools > Add-ons, click the gear icon, choose Install Add-on From File, and select the file. Restart Zotero if it asks you to. Menu names can vary between Zotero versions.
Step 2: Set how citation keys look
Better BibTeX creates a citation key for each item, built from fields such as the author’s last name, the year, and a word from the title. Open Better BibTeX’s preferences and check the key format. Short, consistent keys are easier to read and type.
Pin the keys you cite often. A pinned key stays the same when the item changes, so your existing \cite commands keep working.
Step 3: Copy keys with quick copy
Set Zotero’s quick-copy format to the Better BibTeX citation key. In Zotero’s settings, open the Export section and change the Quick Copy format. After that, copying an item copies its key, ready to paste inside \cite{}.
Step 4: Export a .bib file that stays updated
- Right-click the collection or library you want, and choose Export Collection or Export Library.
- Choose the Better BibTeX format. Use Better BibLaTeX if your document uses biblatex, or Better BibTeX if it uses BibTeX with natbib.
- Turn on Keep updated.
- Save the file in your project folder as
references.bib.
With Keep updated on, Zotero rewrites this file when your library changes. Keep the file in the same folder as your .tex file, or give the correct path in \addbibresource.
Step 5: Cite in LaTeX
Load biblatex and point it at the file:
\documentclass{article}
\usepackage[backend=biber,style=authoryear]{biblatex}
\addbibresource{references.bib}
\begin{document}
Prior work reported the same effect \autocite{smith2020}.
\printbibliography
\end{document}
Use the key you copied from Zotero. The key is the text after the opening brace of the entry in references.bib.
With BibTeX and natbib, use \citep{smith2020} in the text, and end the document with \bibliographystyle{plainnat} and \bibliography{references}.
Using the file in Overleaf
Upload references.bib to your Overleaf project and cite from it as shown above. Keep these points in mind:
- Zotero updates the file on your computer. Overleaf does not see those changes until you upload the file again, unless you use an Overleaf integration or a sync method that copies the file for you.
- Overleaf offers reference-manager integrations for some plans. Check Overleaf’s current documentation to see whether your plan includes one.
- When you upload a new version, replace the old copy. Two bibliography files with overlapping entries produce duplicates.
For a full Overleaf project setup, see how to make citations in Overleaf.
Troubleshooting
- Duplicate entries. This happens when the same item is in more than one exported collection, or when your document loads two
.bibfiles that share entries. Export from one place, and avoid loading overlapping files. - A citation key stopped working. The key changed after you edited the item or changed the key format. Find the new key in the updated
.bibfile. Pin the keys you rely on so they stay the same. - Missing fields. Fill them in Zotero, then export again. Better BibTeX reads its data from Zotero, so fixes you make in Zotero reach the file after the next export.
- Compile errors about the bibliography file. Check that the file name in
\addbibresourceor\bibliographymatches the file exactly, including upper and lower case.