Obsidian上手:方便阅读、整理文献
Zotero 导出文献元信息
安装 Better BibTex
在 Zotero 中安装 Better BibTex 插件,安装步骤如下:
- 到 Github Releases 下面下载 XPI 文件;
- 在Zotero内点击
Tools -> Add-ons,然后将 XPI 文件拖进去; - 点击 Install 即可。
修改 Citation Key(非必须)
建议先 点击 Edit -> Preferences, 将 Citation Key format 更换成如下,将年份作为起始名称。

然后在 My Library 中选中所有的文件,右键点击 Better BibTex -> Refresh BibeTex Key 。
导出文献元信息
然后导出 Better CSL Json 格式的文件,步骤如下:
- 在 Zotero 右键 My Library ,然后点击
Export Library...; - 选中
Keep updated,指定 CSL JSON 格式; - 将导出的文件保存到某个目录下,例如命名文件为
My Zotero Library.json。
在 Zotero 的偏好配置里面可以看到如下:

Obsidian 内部配置
路径配置
然后在Obsidian安装Citations插件,在插件设置中设置对应的文件路径,Citation database path 是 My Zotero Library.json 的路径名,然后 Literature note folder 是自动存放在 Obsidian Vault 的位置。

配置论文笔记模板
在Citations配置中插入如下,即可每次使用快捷键新建一个与Zotero文件对应Note文件,里面包好了打开Zotero对应文件项的超链接。

在 Literature note content template 插入如下:
---
title: {{title}}
authors: {{authorString}}
year: {{year}}
aliases: ["{{title}}"]
---
---
[zotero link]({{zoteroSelectURI}})
Citations的基本操作
插入论文笔记的方式就是使用快捷键 Ctrl + Shift + O ,然后搜索到相应的论文,点击即可。
其它操作可以看控制面板和教程。
关于 Zotero 的链接
在 Citations 的输出中用到了 Zotero 协议的Schema:zotero://select/items/...,这个功能在官网上找不到相关教程,但是在Zotero开源仓库上可以找到,放在一个 zotero-protocol-handler 文件中,里面还有相关注释。
但是看不到 Citations 提供的 URI 格式 zotero://select/items/citationKey ,从里面可以得到如下链接方式:
- 定位到对应 Item 的 URI 格式如下:
zotero://select/library/items/itemKey - 打开 PDF 文件的 URI 格式如下:
zotero://open-pdf/library/items/itemKey
在 Citations 的仓库中找到 Zotero 链接的生成方式如下:
/**
* A URI which will open the relevant entry in the Zotero client.
*/
public get zoteroSelectURI(): string {
return `zotero://select/items/@${this.id}`;
}
另外 Zotero 的插件 Mdnotes 利用了两种格式,其代码如下:
function getLocalZoteroLink(item) {
let linksString = "zotero://select/items/";
const library_id = item.libraryID ? item.libraryID : 0;
linksString += `${library_id}_${item.key}`;
return linksString;
}
function getZoteroPDFLink(attachment) {
return `zotero://open-pdf/library/items/${attachment.key}`;
}

浙公网安备 33010602011771号