Adding annotation tags to notes
dstillman
Zotero Team
This discussion was created from comments split from: Zotfile no option to extract annotations.
Upgrade Storage
Kind regards
Currently annotation tags themselves are only searchable within the PDF reader, but it will be possible to search for annotations by tag from the library view in a future version.
I followed the note template examples & set up the layout I wanted:
+ yellow: general highlight --> "in quotations”
+ green: technical highlight of method or explaining a concept
+ blue: (no classification yet for blue highlight)
+ red: important or key term --> “in bold & quotations”
+ purple: question or I don’t understand the text here --> "in italic quotations"
+ comments in block quotes followed by my initials “gc:”
+ annotation tags directly behind highlight --> #bold
+ a dash break between highlights, & a centered divider under title
This was the code:
-------------------------------------------------------------
in Preferences -> Advanced -> Config Editor -> extensions.zotero.annotations.noteTemplates.highlight :
{{if color == '#ff6666'}}
<b>{{highlight quotes = 'true'}}</b>{{citation}} {{if tags}} <b>#{{tags join=' #'}}</b>{{endif}}
{{elseif color == '#a28ae5'}}
<i>{{highlight quotes = 'true'}}</i> {{citation}} {{if tags}} <b>#{{tags join=' #'}}</b>{{endif}}
{{else}}
{{highlight quotes='true'}} {{citation}} {{if tags}} <b>#{{tags join=' #'}}</b>{{endif}}
{{endif}} {{if comment}}<blockquote> gc: {{comment}}</blockquote>{{endif}}<p style="text-align:center;"> - </p>
----------------------------------------------------------
code used in Preferences -> Advanced -> Config Editor -> extensions.zotero.annotations.noteTemplates.title:
<h1>{{title}}<br/>({{date}})</h1><p style="text-align:center"> ============ </p>---------------------------------------------------------
Here some pictures of what it looks like: !https://firebasestorage.googleapis.com/v0/b/firescript-577a2.appspot.com/o/imgs/app/oddlyaware/NMWMoFz6OW.22.21.png?alt=media&token=f19c2aa3-a8ac-4933-aee9-968190d92c58
https://firebasestorage.googleapis.com/v0/b/firescript-577a2.appspot.com/o/imgs/app/oddlyaware/Y5fYKNwjrx.21.36.png?alt=media&token=3ad2e6e6-810d-451c-9aac-7e9658f606bd
with highlight color toggled off (three dots in corner of note):
https://firebasestorage.googleapis.com/v0/b/firescript-577a2.appspot.com/o/imgs/app/oddlyaware/0z5vBfuYla.38.16.png?alt=media&token=80478fd6-e42b-4c15-a5f7-a71c8d7b1566
material I referred to:
+ https://www.zotero.org/support/note_templates
+ https://www.zotero.org/support/kb/rich_text_bibliography
+ https://www.w3schools.com/html/html_headings.asp
happened across @aflamingo also shared their template, & workaround with obsidian tags : https://forums.zotero.org/discussion/97185/sharing-a-very-basic-template-for-tags-in-child-note#latest
For Roam syntax reasons, I would like the tag 'multiple words' to appear as #[[multiple words]]. This way Roam assigns the hyperlink to both words because they are contained within the square brakcets, and I don't have to do any editing work. Because of the volume of reading and notetaking I'm taking, I rely on annotations and tags to streamline my workflow which enables me to be do analysis work right up front while I'm reading the PDF or book.
My initial question with regards to the code from above: #[[{{tags join=' #[['}} and I asked for some guidance on how I could have ']]' appended to the end of each tag. I wracked my brain for a few hours, got some sleep, queried all the threads again first thing this morning and found the solution!
******** SOLUTION FOUND*******
I found the solution in the following thread: https://forums.zotero.org/discussion/comment/400038#Comment_400038.
Here's the syntax to have your tag appear inside #[[ ]], which you can easily import into Roam Research and not have to fiddle around with manual editing
{{if tags}} #[[{{tags join=']] #[['}}]] {{endif}}