From 269e2acd1d0c0eb3c676a5d287653bd60fc04e87 Mon Sep 17 00:00:00 2001 From: Peter Selby Date: Wed, 4 Sep 2024 20:37:08 -0400 Subject: [PATCH] formatting changes --- content/00.front-matter.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/content/00.front-matter.md b/content/00.front-matter.md index 881f493..374f5b4 100644 --- a/content/00.front-matter.md +++ b/content/00.front-matter.md @@ -31,7 +31,7 @@ Published: {{manubot.date_long}} {## Template for listing authors ##} {% set affiliationCounter = namespace(value=0) %} -{% set affiliationMap = namespace(value={}) %} +{% set affiliationMap = namespace(value=[]) %} {% for author in manubot.authors %} **{{author.name}}** {%- if author.corresponding is defined and author.corresponding == true %}\*{% endif %} @@ -42,11 +42,13 @@ Published: {{manubot.date_long}} {%- if author.affiliations is defined and author.affiliations|length -%} ^ {%- for affiliation in author.affiliations -%} + {%- if affiliation not in affiliationMap.value %} {%- set affiliationCounter.value = affiliationCounter.value + 1 %} -{%- set x=affiliationMap.value .__setitem__(affiliation, affiliationCounter.value) %} +{%- set x=affiliationMap.value.append(affiliation) %} {%- endif -%} -{{affiliationMap.value[affiliation]}}{{ ", " if not loop.last}} +{{affiliationMap.value.index(affiliation) + 1}} +{{- "," if not loop.last -}} {%- endfor -%} ^ {%- endif -%} @@ -54,7 +56,7 @@ Published: {{manubot.date_long}} {{ ", " if not loop.last else "." }} {%- endfor %} -{% for affiliation in affiliationMap.value -%} +{% for affiliation in affiliationMap.value %} ^{{loop.index}}^ {{affiliation}} {% endfor %}