Zotero citations in LaTeX
The editor lists the sources of your project, completes citation keys while you type and shows the entry and its PDF behind a \cite. Connected to Zotero, it also keeps the .bib file in step with your library. This guide goes through the setup and the daily use.
How the parts fit together
Everything starts from the .bib files in your project. The Sources tab, the completion inside \cite{ and the window behind a citation all read them, so they work without Zotero as soon as the project has a .bib file.
Zotero adds two things. It can write its library into a .bib file of the project and keep that file current. And it supplies what a .bib entry often lacks: the abstract and the attached PDF.
Connect Zotero
In the browser the editor uses the Zotero Web API. You need two values from your Zotero account: your user ID, which is a number, and an API key.
Sign in at
zotero.org/settings/keys. The page shows the line “Your userID for use in API calls is …”; note the number. Then create a new private key with “Allow library access”. Read-only access is enough.In the editor, open the settings with the gear button in the top bar.

Scroll to “Zotero Citations” and fill in “Web API user ID” and “Web API key”. Each value is saved when you leave its field.

Click “Test Web API” in the part “Bib Sync” below. A line under the buttons says whether Zotero accepted the key and how many entries it returned.
Keep a .bib file in step with Zotero
Right-click a
.bibfile in the file list and choose “Link with Zotero”. To start with a new file, create a.bibfile and tick “Sync with Zotero” in the dialog.
The editor writes the BibTeX export of your library into the file. A green “Z” next to the name marks a linked file.

After you add sources in Zotero, right-click the file again and choose “Sync Zotero now”. For an automatic sync, set “Auto-Sync” in the settings under “Bib Sync” to 1, 5 or 10 minutes.
Find a source and cite it
Open the tab “Sources” in the sidebar. It lists every entry of the project’s
.bibfiles with title, citation key, authors and year.
Type at least two letters into the search field. The list narrows to the sources whose title, authors, key or abstract contain them.

Put the cursor where the citation belongs and click the plus button of the source. The editor inserts
\cite{key}at the cursor.
Cite while you type
Type
\cite{and the first letters of a key. The editor lists the matching keys with the title of each source.
Choose an entry with the arrow keys and press Enter.
Look up what a citation says
Click on the key inside a
\cite{...}. A window opens next to it with title, authors, year, journal and DOI of the source.
Switch to the tab “Attachment” to read the PDF in the same window. Type a word into its search field and press Enter to jump from match to match.

Link a sentence to the passage that backs it
An evidence link ties a passage of your text to a passage in the PDF of the source. Later you jump from the citation window to that place in the paper, or back to your sentence.
In the editor, select the sentence together with its
\cite{...}, at least eight characters.Right-click the selection and choose “Zotero: Link Evidence”. The citation window opens with the PDF of the source.
Select the passage in the PDF, again at least eight characters, and click “Link now”.
Take a figure out of a PDF
Open the PDF in the tab “Attachment” of the citation window and click the scissors button.
Drag a rectangle around the figure or table on the page.
In the dialog, check the folder (
Imagesunless you change it) and the file name, set the width between 40 and 100 percent of the text width, and write the caption and the label.Click “Save & insert figure”. The editor saves the region as a PNG in the project and inserts a
figurewith\includegraphics, your caption and the\citeof the source.
When something does not work
The Sources tab says “No .bib file found in project”: add a .bib file, by hand or linked with Zotero as described above. The tab reads .bib files, not the Zotero library itself.
The citation window says “No entry found”: the key is in no .bib file of the project. Check the spelling, or sync the linked file so that a source you added in Zotero arrives.
The PDF shows citations as question marks: that is a matter of the compile, not of Zotero. See BibLaTeX and Biber in the browser and Create a bibliography in LaTeX with biblatex and Biber.
Where it works
- Web mode: runs in the browser, files stay in the browser
- Bridge mode: the desktop app compiles with the TeX installation on your computer
What you need
- A
.bibfile in the project. For the sync and the PDFs: a Zotero account with an API key, or Zotero with Better BibTeX and the desktop app.
Related pages
- Editor BibLaTeX and Biber in the browser
- How-to Create a bibliography in LaTeX with biblatex and Biber
- How-to Cite sources in LaTeX
- Package
biblatex