最近才发现Zotero众多好用的插件,然而better notes用的时候关于笔记模板使用中出现了各种问题,遂记录一下。
使用Zotero是当前最新版本,插件也是最新版。
看了B站好多视频,存了点模板,发现使用过程中经常出现【title is not defined】报错,笔记模板也无法正常生成

烦死人的报错
后来我在github上面看别人的模板,复制一份过来,发现同样报错。根据下面热心网友的众多回复,修改了部分代码,就能成功使用了!
原网站:https://github.com/windingwind/zotero-better-notes/discussions/339
效果图:

搞好了舒服了
以下直接复制可用:
<h1> <span>&lt;泛读&gt;</span></h1>\n <hr/>
</span></h1>\n <h2 style="color: #1B5E20; background-color:#F1F8E9;">💡 Meta Data
</h2> <table>
<tr>
<th style="background-color:#dbeedd;">
<p style="text-align: left">Title </p>
</th>
<td style="background-color:#dbeedd;">${topItem.getField('title')}
</td>
</tr>
<tr>
<th style="background-color:#f3faf4;">
<p style="text-align: left">Journal </p>
</th>
<td style="background-color:#f3faf4;">${topItem.getField('publicationTitle')}
</td>
</tr>
<tr>
<th style="background-color:#dbeedd;">
<p style="text-align: left">Authors </p>
</th>
<td style="background-color:#dbeedd;">${topItem.getCreators().map((v)=>v.firstName+" "+v.lastName).join("; ")}
</td>
</tr>
<tr>
<th style="background-color:#f3faf4;">
<p style="text-align: left">Pub. date </p>
</th>
<td style="background-color:#f3faf4;">${topItem.getField('date')}
</td>
</tr>
<tr>
<th style="background-color:#dbeedd;">
<p style="text-align: left">DOI </p>
</th>
<td style="background-color:#dbeedd;">
<a href="https://doi.org/${topItem.getField('DOI')}">${topItem.getField('DOI')}</a>
</td>
</tr>
</table>
<p></p>
</span></h1>\n <h2 style="color: #E65100; background-color: #FFF8E1;">📜 研究背景 & 基础 & 目的</h2> <hr/>
<p></p>
</span></h1>\n <h2 style="color:#2E7D32; background-color: #F1F8E9;">&#x1F4CA 研究内容</h2> <hr/>
<p></p>
</span></h1>\n <h2 style="color:#4A148C; background-color: #F5F5F5;">🚩 研究结论</h2> <hr/>
<p></p>
</span></h1>\n <h2 style="color: #006064; background-color: #E0F7FA;">📌 感想 & 疑问</h2> <hr/>
<p></p>
</span></h1>\n <h2 style="color:#1565C0; background-color: #E1F5FE;">🔬 研究方法</h2> <hr/>
<h3> <span><span style="color: #1565C0">药品:</span></span></h3>
<h3> <span style="color: #1565C0">表征:</span></h3>
<h3> <span style="color: #1565C0">其他:</span></h3>
—————————————————分割线—————————————————
而且在用的过程中,貌似因为我的版本比较新?实际界面和很多视频教程中不同,特此记录一下使用过程。
1、打开模板编辑器:

2、新建一个模板,把内容粘贴在空白栏中

注意:模板名称前面要加一个[Item],要不然可能会报错;然后点击保存即可。
3、给文献插入笔记模板

先选中具体文献;然后点击上方图中按钮,选“从模板新建条目子笔记”

弹框中选择设置好的模板

然后在弹框中点击目标文献,ok,既可以顺利使用了~

以此纪念我没能读成文献的半个下午,撒花✿✿ヽ(°▽°)ノ✿