From 71bc8eb3e41652752eb034066db7ff89e76f1349 Mon Sep 17 00:00:00 2001
From: George Katsikas <giorgakis.katsikas@gmail.com>
Date: Thu, 6 Jul 2023 14:53:18 +0200
Subject: [PATCH] append superscript to each author in tex file

---
 .../production/management/commands/advance_git_repos.py   | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/scipost_django/production/management/commands/advance_git_repos.py b/scipost_django/production/management/commands/advance_git_repos.py
index 9c10e08cc..4c93d9a3d 100644
--- a/scipost_django/production/management/commands/advance_git_repos.py
+++ b/scipost_django/production/management/commands/advance_git_repos.py
@@ -255,12 +255,18 @@ class Command(BaseCommand):
 
         # Define the formatting functions
         def format_authors(authors: List[str]) -> str:
+            # Append a superscript to each author
+            authors = [
+                author + "\\textsuperscript{" + str(i) + "}"
+                for i, author in enumerate(authors, start=1)
+            ]
+
             *other_authors, last_author = authors
 
             if len(other_authors) == 0:
                 return last_author
             else:
-                return ", ".join(other_authors) + " and " + last_author
+                return ",\n".join(other_authors) + "\nand " + last_author
 
         def format_title(title: str) -> str:
             return title + NEWLINE
-- 
GitLab