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

Simplified Chinese content is not ready. English content is shown.

Read in English
ZotLit

Keep notes up to date

Update a single literature note or a batch of notes when your Zotero data changes, without losing your own writing.

When your Zotero metadata or annotations change, you can refresh your literature notes to match. ZotLit preserves your own writing by updating only the parts it manages.

Start with Update notes

When you are unsure which command to use, run this one from the command palette (Ctrl+P on Windows/Linux, Cmd+P on macOS):

ZotLit: 更新笔记

A dialog titled 更新笔记 opens. Choose one of two buttons:

  • 更新当前笔记 updates the literature note you have open. The button appears only when a literature note is active.
  • 更新全部笔记 updates every existing literature note in your library scope.

The checkbox 更新全部笔记时,也为没有笔记的条目创建笔记 is off by default. Turn it on to also create notes for items that have none.

The commands below run one kind of update directly. They suit you when you want a keyboard shortcut for a task you repeat.

Update a single note

These commands are available from the command palette and from the right-click context menu on a literature note file. They only appear when the active file is a literature note (a note with a zotero-key frontmatter field).

Update the full note

Open a literature note

Open the literature note you want to update.

Run the update command

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

ZotLit: 更新文献笔记

ZotLit refreshes the frontmatter. A note made with the default template has no managed region, so its body stays as you wrote it, and the notice reads 属性已更新。此笔记没有托管区域,因此正文保持不变。 Its annotations query block stays current on its own.

When your note has a managed region (%%zt-managed%% ... %%/zt-managed%%), ZotLit also re-renders it. A note has one when your own profile has a {% managed %} block, or when an earlier default created it. Your writing outside the managed region stays untouched, and a query block in the region keeps any view settings you saved in its toolbar. A notice confirms: 文献笔记已更新。

To stop ZotLit re-rendering a region, delete the %%zt-managed%% and %%/zt-managed%% lines. Later updates leave the body untouched.

Image and ink excerpts are prepared before the note is written. Both PDF readers can stay closed. A changed image gets a new filename; other notes and old image files keep their saved versions.

If refresh fails, ZotLit keeps a verified image already referenced by the note. If none is available, it writes an explanation and source link. See Import outcomes for the summary counts.

Update metadata only

To refresh frontmatter without touching the note body, run:

ZotLit: 更新文献笔记元数据

A notice confirms: 元数据已更新。 The note body is not changed.

Context menu

You can also right-click a literature note file in the file explorer. The ZotLit section of the context menu offers 更新文献笔记, 更新文献笔记元数据, 覆盖文献笔记, and 复制 Zotero 标识符.

Update notes in batch

ZotLit Companion, the Zotero add-on, starts batch updates from Zotero.

Select items in Zotero

In Zotero, select one or more items in your library. Right-click to open the context menu, then choose ZotLit > 创建或更新文献笔记 (or 更新文献笔记元数据 for metadata only).

Confirm in Obsidian

Obsidian opens a confirmation dialog titled 更新文献笔记. It shows how many notes will be created or updated, grouped by status: 更新(…), 创建(…), and 未找到(…).

When your vault holds added profiles, the dialog also carries a profile control for the new notes. See Choose the profile for new notes.

Select 更新笔记 to proceed.

Review the summary

After the batch completes, a summary appears: 完成。已创建 … 个,已更新 … 个,失败 … 个。 With added profiles, the created and updated counts name the profile they ran under, as in 在 … 下已创建 … 个.

To create or update notes for every item at once, run ZotLit: 创建或更新所有文献笔记 from the Obsidian command palette. It updates the items that already have a note and creates a note for each item that has none. This skips the Zotero selection step and covers every library in your library scope.

To update existing notes only, use ZotLit: 更新笔记 and leave 更新全部笔记时,也为没有笔记的条目创建笔记 off. See Apply a template change to some notes.

While more than one library contributes items, the confirmation names the library beside each status heading, so identical statuses stay apart. One contributing library keeps the plain headings.

If a selected library is missing from your Zotero database, the run continues over the rest and the confirmation states how many libraries it skipped. If none of your selected libraries is available, no dialog opens and a notice reports 文库范围中没有可用的文库。

Large selections

A selection too large to fit in a protocol link falls back to an HTTP connection to Obsidian. If the ZotLit server is not enabled in Obsidian, Zotero shows a notice asking you to enable it or select fewer items.

Security prompt in Zotero

Zotero may show a confirmation dialog each time it opens an obsidian:// link. See Suppress the Zotero security prompt to disable it.

You can also open a single note from Zotero by right-clicking one item and choosing 在 Obsidian 中打开文献笔记 from the top-level context menu.

Apply a template change to some notes

A run that creates nothing is the way to apply a template change to notes you already have. It touches only items with a literature note and leaves the rest of your library alone.

  • For one note, open it and choose 更新当前笔记 in ZotLit: 更新笔记.
  • For every existing note, choose 更新全部笔记 with the checkbox off.
  • For properties alone on items you select in Zotero, choose 更新文献笔记元数据. That batch creates no notes, and it leaves note bodies as they are, so a change to a managed region does not reach those notes.

The collection entry in Zotero, 创建或更新文献笔记, also creates notes for items that have none.

The confirmation of such a run reads 更新 … 篇文献笔记? Items with no note are listed under 没有笔记 (…) and are left alone. After you save a template from the web Template Workbench, the notice offers 更新现有笔记. It opens this confirmation for your existing notes and creates no notes.

Overwrite a note

ZotLit: 覆盖文献笔记 is a separate, destructive command. It replaces the entire note body with a fresh render of the note's profile document. Frontmatter keys managed by ZotLit are refreshed; other frontmatter keys you added are kept.

A confirmation dialog appears before the overwrite proceeds.

Overwrite uses the same excerpt snapshot rules as a full update. A metadata-only update leaves the note body's image links unchanged.

Notes created with ZotLit v1

Literature notes created with ZotLit v1 do not have a managed region. Running 更新文献笔记 on a v1 note refreshes its frontmatter but leaves the body untouched, showing the notice 属性已更新。此笔记没有托管区域,因此正文保持不变。

To fully refresh a v1 note's body, use ZotLit: 覆盖文献笔记. It rebuilds the body from the note's profile document. A v1 note carries no zotlit-profile field, so the Default profile rebuilds it.

See also

Last updated on

On this page