Dear all,
I am trying to add the prefix “P->” in front of my imported paper using the Zotero Integration Plugin (e.g., instead of having “{{citekey}}” as the title, I would like it to be “P-> {{citekey}}”). This helps to improve my search for papers in my vault.
Things I have tried
-
I first tried to do this by changing the output path to “Papers/P-> {{citekey}}” in the Zotero Integration plugin setting. While the paper is generated in the right folder, the filename is “P- - {{citekey}}” which is not what I want. The issue seems to be that “>” is not being read properly and is then passed off as " - " instead.
-
I looked around and suspect that it is a rendering issue for nunjucks, and have tried “Papers/P-{% raw %}>{% endraw %} {{citekey}}” but the same thing happened.
-
I also tried to change the filename with a code within the template file using the Templater plugin. I noticed that this “<%* await tp.file.rename(
P-> {{citekey}}
) %>” works when I enable the “Trigger Templater on new file creation” setting. But after I generate the paper once, there are issues when I update the paper (I would want to be able to update my papers as I might add new annotations/notes). Another paper would be generated with “{{citekey}}” as the title, and there is an error message saying, “Template parsing error, aborting. Destination file already exists!”. I believe it is because the Templater only applies to new files.
Inputs that I hope to receive from the community
May I ask if you are able to help me diagnose the problem and propose an easy fix? I could certainly avoid the use of “>” in the title, but I thought it would be great to check in with the community first for my learning. Thank you so much in advance!