Working in Citet

Citations

Citet handles bibliographies via plain .bib files, Zotero library integration, or both. All sources feed the same editor features: autocomplete, hover previews, and the citation picker.

In the Backmatter family, Nocite is the companion reference manager for sources not cited yet. Nocite keeps the research library; Citet turns selected sources into writing.

Plain .bib files

Add one or more .bib files to the project — they can have any name. The editor parses them immediately and uses their entries for:

→Autocomplete inside \cite{
type part of a key, author, title, or year to filter entries.
→Hover tooltips
shows authors, year, and full title on existing cite keys.
→Linting
flags \cite keys that do not appear in any .bib file in the project.

Compile with the usual \bibliographystyle and \bibliography commands. You can split your bibliography across multiple files and list them all: \bibliography{refs,extra}. Citet merges them for autocomplete.

▶How .bib files are parsed

.bib files are parsed in the browser using a LaTeX-aware parser from packages/lang-latex. It handles the most common entry types (article, book, inproceedings, misc, etc.) and standard field names. Entries with syntax errors are silently skipped; if entries seem to be missing from completions, check the raw file for malformed entries.

Parsed entries are stored in the citation library (citation_references table) and also cached in the browser for fast autocomplete and hover without a server round-trip.

Citation picker

Press ⌘' / Ctrl+' while typing inside a \cite{ argument to open the citation picker. It searches across all citation sources — local .bib files and Zotero — by title, author, year, or tag.

Selecting an entry inserts the cite key at the cursor. If the entry came from Zotero and is not already in a .bib file, it is appended to the project's main bibliography file so the compiler can find it.

You can also open the citation library sidebar from the command palette (Open citations). The sidebar lets you browse and search the full library without requiring a cursor inside a \cite argument.

Hover previews and jump-to-source

Hovering a cite key shows the full resolved entry: authors, year, title, and container. Hold ⌘ / Ctrl and click a key to jump to its definition:

  • For entries in a .bib file — jumps to that entry's line in the bibliography file.
  • For Zotero entries — opens the entry in the local Zotero client if it is running.

Zotero integration

Linking a Zotero library adds your references to the picker and autocomplete without copying entries into a .bib file by hand. The integration is OAuth-based — Citet reads your library but never sees your Zotero password.

  1. Open Project settings → Citations and choose Connect Zotero.
  2. Authorize Citet to read your library in the Zotero OAuth dialog. The flow returns you straight back to the project.
  3. Choose a library or a specific collection to expose to this project. Sub-collections nest naturally.

The library syncs periodically. To force a resync, disconnect and reconnect from project settings.

▶Zotero OAuth and token storage

Citet uses Zotero's OAuth 1.0a flow. After authorization, the server stores the OAuth access token (not a password) in the database. The token is scoped to read-only library access.

Tokens are stored encrypted at rest using the application's auth secret. You can revoke access at any time by disconnecting from project settings, or from the Zotero application settings under Connected Applications.

The Zotero integration is opt-in and requires the server to be configured with a Zotero OAuth application. If ZOTERO_CLIENT_KEY is not set, the integration is hidden from project settings. See self-hosting for setup.