Skip to content

Commit 96d89a0

Browse files
committed
fix non-affiliation authors
1 parent 28541c1 commit 96d89a0

File tree

4 files changed

+22
-16
lines changed

4 files changed

+22
-16
lines changed

contributors.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@
1010
# Ensure that we have unique indices for the affiliations
1111
affiliations = list()
1212
for author in data["authors"]:
13-
affiliations.extend(author.get("affiliations", []))
13+
if 'affiliations' in author:
14+
affiliations.extend(author["affiliations"])
1415
data["affiliations"] = {aff: i + 1 for i, aff in enumerate(list(dict.fromkeys(affiliations)))}
15-
print(data['affiliations'])
1616
for author in data["authors"]:
17-
author["affiliations"] = [data["affiliations"][aff] for aff in author.get("affiliations", [])]
17+
if 'affiliations' in author:
18+
author["affiliations"] = [data["affiliations"][aff] for aff in author["affiliations"]]
1819

1920
env = jinja2.Environment(
2021
loader=jinja2.FileSystemLoader(os.getcwd()),

contributors.tex

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
1-
% The file contributors.tex is automatically generated by running contributors.py.
1+
% README: The file contributors.tex is automatically generated by running contributors.py.
22
% Changed within will be OVERWRITTEN.
33
% For changes to the tex template, change contributors.tex.j2.
44
% For changes to the author information, change contributors.yml.
55
%
6-
\author[]{Markus Ankenbrand}
7-
\author[]{Bernd Flemisch}
8-
\author[1]{Florian Goth\texorpdfstring{\thinspace\orcidlink{0000-0003-2707-4790}}{}}
9-
\author[2]{Jean-Noël Grad\texorpdfstring{\thinspace\orcidlink{0000-0002-5821-4912}}{}}
10-
\author[3]{Dominic Kempf\texorpdfstring{\thinspace\orcidlink{0000-0002-6140-2332}}{}}
11-
\author[4]{Jan Linxweiler\texorpdfstring{\thinspace\orcidlink{0000-0002-2755-5087}}{}}
12-
\author[]{Axel Loewe}
13-
\author[5]{Frank Löffler\texorpdfstring{\thinspace\orcidlink{0000-0001-6643-6323}}{}}
14-
\author[5]{Philipp Matthias Schäfer\texorpdfstring{\thinspace\orcidlink{0000-0003-3931-6670}}{}}
15-
\author[6]{Alexander Struck\texorpdfstring{\thinspace\orcidlink{0000-0002-1173-9228}}{}}
6+
% Note: the zero-width character <200b> is in here on purpose (to not mess up authors without
7+
% affiliation)
8+
\author[​]{Markus Ankenbrand}
9+
\author[​]{Bernd Flemisch}
10+
\author[​1]{Florian Goth\texorpdfstring{\thinspace\orcidlink{0000-0003-2707-4790}}{}}
11+
\author[​2]{Jean-Noël Grad\texorpdfstring{\thinspace\orcidlink{0000-0002-5821-4912}}{}}
12+
\author[​3]{Dominic Kempf\texorpdfstring{\thinspace\orcidlink{0000-0002-6140-2332}}{}}
13+
\author[​4]{Jan Linxweiler\texorpdfstring{\thinspace\orcidlink{0000-0002-2755-5087}}{}}
14+
\author[​]{Axel Loewe}
15+
\author[​5]{Frank Löffler\texorpdfstring{\thinspace\orcidlink{0000-0001-6643-6323}}{}}
16+
\author[​5]{Philipp Matthias Schäfer\texorpdfstring{\thinspace\orcidlink{0000-0003-3931-6670}}{}}
17+
\author[​6]{Alexander Struck\texorpdfstring{\thinspace\orcidlink{0000-0002-1173-9228}}{}}
1618
\affil[1]{Institute for Theoretical Physics and Astrophysics, University of Würzburg, Germany}
1719
\affil[2]{Institute for Computational Physics, University of Stuttgart, Germany}
1820
\affil[3]{Heidelberg University, Scientific Software Center, Germany}

contributors.tex.j2

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
% The file contributors.tex is automatically generated by running contributors.py.
1+
% README: The file contributors.tex is automatically generated by running contributors.py.
22
% Changed within will be OVERWRITTEN.
33
% For changes to the tex template, change contributors.tex.j2.
44
% For changes to the author information, change contributors.yml.
55
%
6+
% Note: the zero-width character <200b> is in here on purpose (to not mess up authors without
7+
% affiliation)
68
{%- for author in data.authors %}
7-
\author[{{ author.affiliations|join(", ") }}]{{ "{" }}{{ author.author }}{% if author.orcid is defined %}\texorpdfstring{\thinspace\orcidlink{ {{-author.orcid-}} }}{}{% endif %}{{ "}" }}
9+
\author[{% if author.affiliations %}{{ author.affiliations|join(", ") }}{% endif %}]{{ "{" }}{{ author.author }}{% if author.orcid is defined %}\texorpdfstring{\thinspace\orcidlink{ {{-author.orcid-}} }}{}{% endif %}{{ "}" }}
810
{%- endfor %}
911
{%- for affiliation, index in data.affiliations.items() %}
1012
\affil[{{ index }}]{{ "{" }}{{ affiliation }}{{ "}" }}

paper.tex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
\usepackage{graphicx}
66
\usepackage[margin=2.5cm]{geometry}
77

8+
\DeclareUnicodeCharacter{200B}{{\hskip 0pt}}
89

910
\usepackage{libertine}
1011
\usepackage{orcidlink}

0 commit comments

Comments
 (0)