You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to thank @FeralFlora for the original template. It is great in its own way and can produce a lot of output. However, I prefer a minimal approach, as there was a lot of redundant content for me. Moreover, I faced a problem with annotations not being copied when the HEX code of the color changes. Therefore, I modified the template to suit my preferences and fix the color issue by now checking the colorCategory instead of the HEX code itself (tested in Zotero 7 beta).
The file below, named literatureNoteTemplate.md, is the template file.
PS. I would also like to share how I color-code my annotations below:
π‘ Important
π΄ Weaknesses and caveats
π’ Main ideas and conclusions
π΅ Questions
π£ Definitions and concepts
π Method
π€ Hypotheses
βͺοΈ Survey instruments
"{%- if creators -%}
{{creators[0].lastName or creators[0].name }}
{%- if creators|length == 2 %} & {{creators[1].lastName or creators[1].name}}{% endif -%}
{%- if creators|length > 2 %} et al.{% endif -%}
{%- endif -%}
{%- if date %} ({{date | format("YYYY")}}){% endif -%}
{%- if shortTitle %} {{shortTitle | safe}} {%- else %} {{title | safe}} {%- endif -%}"
{% if itemType == "bookSection" %}
book-title: "{{bookTitle | replace('"',"'")}}"
{% endif -%}
title: "{{title | replace('"',"'") | capitalize}}"
{%- set camelRegex = r/([a-z])([A-Z])/g %}
{%- for type, creators in creators | groupby("creatorType") %}
{% if creators.length > 1 %}{{type | replace(camelRegex, "$1 $2") | lower | trim}}s:{%- for creator in creators %}{% if creator.name %}
{{creator.name}}{% else%}
{{creator.firstName}} {{creator.lastName}} {% endif %}{%- endfor %} {% else -%}
{{type | replace(camelRegex, "$1-$2") | lower | trim}}:{%- for creator in creators %}{% if creator.name %} "{{creator.name}}"{% else%} "{{creator.firstName}} {{creator.lastName}}"{% endif -%}{%- endfor -%}{% endif -%}{% endfor %}
year: {% if date %}{{date | format("YYYY")}}{% endif %}
item-type: {{itemType | replace(camelRegex, "$1 $2") | title | trim}}
publisher: {% if publicationTitle %}"{{publicationTitle}}"{% else %}"{{publisher}}"{% endif %}
{%- if notes.length > 0 -%}
{%- set longShortCutoff = 20 -%}
{%- set shortnotes = [] -%}
{%- set longnotes = [] -%}
{%- for note in notes -%}
{%- if note.note | wordcount <= longShortCutoff -%}
{%- set shortnotes = (shortnotes.push(note.note), shortnotes) -%}
{%- else -%}
{%- set longnotes = (longnotes.push(note), longnotes) -%}
{%- endif -%}{%- endfor -%}{%- endif -%}
{%- for comment in shortnotes %}
{%- if comment and loop.first %}
comments:
{% endif -%}
"{{comment|replace('"',"'")| replace("\n"," ")}}"{% endfor %}
tags: [{% for t in tags %}{{t.tag | replace(" ", "-")}}{% if not loop.last %}, {% endif %}{% endfor %}]
{% if DOI -%}
doi: https://doi.org/{{DOI}}
{% endif -%}
{%- if itemType == "book" -%}
ISBN: {{ISBN}}
{% endif -%}
{% if date -%}
date: {{date | format("YYYY-MM-DD")}}
{% endif -%}
status: reading
collection: {% for c in collections %}{{c.name}}{% if not loop.last %}, {% endif %}{% endfor %}
Details
Authors: {% for c in creators %} {{c.firstName}} {{c.lastName}}{% if not loop.last %}, {% endif %}{% endfor %}
{%- if relations.length > 0%}
Relations:{% for r in relations %}{% if loop.length == 1%} {{r.title}}{% else %}
{{loop.index}}. [[{{r.title}}]]{% endif %}{% endfor %}{% endif %}
PDF:{% for a in attachments | filterby("path", "endswith", ".pdf") %}{% if loop.length == 1%} [{{a.title}}](file:///{{a.path | replace(" ", "%20")}}){% else %}
{{loop.index}}. [{{a.title}}](file:///{{a.path | replace(" ", "%20")}}){% endif %}{%- endfor %}
{% persist "notes" -%}
{%- if isFirstImport %}
Keynotes
{#- The following is a cursor placeholder for the Templater plugin. After importing the note, you can jump to each of these with an assigned hotkey like Alt+Tab #}