Use the Zotero online library in Obsidian
Read your Zotero library in Obsidian on a phone, a tablet or a computer without Zotero, with a read-only API key from zotero.org.
Create a read-only key on zotero.org, keep it as a secret in Obsidian's keychain, and select it in 设置 > ZotLit > Zotero. ZotLit then downloads your library and keeps it up to date.
Use the online library on a phone or a tablet, where it is the only source, or on a computer without Zotero. ZotLit only reads the library, so nothing on zotero.org changes.
Before you start
- Your Zotero library syncs to zotero.org with Zotero's own sync. ZotLit reads what zotero.org holds.
- On a phone or a tablet, you have Android System WebView 133 or iOS 18.6 or newer, and Obsidian 1.15.1 or later.
- On a phone or a tablet, the ZotLit Resource Pack plugin is installed in the vault. ZotLit needs it there to read the online library. See ZotLit Resource Pack for the install steps.
Set up the online library
Choose the online library on a computer
On a computer, open 设置 > ZotLit > Zotero and set 文库来源 to Zotero 在线文库. Then select 重新加载 Obsidian in the row 重新加载以应用.
Obsidian reloads with the online library. The choice applies to this device only, so your other computers keep their own source. On a phone or a tablet, skip this step: the online library is the only source there.
Create a Zotero API key
In the row Zotero API 密钥, select the link 在 zotero.org 上创建只读密钥. Sign in to zotero.org and give the key a name. Give it read access to your personal library. Add access to its notes if you want your Zotero notes in Obsidian too. Add read access to each group library you want. Write access is not needed.
zotero.org shows the new key once. Copy it.
Keep the key as a secret and select it
The row Zotero API 密钥 is a secret field of Obsidian. Create a new secret there, paste the key as its value, and select it. ZotLit keeps only the name of the secret, on this device.
The row 在线文库 changes from 选择保存您 Zotero API 密钥的机密以同步文库。 to the progress of the download.
Wait for the first sync
The first sync starts when you select the key. The status shows 正在下载条目和分类:400 / 2,000…, then 正在更新您的文库:400 / 2,000…. A large library takes a while the first time.
When the status reads 已是最新。上次同步:…。, your library is ready. Below it, ZotLit shows Zotero 已接受此密钥,账户为 …。
The copy of your library stays on this device, outside the vault, so vault sync does not carry it. Each device downloads its own copy, so select the key on each device.
What works with the online library
| Task | On a computer with the online library | On a phone or a tablet |
|---|---|---|
| Search your library and insert citations | Yes | Yes |
| Query files and query blocks | Yes | Yes. A paper with no literature note shows 无笔记 |
Query CLI commands, such as zotlit:query | Yes | No. It needs the desktop app. |
| Library View | Yes | No. ZotLit shows Zotero 文库仅在 Obsidian 桌面端可用。 |
| Create and update literature notes | Yes. Images of image annotations are not available. | No. ZotLit shows 创建文献笔记仅在 Obsidian 桌面端可用。 |
| Open PDF and other attachment files | No. ZotLit shows 此操作需要将“此电脑上的 Zotero”设为文库来源。请在“设置 → Zotero → 文库来源”中选择。 | No |
| Edit annotations from Obsidian | No. Edits happen in the PDF, and PDF files do not come with the online library. | No |
| Actions and links that Zotero sends, such as ZotLit Companion menus and live updates | No. ZotLit shows 此操作需要将“此电脑上的 Zotero”设为文库来源。请在“设置 → Zotero → 文库来源”中选择。 A link that shows an item in the Library View still works. | — |
Keep the library up to date
ZotLit syncs when Obsidian starts, then every 5 minutes while an Obsidian window has focus. A change you make in Zotero shows in Obsidian after Zotero syncs it to zotero.org and ZotLit syncs next.
To sync at once, select 立即同步 in the row 在线文库, or run ZotLit: 同步 Zotero 在线文库. A sync that runs longer than 2 seconds shows the notice 正在同步 Zotero 在线文库… with its progress and a 停止同步 button.
When a sync fails, your notes keep the data of the last good sync. The status then reads 您的笔记使用上次同步的数据:…。
Change the Zotero language
In 设置 > ZotLit > Zotero, set Zotero 语言 to the language of your Zotero app. ZotLit then reads a date such as 01/02/2020 in the same day and month order as Zotero does. The default is 自动(…).
When you change the Zotero language, ZotLit downloads the online library again.
Remove the online library data
In 设置 > ZotLit > Zotero, select 移除在线文库数据, then 移除 in the dialog. ZotLit deletes the copy of your library from this device and stops using the key. The key stays in Obsidian's keychain; remove it there if you no longer need it. Your library on zotero.org does not change.
Vaults that you removed from Obsidian can leave their copy of the library on this device. To free that disk space, open the group 在线文库数据 in 设置 > ZotLit > 高级 and look under 其他仓库的数据.
To go back to Zotero on a computer, set 文库来源 to 此电脑上的 Zotero and reload Obsidian.
Fix a problem
The status reads Zotero 未接受此 API 密钥。请检查密钥,或创建新的密钥。 Copy the key again in full, or create a new key on zotero.org.
The status reads 此 API 密钥无法读取您的文库。请创建具有读取权限的密钥。 Create a new key with read access to your library.
The status reads 此 API 密钥属于另一个 Zotero 账户。请替换此设备上的数据以使用新账户。 In the row 使用新账户, select 替换数据. ZotLit removes the data of the old account and downloads the library of the new one.
The status reads ZotLit 无法连接到 zotero.org。将在下次同步时重试。 Check your internet connection, then select 立即同步.
The status reads Zotero 要求 ZotLit 稍候。同步将于 … 继续。 Do nothing. ZotLit continues the sync by itself.
The status reads 此设备没有可供在线文库使用的空间。请释放一些空间,然后再次同步。 Free some space, then select 立即同步.
On a phone or a tablet, the status reads 尚未安装 ZotLit Resource Pack。请在第三方插件中安装,无需启用。 Install ZotLit Resource Pack from Obsidian's community plugins. See ZotLit Resource Pack.
ZotLit shows 此操作需要将“此电脑上的 Zotero”设为文库来源。请在“设置 → Zotero → 文库来源”中选择。 PDF files do not come with the online library. Open the PDF on a computer where 文库来源 is 此电脑上的 Zotero.
See also
Open a Zotero PDF in Obsidian
Read and annotate PDF files on a computer with Zotero.
Use ZotLit on multiple devices
Set the Zotero location on each computer that syncs your vault.
Which Zotero and Obsidian versions ZotLit works with
Check the versions of Obsidian, Zotero and your phone that ZotLit needs.
最后更新于