You’re reading the ZotLit v2 docs. Still on v1? Read the v1 docs

ZotLit

Insert citations

Insert Markdown citations while typing or from the command palette, using the primary or secondary citation format.

ZotLit inserts Markdown citations from your Zotero library in two ways: an inline suggester that appears while you type, and a command-palette picker.

Insert while typing

The citation suggester opens when you type [@ (or 【@) in the editor. A dropdown appears with items from your Zotero library.

With the opt-in @ trigger enabled, a bare @ at a word boundary (start of line, after a space, or after an opening bracket or quote) also opens the suggester.

Start a citation

Type [@ in the editor. A suggestion list appears.

With @ trigger enabled, typing @ at a word boundary does the same thing. A mid-word @ (e.g. in an email address) is ignored.

Search and select

Continue typing to filter the list. Select an item and press Enter to insert the citation. The citation is inserted with a trailing space so you can keep typing immediately.

By default, this inserts the primary citation format (e.g. [@citationKey]).

An @ query ends at the first space. Type _ where the search needs a space: @machine_learning finds "machine learning". Bracket trigger queries ([@) accept real spaces.

Insert the secondary format (optional)

To insert the secondary citation format instead (e.g. @citationKey), do one of:

  • End your query with / before pressing Enter.
  • Press Shift+Enter on the selected item.

The instruction row in the suggester shows these shortcuts as a reminder.

If the selected item has no citation key, nothing is inserted and a notice appears: "Selected item has no citation key: {key}."

Suggester settings

  • Citation suggester (default: on): enables or disables the inline suggester. Find it in Settings → ZotLit → Citations.
  • @ trigger (default: off): also opens the suggester on a bare @ at a word boundary. Visible only while Citation suggester is on. Find it in Settings → ZotLit → Citations.
  • Show citation key in suggestions (default: off): shows each item's citation key beside its title in the suggester list. Find it in Settings → ZotLit → Citations.

Insert from the command palette

Open the citation picker

Open the command palette (Ctrl+P on Windows/Linux, Cmd+P on macOS) and run:

ZotLit: Insert Markdown citation

A picker appears with your Zotero library.

Select an item

Search for an item and press Enter to insert the primary citation.

Press Shift+Enter to insert the secondary citation instead.

Citation formats

ZotLit ships two citation templates:

TemplateSettings labelDefault outputExample
PrimaryCitationBracketed citation[@citationKey]
SecondaryAlternate citationBare citation@citationKey

These are the default outputs. You can change them by editing the Citation and Alternate citation templates in Settings > Templates. The rendered citation is normalized to a single line (leading/trailing whitespace trimmed, line-break runs collapsed to a space). Each insert ends with a trailing space and places the cursor after it; if a space already follows the insert position, it is reused rather than doubled.

When Citation Key Links is enabled, the bracketed primary form becomes clickable in Live Preview and Source mode. The default secondary form is bare, so it stays plain text.

See also

On this page