Hi all,
I have adapted the following template to create Literature Notes from Zotero references. I am using Zotero Integration, BetterBibtex and Zotfile plugins.
---
title: {{title | safe}}
authors: {{authors}}
year: {{date | format("YYYY")}}
type: {{itemType}}
permalink: "{{citekey | safe }}"
---
**Title:** {{title | safe}}
**Author(s):** {{authors}}
**Year:** {{date | format("YYYY")}}
**Type:** {{itemType}}
**Zotero Item:** [Link to Item]({{select}})
**Zotero Document** {{pdfZoteroLink}}
>[!citation]-
>{{bibliography}}
---
### Annotations
*Exported: {{exportDate | format("YYYY-MM-DD h:mm a")}}*
{% for annotation in annotations %}
{% if annotation.annotatedText %} "{{annotation.annotatedText}}" [Page {{annotation.page}}](zotero://open-pdf/library/items/{{annotation.attachment.itemKey}}?page={{annotation.page}}) <mark style="background-color: {{annotation.color}};color: black">Comment</mark>
{% endif %}
{% if annotation.comment %} "{{annotation.comment}}" [Page {{annotation.page}}](zotero://open-pdf/library/items/{{annotation.attachment.itemKey}}?page={{annotation.page}}) <mark style="background-color: {{annotation.color}};color: black">Comment</mark>
{% endif %}
{% if annotation.imageRelativePath %} ![[{{annotation.imageRelativePath}}]] [Page {{annotation.page}}](zotero://open-pdf/library/items/{{annotation.attachment.itemKey}}?page={{annotation.page}}) <mark style="background-color: {{annotation.color}};color: black">Image</mark>
{% endif %}
{% endfor %}
---
Why does the resulting markdown file (as in the plain text file opened in any program), look like the following with large and increasing numbers of new lines between the annotations, comments and images brought across (random article and annotations used for illustration)?
---
title: An Architecture for Active Networking
authors: Samrat Bhattacharjee, Kenneth L. Calvert, Ellen W. Zegura
year: 1997
type: bookSection
permalink: "bhattacharjeeArchitectureActiveNetworking1997"
---
**Title:** An Architecture for Active Networking
**Author(s):** Samrat Bhattacharjee, Kenneth L. Calvert, Ellen W. Zegura
**Year:** 1997
**Type:** bookSection
**Zotero Item:** [Link to Item](zotero://select/library/items/TQPLAK5L)
**Zotero Document** [Bhattacharjee et al_1997_An Architecture for Active Networking.pdf](zotero://select/library/items/ZJBPCVV8)
>[!citation]-
>Bhattacharjee, S., Calvert, K. L., & Zegura, E. W. (1997). An Architecture for Active Networking. In A. Tantawy (Ed.), _High Performance Networking VII: IFIP TC6 Seventh International Conference on High Performance Networks (HPN ‘97), 28th April – 2nd May 1997, White Plains, New York, USA_ (pp. 265–279). Springer US. [https://doi.org/10.1007/978-0-387-35279-4_17](https://doi.org/10.1007/978-0-387-35279-4_17)
---
### Annotations
*Exported: 2023-09-17 10:14 am*
"Active networking offers a change in the usual network paradigm: from passive carrier of bits to a more general computation engine. The implementation of such a change is likely to enable radical new applications that cannot be foreseen today. Large-scale deployment, however, involves significant challenges in interoperability, security, and scalability. In this paper we define an active networking architecture in which users control the invocation of pre-defined, network-based functions through control information in packet headers." [Page 1](zotero://open-pdf/library/items/ZJBPCVV8?page=1) <mark style="background-color: #ffd400;color: black">Comment</mark>
"The network consists of switching nodes, which are connected via links. In this simple model, nodes don't do anything except process the packets received on their incoming links; processing an incoming packet may result in one or more packets being transmitted on outgoing links." [Page 2](zotero://open-pdf/library/items/ZJBPCVV8?page=2) <mark style="background-color: #2ea8e5;color: black">Comment</mark>
![[Attachments/bhattacharjeeArchitectureActiveNetworking1997/image-7-x75-y327.png]] [Page 7](zotero://open-pdf/library/items/ZJBPCVV8?page=7) <mark style="background-color: #ffd400;color: black">Image</mark>
---
%% Import Date: 2023-09-17T10:14:58.568+10:00 %%
It looks fine in markdown view of course as all of the extra new lines are ignored. But I want the actual text file to have good formatting as well without loads of random white space.
Is there a way to control the way new lines are added here? I can’t seem to figure out why differing (but increasing) numbers of new lines are being added between items here.
Thanks so much for any guidance!