$if(title)$
\title{$title$$if(thanks)$\thanks{$thanks$}$endif$}
$endif$
$if(subtitle)$
\usepackage{etoolbox}
\makeatletter
\providecommand{\subtitle}[1]{% add subtitle to \maketitle
  \apptocmd{\@title}{\par {\large #1 \par}}{}{}
}
\makeatother
\subtitle{$subtitle$}
$endif$
$-- This supports Quarto's authors normalization
\usepackage{marvosym}
\usepackage{authblk,academicons}
%\renewcommand*{\Authand}{ og }
%\renewcommand*{\Authands}{ og }
\renewcommand*{\Authsep}{\authorcr}
\renewcommand*{\Authand}{\authorcr}
\renewcommand*{\Authands}{\newline} %%new line after each author
\renewcommand{\Affilfont}{\small}
\newcommand*{\orcid}[1]{\href{https://orcid.org/#1}{\textcolor[HTML]{A6CE39}{\aiOrcid}}}
\newcommand*{\rorid}[1]{\href{https://ror.org/#1}{\aiROR}}
$for(by-author)$
$if(it.metadata.credit.supervision)$
$else$
\author[$for(it.affiliations)$$it.number$$sep$,$endfor$$if(it.attributes.equal-contributor)$,\YinYang$endif$$if(it.attributes.corresponding)$,∗$endif$]{%
  $if(it.url)$%
  \href{$it.url$}{%
  $endif$%
  $it.name.literal$%
  $if(it.metadata.alternate)$%
    \ ($for(it.metadata.alternate)$$it$$sep$,$endfor$)%
  $endif$%
  $if(it.url)$%
  }%
  $endif$%
  $if(it.orcid)$%
    \,\orcid{$it.orcid$}%
  $endif$%
}
$endif$
$endfor$
$for(by-author)$
$if(it.metadata.credit.supervision)$
\author[$for(it.affiliations)$$it.number$$endfor$]{%
  \vspace{1em}
  Vejleder:
  $if(it.url)$%
  \href{$it.url$}{%
  $endif$%
  $it.name.literal$%
  $if(it.metadata.alternate)$%
    \ ($for(it.metadata.alternate)$$it$$sep$,$endfor$)%
  $endif$%
  $if(it.url)$%
  }%
  $endif$%
  $if(it.orcid)$%
    \,\orcid{$it.orcid$}%
  $endif$%
}
$endif$
$endfor$
$for(by-affiliation)$
\affil[$it.number$]{%
  $it.name$%
  $if(it.department)$%
    \\$it.department$%
  $endif$%
  $if(it.ror)$%
    \,\rorid{$it.ror$}%
  $endif$%
}
$endfor$
$if(some-author-has.attributes.equal-contributor)$
\affil[\YinYang]{Disse forfattere bidrog ligeværdigt til dette arbejde.}
$endif$
$if(some-author-has.attributes.corresponding)$
$for(by-author)$
$if(it.attributes.corresponding)$%
\affil[∗]{Korresponderende forfatter: \href{mailto:$it.email$}{$it.email$}}
$endif$
$endfor$
$endif$
\date{$date$}
