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 %}