The implementation of 'et al.' - Discriminating authors from editors (Template for Zotero Integration)

Hi everyone! :waving_hand:

I am on my mission to transfer relevant material from Zotero to Obsidian and for that I use the popular plugin called Zotero Integration. In order to work in Obsidian with annotations on literature I created in Zotero, I’ve written a template with some great help coming from this forum.

The issue I am facing right now is one concerning (A) the macro of my template and (B) the description of the output path of the notes being created for my implementation of literature, which is set up inside the options menu of the plugin.

A - the macro I use:

{% macro citationFormatter() -%}
{%- if creators -%}
{%- if creators.creatorType == “author” %}
{%- set citation = creators[0].lastName %}
{%- if creators|length == 2 -%}
{% set citation = citation + " & " + creators[1].lastName %}
{%- endif -%}
{%- if creators|length > 2 -%}
{% set citation = citation + " et al." %}
{%- endif -%}
{%- endif -%}
{%- if date -%}
{% set citation = citation + ", " + date | format(“YYYY”) -%}
{%- endif -%}
{{citation}}
{%- endmacro %}

B - the description of the output path:

1 SOURCES/11 Literature/LIT {% if creators%}{% set citation = creators[0].lastName %}{% if creators|length == 2 %}{% set citation = citation + " & " + creators[1].lastName %}{% endif %}{% if creators|length > 2 %}{% set citation = citation + " et al." %}{% endif %}{% endif %}{% if date %}{% set citation = citation + " " + date | format(“YYYY”) %}{% endif %}{{citation}}, {{shortTitle if shortTitle else title}}.md

The problem

These designs are responsible for an inflationary print of “ et al.”!

Most of my literature entries on Zotero have metadata about the context in which the texts were published, so editors are listed in the entries’ data inside the category “creators” right next to the actual authors of the chapters who are primarily relevant for these entries.

Using the plugin-feature called data explorer I’ve found out about the category called creatorType and thought to myself: This must be part of the solution! But I’m not capable of implementing this puzzle piece adequately into neither A nor B, for there are difficulties surrounding the benefits I want to keep. The necessary feature and major benefit of the “code” would obviously be the legitimate output of “et al.”.

This is where I ask you: Can you help me modify A or B or maybe even explain to me what the steps are I need to take? I am thankful for every piece of advice!

I wish everyone who reads this a great day! :sparkles: