\documentclass[captions=abovetable]{scrartcl}

\setcounter{tocdepth}{2}
\addtokomafont{section}{\clearpage}
\addtokomafont{disposition}{\rmfamily}
\DeclareTOCStyleEntry[entryformat=\itshape,pagenumberformat=\itshape]{default}{section}


\usepackage{amssymb,amsmath}
\usepackage{fixltx2e}
\usepackage{fontspec}
\defaultfontfeatures{Ligatures=TeX,Scale=MatchLowercase}

\usepackage{microtype}
\usepackage{hyperref}
\PassOptionsToPackage{usenames,dvipsnames}{color}
\hypersetup{%
  unicode=true,%
  pdfborder={0 0 0},%
  breaklinks=true%
}
\usepackage[english]{babel}
\frenchspacing

$if(highlighting-macros)$
$highlighting-macros$
$endif$


\usepackage{longtable,booktabs}

\usepackage{graphicx,grffile}
\makeatletter
\def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi}
\def\maxheight{\ifdim\Gin@nat@height>\textheight\textheight\else\Gin@nat@height\fi}
\makeatother
\setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio}


\renewcommand*\figureformat{\textbf{\figurename~S\thefigure.}}
\renewcommand*\captionformat{~}

\usepackage{csquotes}

\usepackage{forarray}
\usepackage{xstring}
\newcommand\getIndex[2]{%
  \ForEach{,}{\IfEq{#1}{\thislevelitem}{\number\thislevelcount\ExitForEach}{}}{#2}%
}
\newcommand\getAff[1]{%
  \getIndex{#1}{$for(affiliation)$$affiliation.code$$sep$,$endfor$}%
}

\newcommand\orcidimage[1]{\href{https://orcid.org/#1}{\includegraphics[height=2ex]{orcid}}}
\newcommand\orcidtext[1]{\href{https://orcid.org/#1}{https://orcid.org/#1}}


\setcounter{secnumdepth}{0}
\setlength{\emergencystretch}{3em}
\providecommand\tightlist{%
  \setlength\itemsep{0pt}%
  \setlength\parskip{0pt}%
}

$for(header-includes)$
$header-includes$
$endfor$

\begin{document}

\begin{flushleft}
{\LARGE $subject$\\[2ex]$title$}
\par\vspace*{1cm}
$for(author)$
\mbox{$author.name$}$if(author.orcid)$~\orcidimage{$author.orcid$}$endif$\textsuperscript{$for(author.affiliation)$\getAff{$author.affiliation$}$sep$,$endfor$}$if(author.corresponding)$\textsuperscript{*}$endif$$if(author.equal)$\textsuperscript{§}$endif$$if(author.equal_print)$\textsuperscript{§}$endif$$sep$,
$endfor$
\par\vspace*{1cm}
$for(affiliation)$
\textsuperscript{\getAff{$affiliation.code$}}$affiliation.details$.$sep$\par\medskip
$endfor$
$for(author)$
$if(author.corresponding)$
\par\medskip%
*Email: $author.corresponding.email$; phone: $author.corresponding.phone$; fax: $author.corresponding.fax$.
$endif$
$endfor$
$for(author)$
$if(author.equal_print)$
\par\medskip\textsuperscript{§}Equal contribution
$endif$
$endfor$
\end{flushleft}

\vspace*{\fill}
\subsection*{ORCID}

$for(author)$%
$if(author.orcid)$$author.name$~\includegraphics[height=2ex]{orcid}~\orcidtext{$author.orcid$}\\$endif$%
$endfor$%

\clearpage
\tableofcontents


\clearpage
$body$

$if(biblio-files)$
\bibliography{$biblio-files$}
$endif$


\end{document}
