Skip to content

Commit

Permalink
formatting changes
Browse files Browse the repository at this point in the history
  • Loading branch information
BrapiCoordinatorSelby committed Sep 5, 2024
1 parent c928ec4 commit 269e2ac
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions content/00.front-matter.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
Expand All @@ -42,19 +42,21 @@ 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 -%}

{{ ", " if not loop.last else "." }}
{%- endfor %}

{% for affiliation in affiliationMap.value -%}
{% for affiliation in affiliationMap.value %}
^{{loop.index}}^ {{affiliation}}
{% endfor %}

Expand Down

0 comments on commit 269e2ac

Please sign in to comment.